1*5667Ssam /* raw_cb.h 4.3 82/02/02 */ 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 /* 31*5667Ssam * Format of raw interface header prepended by 32*5667Ssam * raw_input after call from protocol specific 33*5667Ssam * input routine. 345634Sroot */ 355634Sroot struct raw_header { 365646Ssam struct sockproto raw_protocol; /* format of packet */ 375646Ssam struct sockaddr raw_dst; /* dst address for rawintr */ 385646Ssam struct sockaddr raw_src; /* src address for sbappendaddr */ 395634Sroot }; 405634Sroot 415634Sroot #ifdef KERNEL 425634Sroot struct rawcb rawcb; /* head of list */ 435634Sroot #endif 44