|
|
1.1 ! root 1: /* dgram.h */ ! 2: ! 3: /* Datagram pseudo-device control block */ ! 4: ! 5: struct dgblk { /* Datagram device control block*/ ! 6: int dg_dnum; /* device number of this device */ ! 7: int dg_state; /* whether this device allocated*/ ! 8: int dg_lport; /* local datagram port number */ ! 9: int dg_fport; /* foreign datagram port number */ ! 10: IPaddr dg_faddr; /* foreign machine IP address */ ! 11: int dg_xport; /* incoming packet queue */ ! 12: int dg_netq; /* index of our netq entry */ ! 13: int dg_mode; /* mode of this interface */ ! 14: }; ! 15: ! 16: /* Datagram psuedo-device state constants */ ! 17: ! 18: #define DG_FREE 0 /* this device is available */ ! 19: #define DG_USED 1 /* this device is in use */ ! 20: ! 21: #define DG_TIME 30 /* read timeout (tenths of sec) */ ! 22: ! 23: /* Constants for dgm pseudo-device control functions */ ! 24: ! 25: #define DGM_GATE 11 /* Set the default gateway */ ! 26: ! 27: /* Constants for dg pseudo-device control functions */ ! 28: ! 29: #define DG_SETMODE 1 /* Set mode of device */ ! 30: #define DG_CLEAR 2 /* clear all waiting datagrams */ ! 31: ! 32: /* Constants for dg pseudo-device mode bits */ ! 33: ! 34: #define DG_NMODE 001 /* normal (datagram) mode */ ! 35: #define DG_DMODE 002 /* data-only mode */ ! 36: #define DG_TMODE 040 /* timeout all reads */ ! 37: ! 38: /* Structure of xinugram as dg interface delivers it to user */ ! 39: ! 40: struct xgram { /* Xinu datagram (not UDP) */ ! 41: IPaddr xg_faddr; /* foreign host IP address */ ! 42: short xg_fport; /* foreign UDP port number */ ! 43: short xg_lport; /* local UDP port number */ ! 44: char xg_data[UMAXLEN]; /* maximum data to/from UDP */ ! 45: }; ! 46: ! 47: #define XGHLEN 8 /* error in ( (sizeof(struct xgram)) - UMAXLEN) */ ! 48: ! 49: /* Constants for port specifications on INTERNET open call */ ! 50: ! 51: #define ANYFPORT (char *)0 /* Accept any foreign UDP port */ ! 52: #define ANYLPORT 0 /* Assign a fresh local port num*/ ! 53: ! 54: extern struct dgblk dgtab[];
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.