1 /* raw_cb.h 6.2 85/06/02 */ 2 3 /* 4 * Raw protocol interface control block. Used 5 * to tie a socket to the generic raw interface. 6 */ 7 struct rawcb { 8 struct rawcb *rcb_next; /* doubly linked list */ 9 struct rawcb *rcb_prev; 10 struct socket *rcb_socket; /* back pointer to socket */ 11 struct sockaddr rcb_faddr; /* destination address */ 12 struct sockaddr rcb_laddr; /* socket's address */ 13 struct sockproto rcb_proto; /* protocol family, protocol */ 14 caddr_t rcb_pcb; /* protocol specific stuff */ 15 struct route rcb_route; /* routing information */ 16 short rcb_flags; 17 }; 18 19 /* 20 * Since we can't interpret canonical addresses, 21 * we mark an address present in the flags field. 22 */ 23 #define RAW_LADDR 01 24 #define RAW_FADDR 02 25 #define RAW_DONTROUTE 04 /* no routing, default */ 26 27 #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb) 28 29 /* 30 * Nominal space allocated to a raw socket. 31 */ 32 #define RAWSNDQ 2048 33 #define RAWRCVQ 2048 34 35 /* 36 * Format of raw interface header prepended by 37 * raw_input after call from protocol specific 38 * input routine. 39 */ 40 struct raw_header { 41 struct sockproto raw_proto; /* format of packet */ 42 struct sockaddr raw_dst; /* dst address for rawintr */ 43 struct sockaddr raw_src; /* src address for sbappendaddr */ 44 }; 45 46 #ifdef KERNEL 47 struct rawcb rawcb; /* head of list */ 48 #endif 49