Changeset d589e75 in rtems
- Timestamp:
- 04/26/04 11:46:52 (19 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 43158ce
- Parents:
- bfa87f30
- Location:
- cpukit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
rbfa87f30 rd589e75 1 2004-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 1 7 2004-04-24 Ralf Corsepius <ralf_corsepius@rtems.org> 2 8 -
cpukit/libnetworking/netinet/igmp_var.h
rbfa87f30 rd589e75 15 15 * notice, this list of conditions and the following disclaimer in the 16 16 * documentation and/or other materials provided with the distribution. 17 * 3. All advertising materials mentioning features or use of this software18 * must display the following acknowledgement:19 * This product includes software developed by the University of20 * California, Berkeley and its contributors.21 17 * 4. Neither the name of the University nor the names of its contributors 22 18 * may be used to endorse or promote products derived from this software … … 36 32 * 37 33 * 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 alfredExp $34 * $FreeBSD: src/sys/netinet/igmp_var.h,v 1.20 2004/04/07 20:46:13 imp Exp $ 39 35 */ 40 36 … … 109 105 { "stats", CTLTYPE_STRUCT }, \ 110 106 } 111 112 107 #endif -
cpukit/libnetworking/sys/socketvar.h
rbfa87f30 rd589e75 1 /* $Id$ */ 2 1 3 /*- 2 4 * Copyright (c) 1982, 1986, 1990, 1993 … … 32 34 * 33 35 * @(#)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 $ 35 37 */ 36 38 … … 52 54 short so_linger; /* time to linger while closing */ 53 55 short so_state; /* internal state flags SS_*, below */ 54 caddr_t so_pcb;/* protocol control block */56 void *so_pcb; /* protocol control block */ 55 57 struct protosw *so_proto; /* protocol handle */ 56 58 /* … … 73 75 connections */ 74 76 short so_qlimit; /* max number queued connections */ 75 u_longso_timeo; /* connection timeout */77 short so_timeo; /* connection timeout */ 76 78 u_short so_error; /* error affecting connection */ 77 79 pid_t so_pgid; /* pgid for signals */ … … 81 83 */ 82 84 struct sockbuf { 83 u_ longsb_cc; /* actual chars in buffer */84 u_ longsb_hiwat; /* max actual char count */85 u_ longsb_mbcnt; /* chars of mbufs used */86 u_ longsb_mbmax; /* max chars of mbufs to use */87 longsb_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 */ 88 90 struct mbuf *sb_mb; /* the mbuf chain */ 89 91 struct selinfo sb_sel; /* process selecting read/write */ 90 92 short sb_flags; /* flags, see below */ 91 u_longsb_timeo; /* timeout for read/write */93 int sb_timeo; /* timeout for read/write */ 92 94 void (*sb_wakeup) __P((struct socket *, caddr_t)); 93 95 caddr_t sb_wakeuparg; /* arg for above */ … … 103 105 104 106 caddr_t so_tpcb; /* Wisc. protocol control block XXX */ 105 void (*so_upcall) __P((struct socket *so, caddr_t arg, int waitf));106 caddr_tso_upcallarg; /* Arg for above */107 void (*so_upcall)(struct socket *, void *arg, int); 108 void *so_upcallarg; /* Arg for above */ 107 109 uid_t so_uid; /* who opened the socket */ 108 110 }; … … 215 217 * File operations on sockets. 216 218 */ 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));219 int soo_ioctl(struct file *fp, int cmd, caddr_t data, 220 struct proc *p); 221 int soo_select(struct file *fp, int which, struct proc *p); 222 int soo_stat(struct socket *so, struct stat *ub); 221 223 222 224 /* 223 225 * From uipc_socket and friends 224 226 */ 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));227 int getsock(struct filedesc *fdp, int fdes, struct file **fpp); 228 int sockargs(struct mbuf **mp, caddr_t buf, int buflen, int type); 229 void sbappend(struct sockbuf *sb, struct mbuf *m); 230 int sbappendaddr(struct sockbuf *sb, struct sockaddr *asa, 231 struct mbuf *m0, struct mbuf *control); 232 int sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, 233 struct mbuf *control); 234 void sbappendrecord(struct sockbuf *sb, struct mbuf *m0); 235 void sbcheck(struct sockbuf *sb); 236 void sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n); 235 237 struct 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); 239 void sbdrop(struct sockbuf *sb, int len); 240 void sbdroprecord(struct sockbuf *sb); 241 void sbflush(struct sockbuf *sb); 242 void sbinsertoob(struct sockbuf *sb, struct mbuf *m0); 243 void sbrelease(struct sockbuf *sb); 244 int sbreserve(struct sockbuf *sb, u_long cc); 245 int sbwait(struct sockbuf *sb); 246 int sb_lock(struct sockbuf *sb); 247 int soabort(struct socket *so); 248 int soaccept(struct socket *so, struct mbuf *nam); 249 int sobind(struct socket *so, struct mbuf *nam); 250 void socantrcvmore(struct socket *so); 251 void socantsendmore(struct socket *so); 252 int soclose(struct socket *so); 253 int soconnect(struct socket *so, struct mbuf *nam); 254 int soconnect2(struct socket *so1, struct socket *so2); 255 int socreate(int dom, struct socket **aso, int type, int proto, 256 struct proc *p); 257 int sodisconnect(struct socket *so); 258 void sofree(struct socket *so); 259 int sogetopt(struct socket *so, int level, int optname, 260 struct mbuf **mp); 261 void sohasoutofband(struct socket *so); 262 void soisconnected(struct socket *so); 263 void soisconnecting(struct socket *so); 264 void soisdisconnected(struct socket *so); 265 void soisdisconnecting(struct socket *so); 266 int solisten(struct socket *so, int backlog); 265 267 struct socket * 266 sodropablereq __P((struct socket *head));268 sodropablereq(struct socket *head); 267 269 struct 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); 271 int soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio, 272 struct mbuf **mp0, struct mbuf **controlp, int *flagsp); 273 int soreserve(struct socket *so, u_long sndcc, u_long rcvcc); 274 void sorflush(struct socket *so); 275 int sosend(struct socket *so, struct mbuf *addr, struct uio *uio, 276 struct mbuf *top, struct mbuf *control, int flags); 277 int sosetopt(struct socket *so, int level, int optname, 278 struct mbuf *m0); 279 int soshutdown(struct socket *so, int how); 280 void sowakeup(struct socket *so, struct sockbuf *sb); 279 281 #endif /* _KERNEL */ 280 282 -
cpukit/libnetworking/sys/sysctl.h
rbfa87f30 rd589e75 14 14 * notice, this list of conditions and the following disclaimer in the 15 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software17 * must display the following acknowledgement:18 * This product includes software developed by the University of19 * California, Berkeley and its contributors.20 16 * 4. Neither the name of the University nor the names of its contributors 21 17 * may be used to endorse or promote products derived from this software … … 35 31 * 36 32 * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 37 * $FreeBSD: src/sys/sys/sysctl.h,v 1.1 10 2002/10/20 22:48:08 phkExp $33 * $FreeBSD: src/sys/sys/sysctl.h,v 1.128 2004/04/07 04:19:49 imp Exp $ 38 34 */ 39 35 … … 53 49 */ 54 50 55 #define CTL_MAXNAME 12/* largest number of components supported */51 #define CTL_MAXNAME 24 /* largest number of components supported */ 56 52 57 53 /* … … 60 56 * levels defined below it, or it is a leaf of some particular 61 57 * 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. 63 59 */ 64 60 struct ctlname { … … 87 83 #define CTLFLAG_DYN 0x02000000 /* Dynamic oid - can be freed */ 88 84 #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)) 89 98 90 99 /* … … 127 136 size_t newidx; 128 137 int (*newfunc)(struct sysctl_req *, void *, size_t); 138 size_t validlen; 129 139 }; 130 140 … … 184 194 TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); 185 195 196 #define SYSCTL_NODE_CHILDREN(parent, name) \ 197 sysctl_##parent##_##name##_children 198 186 199 /* This constructs a "raw" MIB oid. */ 187 200 #define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ … … 196 209 /* This constructs a node from which other oids can hang. */ 197 210 #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); \ 199 212 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, \ 201 214 "N", descr) 202 215 … … 241 254 ptr, 0, sysctl_handle_long, "L", descr) 242 255 243 /* Oid for a long. The pointer must be non NULL. */256 /* Oid for an unsigned long. The pointer must be non NULL. */ 244 257 #define SYSCTL_ULONG(parent, nbr, name, access, ptr, val, descr) \ 245 258 SYSCTL_OID(parent, nbr, name, CTLTYPE_ULONG|(access), \ … … 404 417 #define KERN_PROC_RUID 6 /* by real uid */ 405 418 #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 */ 406 425 407 426 /* … … 573 592 extern char osrelease[]; 574 593 extern char ostype[]; 594 extern char kern_ident[]; 575 595 576 596 /* Dynamic oid handling */ … … 580 600 int (*handler) (SYSCTL_HANDLER_ARGS), 581 601 const char *fmt, const char *descr); 602 int sysctl_move_oid(struct sysctl_oid *oidp, 603 struct sysctl_oid_list *parent); 582 604 int sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse); 583 605 int sysctl_ctx_init(struct sysctl_ctx_list *clist); … … 601 623 int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, 602 624 int *nindx, struct sysctl_req *req); 603 voidsysctl_wire_old_buffer(struct sysctl_req *req, size_t len);625 int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); 604 626 605 627 #else /* !_KERNEL */
Note: See TracChangeset
for help on using the changeset viewer.