Ignore:
Timestamp:
Mar 25, 2007, 7:54:29 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a3bf7fc
Parents:
295bd2b
Message:

Partial updates from FreeBSD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/netinet/in_pcb.h

    r295bd2b rb91ebbc  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)in_pcb.h    8.1 (Berkeley) 6/10/93
     30 * $FreeBSD: src/sys/netinet/in_pcb.h,v 1.89 2006/07/18 22:34:27 ups Exp $
     31 */
     32
     33/*
    3434 * $Id$
    3535 */
     
    5252
    5353struct inpcb {
    54         LIST_ENTRY(inpcb) inp_list;             /* list for all PCBs of this proto */
    55         LIST_ENTRY(inpcb) inp_hash;             /* hash list */
     54        LIST_ENTRY(inpcb) inp_hash; /* hash list */
     55        LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
    5656        struct  inpcbinfo *inp_pcbinfo; /* PCB list info */
    5757        struct  in_addr inp_faddr;      /* foreign host table entry */
     
    7070        struct  ip_moptions *inp_moptions; /* IP multicast options */
    7171        inp_gen_t       inp_gencnt;     /* generation count of this instance */
    72 #if 0 /* Someday, perhaps... */
    73         struct  ip inp_ip;              /* header prototype; should have more */
    74 #endif
    7572};
    7673
     
    7875 * Interface exported to userland by various protocols which use
    7976 * inpcbs.  Hack alert -- only define if struct xsocket is in scope.
    80  *
    81  * ccj - 20 Nov 2002
    82  * Double hack alert. This is taken from the pre 5.0 sources and
    83  * merged into RTEMS. This allows the TCPCTL_PCBLIST code in
    84  * net-snmp to work.
    8577 */
    8678#ifdef _SYS_SOCKETVAR_H_
    87 typedef u_int64_t so_gen_t; /* should be in sys/sockvar.h */
    88 
    8979struct  xinpcb {
    9080        size_t  xi_len;         /* length of this structure */
     
    9383        u_int64_t       xi_alignment_hack;
    9484};
    95 
    9685
    9786struct  xinpgen {
     
    10392#endif /* _SYS_SOCKETVAR_H_ */
    10493
    105 struct inpcbinfo {
    106         struct inpcbhead *listhead;
    107         struct inpcbhead *hashbase;
     94struct inpcbinfo {              /* XXX documentation, prefixes */
     95        struct  inpcbhead *listhead;
     96        struct  inpcbhead *hashbase;
    10897        unsigned long hashmask;
    10998        unsigned short lastport;
     
    130119
    131120#define INPLOOKUP_WILDCARD      1
    132 
    133121#define sotoinpcb(so)   ((struct inpcb *)(so)->so_pcb)
    134122
    135123#ifdef _KERNEL
    136 void     in_losing __P((struct inpcb *));
    137 int      in_pcballoc __P((struct socket *, struct inpcbinfo *));
    138 int      in_pcbbind __P((struct inpcb *, struct mbuf *));
    139 int      in_pcbconnect __P((struct inpcb *, struct mbuf *));
    140 void     in_pcbdetach __P((struct inpcb *));
    141 void     in_pcbdisconnect __P((struct inpcb *));
    142 int      in_pcbladdr __P((struct inpcb *, struct mbuf *,
    143             struct sockaddr_in **));
     124void    in_losing(struct inpcb *);
     125int     in_pcballoc(struct socket *, struct inpcbinfo *);
     126int     in_pcbbind(struct inpcb *, struct mbuf *);
     127int     in_pcbconnect(struct inpcb *, struct mbuf *);
     128void    in_pcbdetach(struct inpcb *);
     129void    in_pcbdisconnect(struct inpcb *);
     130int     in_pcbladdr(struct inpcb *, struct mbuf *,
     131            struct sockaddr_in **);
    144132struct inpcb *
    145          in_pcblookup __P((struct inpcbinfo *,
    146             struct in_addr, u_int, struct in_addr, u_int, int));
     133        in_pcblookup(struct inpcbinfo *,
     134            struct in_addr, u_int, struct in_addr, u_int, int);
    147135struct inpcb *
    148          in_pcblookuphash __P((struct inpcbinfo *,
    149             struct in_addr, u_int, struct in_addr, u_int, int));
    150 void     in_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
    151             u_int, struct in_addr, u_int, int, void (*)(struct inpcb *, int)));
    152 void     in_pcbrehash __P((struct inpcb *));
    153 void     in_setpeeraddr __P((struct inpcb *, struct mbuf *));
    154 void     in_setsockaddr __P((struct inpcb *, struct mbuf *));
    155 #endif
     136        in_pcblookuphash(struct inpcbinfo *,
     137            struct in_addr, u_int, struct in_addr, u_int, int);
     138void    in_pcbnotify(struct inpcbhead *, struct sockaddr *,
     139            u_int, struct in_addr, u_int, int, void (*)(struct inpcb *, int));
     140void    in_pcbrehash(struct inpcb *);
     141void    in_setpeeraddr(struct inpcb *, struct mbuf *);
     142void    in_setsockaddr(struct inpcb *, struct mbuf *);
     143#endif /* _KERNEL */
    156144
    157 #endif
     145#endif /* !_NETINET_IN_PCB_H_ */
Note: See TracChangeset for help on using the changeset viewer.