|
|
1.1 ! root 1: /* ! 2: * things users need to know to talk to /dev/tcp* ! 3: * open a free tcp device, write a tcpuser struct on it, ! 4: * then wait for a tcpreply. ! 5: */ ! 6: ! 7: /* the following is defined in kernel .h's */ ! 8: #ifndef KERNEL ! 9: #include <sys/inet/in.h> ! 10: #include <sys/inet/tcp.h> ! 11: #endif ! 12: ! 13: struct tcpuser{ ! 14: int cmd; ! 15: tcp_port sport, dport; ! 16: in_addr src, dst; ! 17: }; ! 18: #define TCPC_LISTEN 1 ! 19: #define TCPC_CONNECT 2 ! 20: ! 21: struct tcpreply{ ! 22: int reply; ! 23: /* for listen: */ ! 24: tcp_port sport, dport; ! 25: in_addr src, dst; ! 26: int tcpdev; /* minor device # */ ! 27: }; ! 28: #define TCPR_OK 1 ! 29: #define TCPR_SORRY 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.