libowfat_socket_send6 man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

socket_send6(3)						       socket_send6(3)

NAME
       socket_send6 - send a UDP datagram

SYNTAX
       #include <socket.h>

       ssize_t socket_send6(int s, const char* buf, size_t len,
		const char ip[16], uint16 port, uint32 scope_id);

DESCRIPTION
       socket_send6 sends len bytes starting at buf in a UDP datagram over the
       socket s to UDP port port on IP address ip.

       You can call socket_send6 without calling socket_bind6.	This  has  the
       effect as first calling socket_bind6 with IP address :: and port 0.

       The meaning of scope_id is dependent on the implementation and IPv6 IP.
       On link-local IPv6 addresses it specifies the outgoing interface index.
       The  name (e.g. "eth0") for a given interface index can be queried with
       getifname.  scope_id should normally be set to 0.

RETURN VALUE
       socket_send6 returns 0 if the datagram was sent successfully.  If  not,
       it returns -1 and sets errno appropriately.

EXAMPLE
	 #include <socket.h>

	 int s;
	 char ip[16];
	 uint16 p;
	 uint32 scope_id;

	 s = socket_tcp4();
	 socket_bind6(s,ip,p);
	 socket_send6(s,"hello, world",12,ip,p,scope_id);

SEE ALSO
       socket_send4(3), socket_getifidx(3)

							       socket_send6(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net