|
|
1.1 root 1: /*
2: * things users need to know to talk to /dev/udp*
3: * open a free udp device, write a udpuser struct on it,
4: * then wait for a udpreply.
5: */
6:
7: /* the following is defined in kernel .h's */
8: #ifndef KERNEL
9: #include <sys/inet/in.h>
10: #include <sys/inet/udp.h>
11: #endif
12:
13: struct udpuser{
14: int cmd;
15: int sport, dport;
16: in_addr dst;
17: };
18: #define UDPC_LISTEN 1
19: #define UDPC_CONNECT 2
20: #define UDPC_DATAGRAM 3
21:
22: struct udpreply{
23: int reply;
24: /* for listen: */
25: int dport;
26: in_addr dst;
27: int udpdev; /* minor device # */
28: };
29: #define UDPR_OK 1
30: #define UDPR_SORRY 2
31:
32: struct udpaddr{
33: in_addr host;
34: int port;
35: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.