From 5e08cd1e82f243a1e82b6ccaf269e770f594bc1a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 22 Apr 2007 00:59:27 +0000 Subject: [PATCH] Just throw all the main arguments for syslink() into syslink_info and pass the structure. Do not pass the descriptor separately, do not pass a pointer to the structure size (just pass the size directly). The search routines just return one structure at a time so a return size field is not needed. Start revamping syslink() to make it more mbuf-centric. This work is very much still in progress. --- sys/kern/init_sysent.c | 4 +- sys/kern/kern_syslink.c | 350 +++++++++++++++++++++++++++++++++-------------- sys/kern/syscalls.c | 4 +- sys/kern/syscalls.master | 4 +- sys/sys/syscall-hide.h | 4 +- sys/sys/syscall.h | 4 +- sys/sys/syscall.mk | 4 +- sys/sys/syslink.h | 22 +-- sys/sys/sysproto.h | 9 +- sys/sys/sysunion.h | 4 +- 10 files changed, 279 insertions(+), 130 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 2592dfe984..9643f4d3c5 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/init_sysent.c,v 1.55 2007/04/16 17:40:13 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/kern/init_sysent.c,v 1.56 2007/04/22 00:59:25 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ #include "opt_compat.h" diff --git a/sys/kern/kern_syslink.c b/sys/kern/kern_syslink.c index 4d3c86ae4b..261ef18898 100644 --- a/sys/kern/kern_syslink.c +++ b/sys/kern/kern_syslink.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_syslink.c,v 1.8 2007/04/16 17:40:13 dillon Exp $ + * $DragonFly: src/sys/kern/kern_syslink.c,v 1.9 2007/04/22 00:59:25 dillon Exp $ */ /* * This module implements the syslink() system call and protocol which @@ -52,8 +52,13 @@ #include #include #include +#include +#include +#include +#include #include #include +#include #include @@ -71,21 +76,8 @@ RB_PROTOTYPE2(slrouter_rb_tree, slrouter, rbnode, RB_PROTOTYPE2(sldata_rb_tree, sldata, rbnode, rb_sldata_compare, int); -struct slrouter { - RB_ENTRY(slrouter) rbnode; /* list of routers */ - struct sldata_rb_tree sldata_rb_root; /* connections to router */ - sysid_t sysid; /* logical sysid of router */ - int flags; /* flags passed on create */ - int bits; /* accomodate connections */ - int count; /* number of connections */ - int refs; - alist_t bitmap; - char label[SYSLINK_LABEL_SIZE]; -}; - /* - * fileops interface. slbuf and sldata are also used in conjunction with a - * normal file descriptor. + * Fifo used to buffer broadcast packets */ struct slbuf { char *buf; @@ -95,16 +87,36 @@ struct slbuf { int windex; }; +/* + * Syslink Router abstraction + */ +struct slrouter { + RB_ENTRY(slrouter) rbnode; /* list of routers */ + struct sldata_rb_tree sldata_rb_root; /* connections to router */ + sysid_t sysid; /* logical sysid of router */ + int flags; /* flags passed on create */ + int bits; /* accomodate connections */ + int count; /* number of connections */ + int refs; + alist_t bitmap; + struct slbuf bbuf; /* broadcast buffer */ + char label[SYSLINK_LABEL_SIZE]; +}; + +/* + * Syslink Connection abstraction + */ struct sldata { RB_ENTRY(sldata) rbnode; struct slrouter *router; /* organizing router */ - struct slbuf rbuf; - struct slbuf wbuf; struct file *xfp; /* external file pointer */ + struct socket *xso; /* external socket */ struct lock rlock; /* synchronizing lock */ struct lock wlock; /* synchronizing lock */ - struct thread *rthread; /* xfp -> rbuf & process */ - struct thread *wthread; /* wbuf -> xfp */ + struct thread *rthread; /* helper thread */ + struct thread *wthread; /* helper thread */ + struct sockbuf sio; /* accumulate mbufs */ + int bindex; /* broadcast index */ int flags; /* connection flags */ int linkid; int bits; @@ -112,22 +124,14 @@ struct sldata { char label[SYSLINK_LABEL_SIZE]; }; -/* - * syslink kernel thread support flags - */ -#define SLF_RQUIT 0x0001 -#define SLF_WQUIT 0x0002 -#define SLF_RDONE 0x0004 -#define SLF_WDONE 0x0008 -#define SLF_DESTROYED 0x8000 - -#define SYSLINK_BUFSIZE (128*1024) +#define SYSLINK_BBUFSIZE (32*1024) +#define SYSLINK_SIOBUFSIZE (128*1024) static int rb_slrouter_compare(struct slrouter *r1, struct slrouter *r2); static int rb_sldata_compare(struct sldata *d1, struct sldata *d2); static int syslink_destroy(struct slrouter *slrouter); -static int syslink_add(struct slrouter *slrouter, int fd, +static int syslink_add(struct slrouter *slrouter, struct syslink_info *info, int *result); static int syslink_rem(struct slrouter *slrouter, struct sldata *sldata, struct syslink_info *info); @@ -144,8 +148,13 @@ static int syslink_ioctl(struct file *fp, u_long cmd, caddr_t data, static int syslink_poll(struct file *fp, int events, struct ucred *cred); static int syslink_kqfilter(struct file *fp, struct knote *kn); -static void syslink_rthread(void *arg); -static void syslink_wthread(void *arg); +static void syslink_rthread_so(void *arg); +static void syslink_rthread_fp(void *arg); +static void syslink_wthread_so(void *arg); +static void syslink_wthread_fp(void *arg); +static int syslink_getsubnet(struct sockaddr *sa); +static struct mbuf *syslink_parse_stream(struct sockbuf *sio); +static void syslink_route(struct slrouter *slrouter, int linkid, struct mbuf *m); static void slbuf_alloc(struct slbuf *buf, int bytes); static void slbuf_free(struct slbuf *buf); static void sldata_rels(struct sldata *sldata); @@ -255,7 +264,7 @@ syslink_cmd_find_callback(struct sldata *sldata, void *data) * (typically a pipe or a connected socket) with a sysid namespace, * or create a direct link. * - * syslink(int fd, int cmd, void *info, size_t *infosize) + * syslink(int cmd, struct syslink_info *info, size_t bytes) */ int sys_syslink(struct syslink_args *uap) @@ -277,7 +286,9 @@ sys_syslink(struct syslink_args *uap) return (error); /* - * Load and validate the info structure. Unloaded bytes are zerod out + * Load and validate the info structure. Unloaded bytes are zerod + * out. The label field must always be 0-filled, even if not used + * for a command. */ bzero(&info, sizeof(info)); if ((unsigned)uap->bytes <= sizeof(info)) { @@ -295,7 +306,6 @@ sys_syslink(struct syslink_args *uap) /* * Process command */ - switch(uap->cmd) { case SYSLINK_CMD_CREATE: /* @@ -318,6 +328,7 @@ sys_syslink(struct syslink_args *uap) slrouter->bits = info.bits; slrouter->flags = info.flags & SLIF_USERFLAGS; slrouter->bitmap = alist_create(1 << info.bits, M_SYSLINK); + slbuf_alloc(&slrouter->bbuf, SYSLINK_BBUFSIZE); RB_INIT(&slrouter->sldata_rb_root); RB_INSERT(slrouter_rb_tree, &slrouter_rb_root, slrouter); break; @@ -364,7 +375,7 @@ sys_syslink(struct syslink_args *uap) error = EIO; } else if (slrouter) { ++slrouter->refs; - error = syslink_add(slrouter, uap->fd, &info, + error = syslink_add(slrouter, &info, &uap->sysmsg_result); } else { error = EINVAL; @@ -421,13 +432,13 @@ int syslink_destroy_callback(struct sldata *sldata, void *data __unused) { ++sldata->refs; - if ((sldata->flags & SLF_RQUIT) == 0) { - sldata->flags |= SLF_RQUIT; - wakeup(&sldata->rbuf); + if ((sldata->flags & SLIF_RQUIT) == 0) { + sldata->flags |= SLIF_RQUIT; + wakeup(&sldata->rthread); } - if ((sldata->flags & SLF_WQUIT) == 0) { - sldata->flags |= SLF_WQUIT; - wakeup(&sldata->wbuf); + if ((sldata->flags & SLIF_WQUIT) == 0) { + sldata->flags |= SLIF_WQUIT; + wakeup(&sldata->wthread); } sldata_rels(sldata); return(0); @@ -459,7 +470,7 @@ syslink_destroy(struct slrouter *slrouter) static int -syslink_add(struct slrouter *slrouter, int fd, struct syslink_info *info, +syslink_add(struct slrouter *slrouter, struct syslink_info *info, int *result) { struct sldata *sldata; @@ -502,45 +513,52 @@ syslink_add(struct slrouter *slrouter, int fd, struct syslink_info *info, * Complete initialization of the physical route node. Setting * sldata->router activates the node. */ + sbinit(&sldata->sio, SYSLINK_SIOBUFSIZE); + sldata->bindex = slrouter->bbuf.windex; + sldata->flags = info->flags & SLIF_USERFLAGS; lockinit(&sldata->rlock, "slread", 0, 0); lockinit(&sldata->wlock, "slwrite", 0, 0); - if (fd < 0) { + if (info->fd < 0) { /* - * We create a direct syslink descriptor. Only the - * reader thread is needed. + * We create a direct syslink descriptor. No helper threads + * are needed. */ - error = falloc(curproc, &fp, &fd); + error = falloc(curproc, &fp, &info->fd); if (error == 0) { fp->f_type = DTYPE_SYSLINK; fp->f_flag = FREAD | FWRITE; fp->f_ops = &syslinkops; fp->f_data = sldata; - slbuf_alloc(&sldata->rbuf, SYSLINK_BUFSIZE); - slbuf_alloc(&sldata->wbuf, SYSLINK_BUFSIZE); - /* two refs: reader thread and fp descriptor */ - sldata->refs += 2; - sldata->flags = SLF_WQUIT | SLF_WDONE; - lwkt_create(syslink_rthread, sldata, - &sldata->rthread, NULL, - 0, -1, "syslink_r"); - fsetfd(curproc, fp, fd); + /* one ref: the fp descriptor */ + sldata->refs += 1; + sldata->flags |= SLIF_WQUIT | SLIF_WDONE; + sldata->flags |= SLIF_RQUIT | SLIF_RDONE; + fsetfd(curproc, fp, info->fd); fdrop(fp); - *result = fd; + *result = info->fd; } } else { - sldata->xfp = holdfp(curproc->p_fd, fd, -1); + sldata->xfp = holdfp(curproc->p_fd, info->fd, -1); if (sldata->xfp != NULL) { - slbuf_alloc(&sldata->rbuf, SYSLINK_BUFSIZE); - slbuf_alloc(&sldata->wbuf, SYSLINK_BUFSIZE); /* two refs: reader thread and writer thread */ sldata->refs += 2; - lwkt_create(syslink_rthread, sldata, - &sldata->rthread, NULL, - 0, -1, "syslink_r"); - lwkt_create(syslink_wthread, sldata, - &sldata->wthread, NULL, - 0, -1, "syslink_w"); + if (sldata->xfp->f_type == DTYPE_SOCKET) { + sldata->xso = (void *)sldata->xfp->f_data; + lwkt_create(syslink_rthread_so, sldata, + &sldata->rthread, NULL, + 0, -1, "syslink_r"); + lwkt_create(syslink_wthread_so, sldata, + &sldata->wthread, NULL, + 0, -1, "syslink_w"); + } else { + lwkt_create(syslink_rthread_fp, sldata, + &sldata->rthread, NULL, + 0, -1, "syslink_r"); + lwkt_create(syslink_wthread_fp, sldata, + &sldata->wthread, NULL, + 0, -1, "syslink_w"); + } } else { error = EBADF; } @@ -557,14 +575,14 @@ syslink_rem(struct slrouter *slrouter, struct sldata *sldata, { int error = EINPROGRESS; - if ((sldata->flags & SLF_RQUIT) == 0) { - sldata->flags |= SLF_RQUIT; - wakeup(&sldata->rbuf); + if ((sldata->flags & SLIF_RQUIT) == 0) { + sldata->flags |= SLIF_RQUIT; + wakeup(&sldata->rthread); error = 0; } - if ((sldata->flags & SLF_WQUIT) == 0) { - sldata->flags |= SLF_WQUIT; - wakeup(&sldata->wbuf); + if ((sldata->flags & SLIF_WQUIT) == 0) { + sldata->flags |= SLIF_WQUIT; + wakeup(&sldata->wthread); error = 0; } return(error); @@ -576,14 +594,99 @@ syslink_rem(struct slrouter *slrouter, struct sldata *sldata, */ static void -syslink_rthread(void *arg) +syslink_rthread_so(void *arg) { struct sldata *sldata = arg; - struct slbuf *slbuf = &sldata->rbuf; - struct syslink_msg *head; - const int min_msg_size = SL_MIN_MESSAGE_SIZE; + struct sockaddr *sa; + struct mbuf *m; + int soflags; + int linkid; + int error; + + while ((sldata->flags & SLIF_RQUIT) == 0) { + /* + * Read some data. This is easy if data is packetized, + * otherwise we can still obtain an mbuf chain but we have + * to parse out the syslink messages. + */ + soflags = 0; + sa = NULL; + error = so_pru_soreceive(sldata->xso, + (sldata->bits ? &sa : NULL), + NULL, &sldata->sio, + NULL, &soflags); + linkid = sldata->linkid; + if (sldata->bits && sa) { + linkid += syslink_getsubnet(sa) & + ((1 << sldata->bits) - 1); + FREE(sa, M_SONAME); + } + if (error) + break; + + if (sldata->flags & SLIF_PACKET) { + /* + * Packetized data + */ + m = sldata->sio.sb_mb; + sbinit(&sldata->sio, SYSLINK_SIOBUFSIZE); + if (m) + syslink_route(sldata->router, linkid, m); + } else { + while ((m = syslink_parse_stream(&sldata->sio)) != NULL) { + syslink_route(sldata->router, linkid, m); + } + } + } + + /* + * Mark us as done and deref sldata. Tell the writer to terminate as + * well. + */ + sbflush(&sldata->sio); + sldata->flags |= SLIF_RDONE; + if ((sldata->flags & SLIF_WDONE) == 0) { + sldata->flags |= SLIF_WQUIT; + wakeup(&sldata->wthread); + } + wakeup(&sldata->rthread); + wakeup(&sldata->wthread); + sldata_rels(sldata); +} + +static +void +syslink_rthread_fp(void *arg) +{ + struct sldata *sldata = arg; + + sldata->flags |= SLIF_RDONE; + if ((sldata->flags & SLIF_WDONE) == 0) { + sldata->flags |= SLIF_WQUIT; + wakeup(&sldata->wthread); + } + wakeup(&sldata->rthread); + wakeup(&sldata->wthread); + sldata_rels(sldata); +} + +static +struct mbuf * +syslink_parse_stream(struct sockbuf *sio) +{ + return(NULL); +} + +static +void +syslink_route(struct slrouter *slrouter, int linkid, struct mbuf *m) +{ + m_freem(m); +} + +#if 0 + - while ((sldata->flags & SLF_RQUIT) == 0) { int count; int used; int error; @@ -678,20 +781,10 @@ syslink_rthread(void *arg) break; } - /* - * Mark us as done and deref sldata. Tell the writer to terminate as - * well. - */ - sldata->flags |= SLF_RDONE; - if ((sldata->flags & SLF_WDONE) == 0) { - sldata->flags |= SLF_WQUIT; - wakeup(&sldata->wbuf); - } - wakeup(&sldata->rbuf); - wakeup(&sldata->wbuf); - sldata_rels(sldata); } +#endif + /* * This thread takes outgoing syslink messages queued to wbuf and writes them * to the descriptor. PAD is stripped. PAD is also added as required to @@ -699,14 +792,15 @@ syslink_rthread(void *arg) */ static void -syslink_wthread(void *arg) +syslink_wthread_so(void *arg) { struct sldata *sldata = arg; +#if 0 struct slbuf *slbuf = &sldata->wbuf; struct syslink_msg *head; int error; - while ((sldata->flags & SLF_WQUIT) == 0) { + while ((sldata->flags & SLIF_WQUIT) == 0) { error = 0; for (;;) { int aligned_reclen; @@ -761,7 +855,18 @@ syslink_wthread(void *arg) break; tsleep(slbuf, 0, "fifowt", 0); } - sldata->flags |= SLF_WDONE; +#endif + sldata->flags |= SLIF_WDONE; + sldata_rels(sldata); +} + +static +void +syslink_wthread_fp(void *arg) +{ + struct sldata *sldata = arg; + + sldata->flags |= SLIF_WDONE; sldata_rels(sldata); } @@ -796,8 +901,6 @@ sldata_rels(struct sldata *sldata) RB_REMOVE(sldata_rb_tree, &sldata->router->sldata_rb_root, sldata); sldata->router = NULL; - slbuf_free(&sldata->rbuf); - slbuf_free(&sldata->wbuf); kfree(sldata, M_SYSLINK); slrouter_rels(slrouter); } @@ -812,11 +915,43 @@ slrouter_rels(struct slrouter *slrouter) RB_REMOVE(slrouter_rb_tree, &slrouter_rb_root, slrouter); alist_destroy(slrouter->bitmap, M_SYSLINK); slrouter->bitmap = NULL; + slbuf_free(&slrouter->bbuf); kfree(slrouter, M_SYSLINK); } } /* + * A switched ethernet socket connected to a syslink router node may + * represent an entire subnet. We need to generate a subnet id from + * the originating IP address which the caller can then incorporate into + * the base linkid assigned to the connection to form the actual linkid + * originating the message. + */ +static +int +syslink_getsubnet(struct sockaddr *sa) +{ + struct in_addr *i4; + struct in6_addr *i6; + int linkid; + + switch(sa->sa_family) { + case AF_INET: + i4 = &((struct sockaddr_in *)sa)->sin_addr; + linkid = (int)ntohl(i4->s_addr); + break; + case AF_INET6: + i6 = &((struct sockaddr_in6 *)sa)->sin6_addr; + linkid = (int)ntohl(i6->s6_addr32[0]); /* XXX */ + break; + default: + linkid = 0; + break; + } + return(linkid); +} + +/* * fileops for an established syslink when the kernel is asked to create a * descriptor (verses one being handed to it). No threads are created in * this case. @@ -833,10 +968,11 @@ int syslink_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags) { struct sldata *sldata = fp->f_data; - struct slbuf *slbuf = &sldata->wbuf; +#if 0 struct syslink_msg *head; int bytes; int contig; +#endif int error; int nbio; @@ -850,7 +986,9 @@ syslink_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags) nbio = 0; lockmgr(&sldata->wlock, LK_EXCLUSIVE | LK_RETRY); + error = 0; +#if 0 /* * Calculate the number of bytes we can transfer in one shot. Transfers * do not wrap the FIFO. @@ -860,7 +998,7 @@ syslink_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags) bytes = slbuf->windex - slbuf->rindex; if (bytes) break; - if (sldata->flags & SLF_RDONE) { + if (sldata->flags & SLIF_RDONE) { error = EIO; break; } @@ -893,6 +1031,7 @@ syslink_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags) * Cleanup */ done: +#endif lockmgr(&sldata->wlock, LK_RELEASE); return (error); } @@ -907,10 +1046,12 @@ int syslink_write (struct file *fp, struct uio *uio, struct ucred *cred, int flags) { struct sldata *sldata = fp->f_data; +#if 0 struct slbuf *slbuf = &sldata->rbuf; struct syslink_msg *head; int bytes; int contig; +#endif int nbio; int error; @@ -924,7 +1065,9 @@ syslink_write (struct file *fp, struct uio *uio, struct ucred *cred, int flags) nbio = 0; lockmgr(&sldata->rlock, LK_EXCLUSIVE | LK_RETRY); + error = 0; +#if 0 /* * Calculate the maximum number of contiguous bytes that may be * available. Caller is required to not wrap our FIFO. @@ -945,7 +1088,7 @@ syslink_write (struct file *fp, struct uio *uio, struct ucred *cred, int flags) bytes = contig; if (uio->uio_resid <= bytes) break; - if (sldata->flags & SLF_RDONE) { + if (sldata->flags & SLIF_RDONE) { error = EIO; goto done; } @@ -965,6 +1108,7 @@ syslink_write (struct file *fp, struct uio *uio, struct ucred *cred, int flags) wakeup(slbuf); } done: +#endif lockmgr(&sldata->rlock, LK_RELEASE); return(error); } @@ -976,13 +1120,13 @@ syslink_close (struct file *fp) struct sldata *sldata; sldata = fp->f_data; - if ((sldata->flags & SLF_RQUIT) == 0) { - sldata->flags |= SLF_RQUIT; - wakeup(&sldata->rbuf); + if ((sldata->flags & SLIF_RQUIT) == 0) { + sldata->flags |= SLIF_RQUIT; + wakeup(&sldata->rthread); } - if ((sldata->flags & SLF_WQUIT) == 0) { - sldata->flags |= SLF_WQUIT; - wakeup(&sldata->wbuf); + if ((sldata->flags & SLIF_WQUIT) == 0) { + sldata->flags |= SLIF_WQUIT; + wakeup(&sldata->wthread); } fp->f_data = NULL; sldata_rels(sldata); diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 3b643735a1..5548964cea 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/syscalls.c,v 1.54 2007/04/16 17:40:13 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/kern/syscalls.c,v 1.55 2007/04/22 00:59:25 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ char *syscallnames[] = { diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index eb7cb9f4f6..64d8a88bfa 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp $ + $DragonFly: src/sys/kern/syscalls.master,v 1.54 2007/04/22 00:59:25 dillon Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $ @@ -658,7 +658,7 @@ int bytes); } 482 STD BSD { int extaccept(int s, int flags, caddr_t name, int *anamelen); } 483 STD BSD { int extconnect(int s, int flags, caddr_t name, int namelen); } -484 STD BSD { int syslink(int fd, int cmd, void *info, int bytes); } +484 STD BSD { int syslink(int cmd, struct syslink_info *info, size_t bytes); } 485 STD BSD { int mcontrol(void *addr, size_t len, int behav, off_t value); } 486 STD BSD { int vmspace_create(void *id, int type, void *data); } 487 STD BSD { int vmspace_destroy(void *id); } diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h index ab700e9bec..a20d9845c9 100644 --- a/sys/sys/syscall-hide.h +++ b/sys/sys/syscall-hide.h @@ -2,8 +2,8 @@ * System call hiders. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall-hide.h,v 1.55 2007/04/16 17:40:16 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/sys/syscall-hide.h,v 1.56 2007/04/22 00:59:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ #ifdef COMPAT_43 diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index c63cf642c2..50beaa1a4f 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall.h,v 1.55 2007/04/16 17:40:16 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/sys/syscall.h,v 1.56 2007/04/22 00:59:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ #define SYS_syscall 0 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 1793a95af8..ab742e978f 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,7 +1,7 @@ # DragonFly system call names. # DO NOT EDIT-- this file is automatically generated. -# $DragonFly: src/sys/sys/syscall.mk,v 1.55 2007/04/16 17:40:16 dillon Exp $ -# created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp +# $DragonFly: src/sys/sys/syscall.mk,v 1.56 2007/04/22 00:59:27 dillon Exp $ +# created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp MIASM = \ syscall.o \ exit.o \ diff --git a/sys/sys/syslink.h b/sys/sys/syslink.h index 1695b1e8fb..b0474cb3a1 100644 --- a/sys/sys/syslink.h +++ b/sys/sys/syslink.h @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/syslink.h,v 1.5 2007/04/16 17:40:16 dillon Exp $ + * $DragonFly: src/sys/sys/syslink.h,v 1.6 2007/04/22 00:59:27 dillon Exp $ */ /* @@ -196,10 +196,13 @@ typedef int (*syslink_func_t)(struct syslink_generic_args *); * linkage. */ struct syslink_info { - sysid_t sysid; /* route node sysid */ + int version; /* info control structure version */ + int fd; /* file descriptor (CMD_ADD) */ int linkid; /* linkid (base physical address) */ int bits; /* physical address bits if switched */ int flags; /* message control/switch flags */ + int reserved01; + sysid_t sysid; /* route node sysid */ char label[SYSLINK_LABEL_SIZE]; /* symbolic name */ char reserved[32]; union { @@ -207,14 +210,17 @@ struct syslink_info { } u; }; -#define SLIF_PACKET 0x0001 /* packetized, else stream */ -#define SLIF_SENDTO 0x0002 /* use sendto() */ +#define SLIF_PACKET 0x0001 /* packetized, else stream */ #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) -#define SLIF_DESTROYED 0x4000 -#define SLIF_ERROR 0x8000 +#define SLIF_RQUIT 0x0400 +#define SLIF_WQUIT 0x0800 +#define SLIF_RDONE 0x1000 +#define SLIF_WDONE 0x2000 +#define SLIF_DESTROYED 0x4000 +#define SLIF_ERROR 0x8000 #endif -#define SLIF_USERFLAGS (SLIF_PACKET|SLIF_SENDTO) +#define SLIF_USERFLAGS (SLIF_PACKET) /* @@ -308,7 +314,7 @@ typedef struct syslink_proto *syslink_proto_t; typedef struct syslink_generic_args *syslink_generic_args_t; #if !defined(_KERNEL) -int syslink(int, int, sysid_t, void *, size_t *); +int syslink(int, struct syslink_info *, size_t); #endif #endif diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 16e74ec1c3..f831a23ce1 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysproto.h,v 1.55 2007/04/16 17:40:16 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/sys/sysproto.h,v 1.56 2007/04/22 00:59:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ #ifndef _SYS_SYSPROTO_H_ @@ -1981,10 +1981,9 @@ struct syslink_args { #ifdef _KERNEL struct sysmsg sysmsg; #endif - int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; - void * info; char info_[PAD_(void *)]; - int bytes; char bytes_[PAD_(int)]; + struct syslink_info * info; char info_[PAD_(struct syslink_info *)]; + size_t bytes; char bytes_[PAD_(size_t)]; }; struct mcontrol_args { #ifdef _KERNEL diff --git a/sys/sys/sysunion.h b/sys/sys/sysunion.h index 8cd79bc178..8660fc726a 100644 --- a/sys/sys/sysunion.h +++ b/sys/sys/sysunion.h @@ -2,8 +2,8 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysunion.h,v 1.52 2007/04/16 17:40:16 dillon Exp $ - * created from DragonFly: src/sys/kern/syscalls.master,v 1.52 2007/03/21 20:06:34 dillon Exp + * $DragonFly: src/sys/sys/sysunion.h,v 1.53 2007/04/22 00:59:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.53 2007/04/16 17:40:13 dillon Exp */ union sysunion { -- 2.11.4.GIT