1*21769Skarels /* raw_cb.h 6.2 85/06/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 */ 116509Ssam struct sockaddr rcb_faddr; /* destination address */ 126509Ssam struct sockaddr rcb_laddr; /* socket's address */ 13*21769Skarels struct sockproto rcb_proto; /* protocol family, protocol */ 145634Sroot caddr_t rcb_pcb; /* protocol specific stuff */ 1513451Ssam struct route rcb_route; /* routing information */ 165634Sroot short rcb_flags; 175634Sroot }; 185634Sroot 195634Sroot /* 205634Sroot * Since we can't interpret canonical addresses, 215634Sroot * we mark an address present in the flags field. 225634Sroot */ 236509Ssam #define RAW_LADDR 01 246509Ssam #define RAW_FADDR 02 2513451Ssam #define RAW_DONTROUTE 04 /* no routing, default */ 265634Sroot 275634Sroot #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb) 285634Sroot 295634Sroot /* 305634Sroot * Nominal space allocated to a raw socket. 315634Sroot */ 325634Sroot #define RAWSNDQ 2048 335634Sroot #define RAWRCVQ 2048 345634Sroot 355634Sroot /* 365667Ssam * Format of raw interface header prepended by 375667Ssam * raw_input after call from protocol specific 385667Ssam * input routine. 395634Sroot */ 405634Sroot struct raw_header { 416509Ssam struct sockproto raw_proto; /* format of packet */ 425646Ssam struct sockaddr raw_dst; /* dst address for rawintr */ 435646Ssam struct sockaddr raw_src; /* src address for sbappendaddr */ 445634Sroot }; 455634Sroot 465634Sroot #ifdef KERNEL 475634Sroot struct rawcb rawcb; /* head of list */ 485634Sroot #endif 49