1*5646Ssam /* raw_cb.h 4.2 82/02/01 */ 25634Sroot 35634Sroot /* 45634Sroot * Raw protocol interface control block. Used 55634Sroot * to tie a socket to the generic raw interface. 65634Sroot */ 75634Sroot struct rawcb { 85634Sroot struct rawcb *rcb_next; /* doubly linked list */ 95634Sroot struct rawcb *rcb_prev; 105634Sroot struct socket *rcb_socket; /* back pointer to socket */ 115634Sroot struct sockaddr rcb_addr; /* destination address */ 125634Sroot caddr_t rcb_pcb; /* protocol specific stuff */ 135634Sroot short rcb_flags; 145634Sroot }; 155634Sroot 165634Sroot /* 175634Sroot * Since we can't interpret canonical addresses, 185634Sroot * we mark an address present in the flags field. 195634Sroot */ 205634Sroot #define RAW_ADDR 01 /* got an address */ 215634Sroot 225634Sroot #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb) 235634Sroot 245634Sroot /* 255634Sroot * Nominal space allocated to a raw socket. 265634Sroot */ 275634Sroot #define RAWSNDQ 2048 285634Sroot #define RAWRCVQ 2048 295634Sroot 305634Sroot /* 315634Sroot * Format of raw interface header appended by 325634Sroot * raw_input after call from protocol specific input routine. 335634Sroot */ 345634Sroot struct raw_header { 35*5646Ssam struct sockproto raw_protocol; /* format of packet */ 36*5646Ssam struct sockaddr raw_dst; /* dst address for rawintr */ 37*5646Ssam struct sockaddr raw_src; /* src address for sbappendaddr */ 385634Sroot }; 395634Sroot 405634Sroot #ifdef KERNEL 415634Sroot struct rawcb rawcb; /* head of list */ 425634Sroot #endif 43