home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / netinet / h / in_pcb < prev    next >
Encoding:
Text File  |  1995-01-11  |  1.5 KB  |  46 lines

  1. /* -*-C-*-
  2.  *
  3.  * $Header: /ax/networking:include/netinet/in_pcb.h:networking  1.1  $
  4.  * $Source: /ax/networking:include/netinet/in_pcb.h: $
  5.  *
  6.  * Copyright (c) 1995 Acorn Computers Ltd., Cambridge, England
  7.  *
  8.  * $Log:    in_pcb.h,v $
  9.  * Revision 1.1  95/01/11  10:16:52  kwelton
  10.  * Initial revision
  11.  * 
  12.  */
  13.  
  14. /*
  15.  * Common structure pcb for internet protocol implementation.
  16.  * Here are stored pointers to local and foreign host table
  17.  * entries, local and foreign socket numbers, and pointers
  18.  * up (to a socket structure) and down (to a protocol-specific)
  19.  * control block.
  20.  */
  21. struct inpcb {
  22.         struct  inpcb *inp_next,*inp_prev;
  23.                                         /* pointers to other pcb's */
  24.         struct  inpcb *inp_head;        /* pointer back to chain of inpcb's
  25.                                            for this protocol */
  26.         struct  in_addr inp_faddr;      /* foreign host table entry */
  27.         u_short inp_fport;              /* foreign port */
  28.         struct  in_addr inp_laddr;      /* local host table entry */
  29.         u_short inp_lport;              /* local port */
  30.         struct  socket *inp_socket;     /* back pointer to socket */
  31.         caddr_t inp_ppcb;               /* pointer to per-protocol pcb */
  32.         struct  route inp_route;        /* placeholder for routing entry */
  33.         struct  mbuf *inp_options;      /* IP options */
  34. };
  35.  
  36. #define INPLOOKUP_WILDCARD      1
  37. #define INPLOOKUP_SETLOCAL      2
  38.  
  39. #define sotoinpcb(so)   ((struct inpcb *)(so)->so_pcb)
  40.  
  41. #ifdef KERNEL
  42. struct  inpcb *in_pcblookup();
  43. #endif
  44.  
  45. /* EOF in_pcb.h */
  46.