From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/udpread.html | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 man/man3/udpread.html (limited to 'man/man3/udpread.html') diff --git a/man/man3/udpread.html b/man/man3/udpread.html new file mode 100644 index 00000000..e8f0d37b --- /dev/null +++ b/man/man3/udpread.html @@ -0,0 +1,105 @@ + +udpread(3) - Plan 9 from User Space + + + + +
+
+
UDPREAD(3)UDPREAD(3) +
+
+

NAME
+ +
+ + udpread, udpwrite – read and write UDP packets
+ +
+

SYNOPSIS
+ +
+ + #include <u.h> +
+
+ #include <libc.h> +
+
+ #include <ip.h> +
+
+ typedef struct Udphdr Udphdr;
+
struct Udphdr
+ {
+ +
+ + uchar    raddr[IPaddrlen];/* remote address and port */
+ uchar    laddr[IPaddrlen];/* local address and port */
+ uchar    rport[2];
+ uchar    lport[2];
+ +
+ };
+ +
+ + long      udpread(int fd, Udphdr *hdr, void *data, long n)
+ +
+
+ long udpwrite(int fd, Udphdr *hdr, void *data, long n)
+
+
+

DESCRIPTION
+ +
+ + Udpread and udpwrite read and write UDP packets from the UDP network + connection established on file descriptor fd. +
+ + Udpread reads at most n bytes of packet body into data , stores + the header in hdr, and returns the number of bytes stored in data. + +
+ + Udpwrite writes the n bytes stored in data in a UDP packet with + header hdr. +
+ + Note that the Udphdr frames the addresses as local and remote + instead of source and destination. Thus the hdr filled in for + a packet read by udpread can be used unchanged in udpwrite to + send a response back to the sender of the original packet.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/udp.c
+
+
+

SEE ALSO
+ +
+ + ip(3)
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3