Changeset d589e75 in rtems


Ignore:
Timestamp:
04/26/04 11:46:52 (19 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
43158ce
Parents:
bfa87f30
Message:

2004-04-26 Ralf Corsepius <ralf_corsepius@…>

  • libnetworking/netinet/igmp_var.h: Cosmetic updates from FreeBSD.
  • libnetworking/sys/sysctl.h: Update from FreeBSD.
  • libnetworking/sys/socketvar.h: Update from FreeBSD.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rbfa87f30 rd589e75  
     12004-04-26      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * libnetworking/netinet/igmp_var.h: Cosmetic updates from FreeBSD.
     4        * libnetworking/sys/sysctl.h: Update from FreeBSD.
     5        * libnetworking/sys/socketvar.h: Update from FreeBSD.
     6
    172004-04-24      Ralf Corsepius <ralf_corsepius@rtems.org>
    28
  • cpukit/libnetworking/netinet/igmp_var.h

    rbfa87f30 rd589e75  
    1515 *    notice, this list of conditions and the following disclaimer in the
    1616 *    documentation and/or other materials provided with the distribution.
    17  * 3. All advertising materials mentioning features or use of this software
    18  *    must display the following acknowledgement:
    19  *      This product includes software developed by the University of
    20  *      California, Berkeley and its contributors.
    2117 * 4. Neither the name of the University nor the names of its contributors
    2218 *    may be used to endorse or promote products derived from this software
     
    3632 *
    3733 *      from: @(#)igmp_var.h    8.1 (Berkeley) 7/19/93
    38  * $FreeBSD: src/sys/netinet/igmp_var.h,v 1.19 2002/03/19 21:25:46 alfred Exp $
     34 * $FreeBSD: src/sys/netinet/igmp_var.h,v 1.20 2004/04/07 20:46:13 imp Exp $
    3935 */
    4036
     
    109105        { "stats", CTLTYPE_STRUCT }, \
    110106}
    111 
    112107#endif
  • cpukit/libnetworking/sys/socketvar.h

    rbfa87f30 rd589e75  
     1/* $Id$ */
     2
    13/*-
    24 * Copyright (c) 1982, 1986, 1990, 1993
     
    3234 *
    3335 *      @(#)socketvar.h 8.3 (Berkeley) 2/19/95
    34  * $Id$
     36 * $FreeBSD: src/sys/sys/socketvar.h,v 1.110 2004/03/01 03:14:23 rwatson Exp $
    3537 */
    3638
     
    5254        short   so_linger;              /* time to linger while closing */
    5355        short   so_state;               /* internal state flags SS_*, below */
    54         caddr_t so_pcb;                 /* protocol control block */
     56        void    *so_pcb;                /* protocol control block */
    5557        struct  protosw *so_proto;      /* protocol handle */
    5658/*
     
    7375                                           connections */
    7476        short   so_qlimit;              /* max number queued connections */
    75         u_long  so_timeo;               /* connection timeout */
     77        short   so_timeo;               /* connection timeout */
    7678        u_short so_error;               /* error affecting connection */
    7779        pid_t   so_pgid;                /* pgid for signals */
     
    8183 */
    8284        struct  sockbuf {
    83                 u_long  sb_cc;          /* actual chars in buffer */
    84                 u_long  sb_hiwat;       /* max actual char count */
    85                 u_long  sb_mbcnt;       /* chars of mbufs used */
    86                 u_long  sb_mbmax;       /* max chars of mbufs to use */
    87                 long    sb_lowat;       /* low water mark */
     85                u_int   sb_cc;          /* actual chars in buffer */
     86                u_int   sb_hiwat;       /* max actual char count */
     87                u_int   sb_mbcnt;       /* chars of mbufs used */
     88                u_int   sb_mbmax;       /* max chars of mbufs to use */
     89                int     sb_lowat;       /* low water mark */
    8890                struct  mbuf *sb_mb;    /* the mbuf chain */
    8991                struct  selinfo sb_sel; /* process selecting read/write */
    9092                short   sb_flags;       /* flags, see below */
    91                 u_long  sb_timeo;       /* timeout for read/write */
     93                int     sb_timeo;       /* timeout for read/write */
    9294                void    (*sb_wakeup) __P((struct socket *, caddr_t));
    9395                caddr_t sb_wakeuparg;   /* arg for above */
     
    103105
    104106        caddr_t so_tpcb;                /* Wisc. protocol control block XXX */
    105         void    (*so_upcall) __P((struct socket *so, caddr_t arg, int waitf));
    106         caddr_t so_upcallarg;           /* Arg for above */
     107        void    (*so_upcall)(struct socket *, void *arg, int);
     108        void    *so_upcallarg;          /* Arg for above */
    107109        uid_t   so_uid;                 /* who opened the socket */
    108110};
     
    215217 * File operations on sockets.
    216218 */
    217 int     soo_ioctl __P((struct file *fp, int cmd, caddr_t data,
    218             struct proc *p));
    219 int     soo_select __P((struct file *fp, int which, struct proc *p));
    220 int     soo_stat __P((struct socket *so, struct stat *ub));
     219int     soo_ioctl(struct file *fp, int cmd, caddr_t data,
     220            struct proc *p);
     221int     soo_select(struct file *fp, int which, struct proc *p);
     222int     soo_stat(struct socket *so, struct stat *ub);
    221223
    222224/*
    223225 * From uipc_socket and friends
    224226 */
    225 int     getsock __P((struct filedesc *fdp, int fdes, struct file **fpp));
    226 int     sockargs __P((struct mbuf **mp, caddr_t buf, int buflen, int type));
    227 void    sbappend __P((struct sockbuf *sb, struct mbuf *m));
    228 int     sbappendaddr __P((struct sockbuf *sb, struct sockaddr *asa,
    229             struct mbuf *m0, struct mbuf *control));
    230 int     sbappendcontrol __P((struct sockbuf *sb, struct mbuf *m0,
    231             struct mbuf *control));
    232 void    sbappendrecord __P((struct sockbuf *sb, struct mbuf *m0));
    233 void    sbcheck __P((struct sockbuf *sb));
    234 void    sbcompress __P((struct sockbuf *sb, struct mbuf *m, struct mbuf *n));
     227int     getsock(struct filedesc *fdp, int fdes, struct file **fpp);
     228int     sockargs(struct mbuf **mp, caddr_t buf, int buflen, int type);
     229void    sbappend(struct sockbuf *sb, struct mbuf *m);
     230int     sbappendaddr(struct sockbuf *sb, struct sockaddr *asa,
     231            struct mbuf *m0, struct mbuf *control);
     232int     sbappendcontrol(struct sockbuf *sb, struct mbuf *m0,
     233            struct mbuf *control);
     234void    sbappendrecord(struct sockbuf *sb, struct mbuf *m0);
     235void    sbcheck(struct sockbuf *sb);
     236void    sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n);
    235237struct mbuf *
    236         sbcreatecontrol __P((caddr_t p, int size, int type, int level));
    237 void    sbdrop __P((struct sockbuf *sb, int len));
    238 void    sbdroprecord __P((struct sockbuf *sb));
    239 void    sbflush __P((struct sockbuf *sb));
    240 void    sbinsertoob __P((struct sockbuf *sb, struct mbuf *m0));
    241 void    sbrelease __P((struct sockbuf *sb));
    242 int     sbreserve __P((struct sockbuf *sb, u_long cc));
    243 int     sbwait __P((struct sockbuf *sb));
    244 int     sb_lock __P((struct sockbuf *sb));
    245 int     soabort __P((struct socket *so));
    246 int     soaccept __P((struct socket *so, struct mbuf *nam));
    247 int     sobind __P((struct socket *so, struct mbuf *nam));
    248 void    socantrcvmore __P((struct socket *so));
    249 void    socantsendmore __P((struct socket *so));
    250 int     soclose __P((struct socket *so));
    251 int     soconnect __P((struct socket *so, struct mbuf *nam));
    252 int     soconnect2 __P((struct socket *so1, struct socket *so2));
    253 int     socreate __P((int dom, struct socket **aso, int type, int proto,
    254             struct proc *p));
    255 int     sodisconnect __P((struct socket *so));
    256 void    sofree __P((struct socket *so));
    257 int     sogetopt __P((struct socket *so, int level, int optname,
    258             struct mbuf **mp));
    259 void    sohasoutofband __P((struct socket *so));
    260 void    soisconnected __P((struct socket *so));
    261 void    soisconnecting __P((struct socket *so));
    262 void    soisdisconnected __P((struct socket *so));
    263 void    soisdisconnecting __P((struct socket *so));
    264 int     solisten __P((struct socket *so, int backlog));
     238        sbcreatecontrol(caddr_t p, int size, int type, int level);
     239void    sbdrop(struct sockbuf *sb, int len);
     240void    sbdroprecord(struct sockbuf *sb);
     241void    sbflush(struct sockbuf *sb);
     242void    sbinsertoob(struct sockbuf *sb, struct mbuf *m0);
     243void    sbrelease(struct sockbuf *sb);
     244int     sbreserve(struct sockbuf *sb, u_long cc);
     245int     sbwait(struct sockbuf *sb);
     246int     sb_lock(struct sockbuf *sb);
     247int     soabort(struct socket *so);
     248int     soaccept(struct socket *so, struct mbuf *nam);
     249int     sobind(struct socket *so, struct mbuf *nam);
     250void    socantrcvmore(struct socket *so);
     251void    socantsendmore(struct socket *so);
     252int     soclose(struct socket *so);
     253int     soconnect(struct socket *so, struct mbuf *nam);
     254int     soconnect2(struct socket *so1, struct socket *so2);
     255int     socreate(int dom, struct socket **aso, int type, int proto,
     256            struct proc *p);
     257int     sodisconnect(struct socket *so);
     258void    sofree(struct socket *so);
     259int     sogetopt(struct socket *so, int level, int optname,
     260            struct mbuf **mp);
     261void    sohasoutofband(struct socket *so);
     262void    soisconnected(struct socket *so);
     263void    soisconnecting(struct socket *so);
     264void    soisdisconnected(struct socket *so);
     265void    soisdisconnecting(struct socket *so);
     266int     solisten(struct socket *so, int backlog);
    265267struct socket *
    266         sodropablereq __P((struct socket *head));
     268        sodropablereq(struct socket *head);
    267269struct socket *
    268         sonewconn1 __P((struct socket *head, int connstatus));
    269 int     soreceive __P((struct socket *so, struct mbuf **paddr, struct uio *uio,
    270             struct mbuf **mp0, struct mbuf **controlp, int *flagsp));
    271 int     soreserve __P((struct socket *so, u_long sndcc, u_long rcvcc));
    272 void    sorflush __P((struct socket *so));
    273 int     sosend __P((struct socket *so, struct mbuf *addr, struct uio *uio,
    274             struct mbuf *top, struct mbuf *control, int flags));
    275 int     sosetopt __P((struct socket *so, int level, int optname,
    276             struct mbuf *m0));
    277 int     soshutdown __P((struct socket *so, int how));
    278 void    sowakeup __P((struct socket *so, struct sockbuf *sb));
     270        sonewconn1(struct socket *head, int connstatus);
     271int     soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio,
     272            struct mbuf **mp0, struct mbuf **controlp, int *flagsp);
     273int     soreserve(struct socket *so, u_long sndcc, u_long rcvcc);
     274void    sorflush(struct socket *so);
     275int     sosend(struct socket *so, struct mbuf *addr, struct uio *uio,
     276            struct mbuf *top, struct mbuf *control, int flags);
     277int     sosetopt(struct socket *so, int level, int optname,
     278            struct mbuf *m0);
     279int     soshutdown(struct socket *so, int how);
     280void    sowakeup(struct socket *so, struct sockbuf *sb);
    279281#endif /* _KERNEL */
    280282
  • cpukit/libnetworking/sys/sysctl.h

    rbfa87f30 rd589e75  
    1414 *    notice, this list of conditions and the following disclaimer in the
    1515 *    documentation and/or other materials provided with the distribution.
    16  * 3. All advertising materials mentioning features or use of this software
    17  *    must display the following acknowledgement:
    18  *      This product includes software developed by the University of
    19  *      California, Berkeley and its contributors.
    2016 * 4. Neither the name of the University nor the names of its contributors
    2117 *    may be used to endorse or promote products derived from this software
     
    3531 *
    3632 *      @(#)sysctl.h    8.1 (Berkeley) 6/2/93
    37  * $FreeBSD: src/sys/sys/sysctl.h,v 1.110 2002/10/20 22:48:08 phk Exp $
     33 * $FreeBSD: src/sys/sys/sysctl.h,v 1.128 2004/04/07 04:19:49 imp Exp $
    3834 */
    3935
     
    5349 */
    5450
    55 #define CTL_MAXNAME     12      /* largest number of components supported */
     51#define CTL_MAXNAME     24      /* largest number of components supported */
    5652
    5753/*
     
    6056 * levels defined below it, or it is a leaf of some particular
    6157 * type given below. Each sysctl level defines a set of name/type
    62  * pairs to be used by sysctl(1) in manipulating the subsystem.
     58 * pairs to be used by sysctl(8) in manipulating the subsystem.
    6359 */
    6460struct ctlname {
     
    8783#define CTLFLAG_DYN     0x02000000      /* Dynamic oid - can be freed */
    8884#define CTLFLAG_SKIP    0x01000000      /* Skip this sysctl when listing */
     85#define CTLMASK_SECURE  0x00F00000      /* Secure level */
     86#define CTLFLAG_TUN     0x00080000      /* Tunable variable */
     87#define CTLFLAG_RDTUN   (CTLFLAG_RD|CTLFLAG_TUN)
     88
     89/*
     90 * Secure level.   Note that CTLFLAG_SECURE == CTLFLAG_SECURE1. 
     91 *
     92 * Secure when the securelevel is raised to at least N.
     93 */
     94#define CTLSHIFT_SECURE 20
     95#define CTLFLAG_SECURE1 (CTLFLAG_SECURE | (0 << CTLSHIFT_SECURE))
     96#define CTLFLAG_SECURE2 (CTLFLAG_SECURE | (1 << CTLSHIFT_SECURE))
     97#define CTLFLAG_SECURE3 (CTLFLAG_SECURE | (2 << CTLSHIFT_SECURE))
    8998
    9099/*
     
    127136        size_t          newidx;
    128137        int             (*newfunc)(struct sysctl_req *, void *, size_t);
     138        size_t          validlen;
    129139};
    130140
     
    184194TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
    185195
     196#define SYSCTL_NODE_CHILDREN(parent, name) \
     197        sysctl_##parent##_##name##_children
     198
    186199/* This constructs a "raw" MIB oid. */
    187200#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \
     
    196209/* This constructs a node from which other oids can hang. */
    197210#define SYSCTL_NODE(parent, nbr, name, access, handler, descr)              \
    198         struct sysctl_oid_list sysctl_##parent##_##name##_children;         \
     211        struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name);          \
    199212        SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|(access),                \
    200                    (void*)&sysctl_##parent##_##name##_children, 0, handler, \
     213                   (void*)&SYSCTL_NODE_CHILDREN(parent, name), 0, handler, \
    201214                   "N", descr)
    202215
     
    241254        ptr, 0, sysctl_handle_long, "L", descr)
    242255
    243 /* Oid for a long.  The pointer must be non NULL. */
     256/* Oid for an unsigned long.  The pointer must be non NULL. */
    244257#define SYSCTL_ULONG(parent, nbr, name, access, ptr, val, descr) \
    245258        SYSCTL_OID(parent, nbr, name, CTLTYPE_ULONG|(access), \
     
    404417#define KERN_PROC_RUID          6       /* by real uid */
    405418#define KERN_PROC_ARGS          7       /* get/set arguments/proctitle */
     419#define KERN_PROC_PROC          8       /* only return procs */
     420#define KERN_PROC_SV_NAME       9       /* get syscall vector name */
     421#define KERN_PROC_INC_THREAD    0x10    /*
     422                                         * modifier for pid, pgrp, tty,
     423                                         * uid, ruid, and proc
     424                                         */
    406425
    407426/*
     
    573592extern char     osrelease[];
    574593extern char     ostype[];
     594extern char     kern_ident[];
    575595
    576596/* Dynamic oid handling */
     
    580600                int (*handler) (SYSCTL_HANDLER_ARGS),
    581601                const char *fmt, const char *descr);
     602int     sysctl_move_oid(struct sysctl_oid *oidp,
     603                struct sysctl_oid_list *parent);
    582604int     sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse);
    583605int     sysctl_ctx_init(struct sysctl_ctx_list *clist);
     
    601623int     sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
    602624                        int *nindx, struct sysctl_req *req);
    603 void    sysctl_wire_old_buffer(struct sysctl_req *req, size_t len);
     625int     sysctl_wire_old_buffer(struct sysctl_req *req, size_t len);
    604626
    605627#else   /* !_KERNEL */
Note: See TracChangeset for help on using the changeset viewer.