[BACK]Return to raw_ip.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Annotation of src/sys/netinet/raw_ip.c, Revision 1.42.6.1

1.42.6.1! itojun      1: /*     $NetBSD: raw_ip.c,v 1.42 1999/01/30 21:43:16 thorpej Exp $      */
1.14      cgd         2:
1.1       cgd         3: /*
1.13      mycroft     4:  * Copyright (c) 1982, 1986, 1988, 1993
                      5:  *     The Regents of the University of California.  All rights reserved.
1.1       cgd         6:  *
                      7:  * Redistribution and use in source and binary forms, with or without
                      8:  * modification, are permitted provided that the following conditions
                      9:  * are met:
                     10:  * 1. Redistributions of source code must retain the above copyright
                     11:  *    notice, this list of conditions and the following disclaimer.
                     12:  * 2. Redistributions in binary form must reproduce the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer in the
                     14:  *    documentation and/or other materials provided with the distribution.
                     15:  * 3. All advertising materials mentioning features or use of this software
                     16:  *    must display the following acknowledgement:
                     17:  *     This product includes software developed by the University of
                     18:  *     California, Berkeley and its contributors.
                     19:  * 4. Neither the name of the University nor the names of its contributors
                     20:  *    may be used to endorse or promote products derived from this software
                     21:  *    without specific prior written permission.
                     22:  *
                     23:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     24:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     25:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     26:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     27:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     28:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     29:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     30:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     31:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     32:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     33:  * SUCH DAMAGE.
                     34:  *
1.39      thorpej    35:  *     @(#)raw_ip.c    8.7 (Berkeley) 5/15/95
1.1       cgd        36:  */
1.40      scottr     37:
                     38: #include "opt_mrouting.h"
1.1       cgd        39:
1.7       mycroft    40: #include <sys/param.h>
                     41: #include <sys/malloc.h>
                     42: #include <sys/mbuf.h>
                     43: #include <sys/socket.h>
                     44: #include <sys/protosw.h>
                     45: #include <sys/socketvar.h>
                     46: #include <sys/errno.h>
1.13      mycroft    47: #include <sys/systm.h>
1.26      mycroft    48: #include <sys/proc.h>
1.1       cgd        49:
1.7       mycroft    50: #include <net/if.h>
                     51: #include <net/route.h>
1.1       cgd        52:
1.7       mycroft    53: #include <netinet/in.h>
                     54: #include <netinet/in_systm.h>
                     55: #include <netinet/ip.h>
                     56: #include <netinet/ip_var.h>
1.13      mycroft    57: #include <netinet/ip_mroute.h>
1.7       mycroft    58: #include <netinet/in_pcb.h>
1.24      christos   59: #include <netinet/in_var.h>
                     60:
                     61: #include <machine/stdarg.h>
1.13      mycroft    62:
1.42.6.1! itojun     63: #ifdef IPSEC
        !            64: #include <netinet6/ipsec.h>
        !            65: #endif /*IPSEC*/
        !            66:
1.20      mycroft    67: struct inpcbtable rawcbtable;
1.30      pk         68:
                     69: int     rip_bind __P((struct inpcb *, struct mbuf *));
                     70: int     rip_connect __P((struct inpcb *, struct mbuf *));
                     71: void    rip_disconnect __P((struct inpcb *));
1.13      mycroft    72:
                     73: /*
                     74:  * Nominal space allocated to a raw ip socket.
                     75:  */
                     76: #define        RIPSNDQ         8192
                     77: #define        RIPRCVQ         8192
1.1       cgd        78:
                     79: /*
                     80:  * Raw interface to IP protocol.
                     81:  */
1.13      mycroft    82:
                     83: /*
                     84:  * Initialize raw connection block q.
                     85:  */
                     86: void
                     87: rip_init()
                     88: {
                     89:
1.33      mycroft    90:        in_pcbinit(&rawcbtable, 1, 1);
1.13      mycroft    91: }
                     92:
1.42.6.1! itojun     93: static struct  sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
        !            94:
1.1       cgd        95: /*
                     96:  * Setup generic address and protocol structures
                     97:  * for raw_input routine, then pass them along with
                     98:  * mbuf chain.
                     99:  */
1.9       mycroft   100: void
1.24      christos  101: #if __STDC__
                    102: rip_input(struct mbuf *m, ...)
                    103: #else
                    104: rip_input(m, va_alist)
1.1       cgd       105:        struct mbuf *m;
1.24      christos  106:        va_dcl
                    107: #endif
1.1       cgd       108: {
1.42.6.1! itojun    109:        int off, proto;
1.1       cgd       110:        register struct ip *ip = mtod(m, struct ip *);
1.13      mycroft   111:        register struct inpcb *inp;
1.36      thorpej   112:        struct inpcb *last = 0;
                    113:        struct mbuf *opts = 0;
1.32      mycroft   114:        struct sockaddr_in ripsrc;
1.42.6.1! itojun    115:        va_list ap;
        !           116:
        !           117:        va_start(ap, m);
        !           118:        off = va_arg(ap, int);
        !           119:        proto = va_arg(ap, int);
        !           120:        va_end(ap);
1.1       cgd       121:
1.32      mycroft   122:        ripsrc.sin_family = AF_INET;
                    123:        ripsrc.sin_len = sizeof(struct sockaddr_in);
1.1       cgd       124:        ripsrc.sin_addr = ip->ip_src;
1.34      mycroft   125:        ripsrc.sin_port = 0;
                    126:        bzero((caddr_t)ripsrc.sin_zero, sizeof(ripsrc.sin_zero));
1.42      thorpej   127:
                    128:        /*
                    129:         * XXX Compatibility: programs using raw IP expect ip_len
                    130:         * XXX to have the header length subtracted.
                    131:         */
                    132:        ip->ip_len -= ip->ip_hl << 2;
1.32      mycroft   133:
1.21      cgd       134:        for (inp = rawcbtable.inpt_queue.cqh_first;
                    135:            inp != (struct inpcb *)&rawcbtable.inpt_queue;
                    136:            inp = inp->inp_queue.cqe_next) {
1.42.6.1! itojun    137:                if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != proto)
1.13      mycroft   138:                        continue;
1.32      mycroft   139:                if (!in_nullhost(inp->inp_laddr) &&
                    140:                    !in_hosteq(inp->inp_laddr, ip->ip_dst))
1.13      mycroft   141:                        continue;
1.32      mycroft   142:                if (!in_nullhost(inp->inp_faddr) &&
                    143:                    !in_hosteq(inp->inp_faddr, ip->ip_src))
1.13      mycroft   144:                        continue;
                    145:                if (last) {
                    146:                        struct mbuf *n;
1.24      christos  147:                        if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) {
1.36      thorpej   148:                                if (last->inp_flags & INP_CONTROLOPTS ||
                    149:                                    last->inp_socket->so_options & SO_TIMESTAMP)
                    150:                                        ip_savecontrol(last, &opts, ip, n);
                    151:                                if (sbappendaddr(&last->inp_socket->so_rcv,
                    152:                                    sintosa(&ripsrc), n, opts) == 0) {
1.13      mycroft   153:                                        /* should notify about lost packet */
                    154:                                        m_freem(n);
1.36      thorpej   155:                                        if (opts)
                    156:                                                m_freem(opts);
                    157:                                } else
                    158:                                        sorwakeup(last->inp_socket);
1.41      thorpej   159:                                opts = NULL;
1.13      mycroft   160:                        }
                    161:                }
1.36      thorpej   162:                last = inp;
1.13      mycroft   163:        }
                    164:        if (last) {
1.36      thorpej   165:                if (last->inp_flags & INP_CONTROLOPTS ||
                    166:                    last->inp_socket->so_options & SO_TIMESTAMP)
                    167:                        ip_savecontrol(last, &opts, ip, m);
                    168:                if (sbappendaddr(&last->inp_socket->so_rcv,
                    169:                    sintosa(&ripsrc), m, opts) == 0) {
1.13      mycroft   170:                        m_freem(m);
1.36      thorpej   171:                        if (opts)
                    172:                                m_freem(opts);
                    173:                } else
                    174:                        sorwakeup(last->inp_socket);
1.13      mycroft   175:        } else {
                    176:                m_freem(m);
1.1       cgd       177:                ipstat.ips_noproto++;
                    178:                ipstat.ips_delivered--;
                    179:        }
1.42.6.1! itojun    180:        return;
1.1       cgd       181: }
                    182:
                    183: /*
                    184:  * Generate IP header and pass packet to ip_output.
                    185:  * Tack on options user may have setup with control call.
                    186:  */
1.9       mycroft   187: int
1.24      christos  188: #if __STDC__
                    189: rip_output(struct mbuf *m, ...)
                    190: #else
                    191: rip_output(m, va_alist)
                    192:        struct mbuf *m;
                    193:        va_dcl
                    194: #endif
                    195: {
1.27      mycroft   196:        register struct inpcb *inp;
1.1       cgd       197:        register struct ip *ip;
1.10      mycroft   198:        struct mbuf *opts;
1.24      christos  199:        int flags;
                    200:        va_list ap;
                    201:
                    202:        va_start(ap, m);
1.27      mycroft   203:        inp = va_arg(ap, struct inpcb *);
1.24      christos  204:        va_end(ap);
                    205:
1.27      mycroft   206:        flags =
1.37      matt      207:            (inp->inp_socket->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST
                    208:            | IP_RETURNMTU;
1.1       cgd       209:
                    210:        /*
                    211:         * If the user handed us a complete IP packet, use it.
                    212:         * Otherwise, allocate an mbuf for a header and fill it in.
                    213:         */
1.13      mycroft   214:        if ((inp->inp_flags & INP_HDRINCL) == 0) {
1.35      thorpej   215:                if ((m->m_pkthdr.len + sizeof(struct ip)) > IP_MAXPACKET) {
                    216:                        m_freem(m);
                    217:                        return (EMSGSIZE);
                    218:                }
1.1       cgd       219:                M_PREPEND(m, sizeof(struct ip), M_WAIT);
                    220:                ip = mtod(m, struct ip *);
                    221:                ip->ip_tos = 0;
                    222:                ip->ip_off = 0;
1.13      mycroft   223:                ip->ip_p = inp->inp_ip.ip_p;
1.1       cgd       224:                ip->ip_len = m->m_pkthdr.len;
1.13      mycroft   225:                ip->ip_src = inp->inp_laddr;
1.27      mycroft   226:                ip->ip_dst = inp->inp_faddr;
1.1       cgd       227:                ip->ip_ttl = MAXTTL;
1.13      mycroft   228:                opts = inp->inp_options;
                    229:        } else {
1.35      thorpej   230:                if (m->m_pkthdr.len > IP_MAXPACKET) {
                    231:                        m_freem(m);
                    232:                        return (EMSGSIZE);
                    233:                }
1.13      mycroft   234:                ip = mtod(m, struct ip *);
1.38      mycroft   235:                if (m->m_pkthdr.len != ip->ip_len) {
                    236:                        m_freem(m);
                    237:                        return (EINVAL);
                    238:                }
1.13      mycroft   239:                if (ip->ip_id == 0)
                    240:                        ip->ip_id = htons(ip_id++);
                    241:                opts = NULL;
                    242:                /* XXX prevent ip_output from overwriting header fields */
                    243:                flags |= IP_RAWOUTPUT;
                    244:                ipstat.ips_rawout++;
1.1       cgd       245:        }
1.42.6.1! itojun    246: #ifdef IPSEC
        !           247:        m->m_pkthdr.rcvif = (struct ifnet *)inp->inp_socket;    /*XXX*/
        !           248: #endif /*IPSEC*/
1.37      matt      249:        return (ip_output(m, opts, &inp->inp_route, flags, inp->inp_moptions, &inp->inp_errormtu));
1.1       cgd       250: }
                    251:
                    252: /*
                    253:  * Raw IP socket option processing.
                    254:  */
1.9       mycroft   255: int
1.1       cgd       256: rip_ctloutput(op, so, level, optname, m)
                    257:        int op;
                    258:        struct socket *so;
                    259:        int level, optname;
                    260:        struct mbuf **m;
                    261: {
1.13      mycroft   262:        register struct inpcb *inp = sotoinpcb(so);
1.31      mycroft   263:        int error = 0;
1.1       cgd       264:
1.15      mycroft   265:        if (level != IPPROTO_IP) {
1.31      mycroft   266:                error = ENOPROTOOPT;
                    267:                if (op == PRCO_SETOPT && *m != 0)
                    268:                        (void) m_free(*m);
                    269:        } else switch (op) {
                    270:
                    271:        case PRCO_SETOPT:
                    272:                switch (optname) {
                    273:                case IP_HDRINCL:
                    274:                        if (*m == 0 || (*m)->m_len < sizeof (int))
                    275:                                error = EINVAL;
                    276:                        else {
1.13      mycroft   277:                                if (*mtod(*m, int *))
                    278:                                        inp->inp_flags |= INP_HDRINCL;
                    279:                                else
                    280:                                        inp->inp_flags &= ~INP_HDRINCL;
                    281:                        }
1.31      mycroft   282:                        if (*m != 0)
                    283:                                (void) m_free(*m);
                    284:                        break;
                    285:
                    286: #ifdef MROUTING
                    287:                case MRT_INIT:
                    288:                case MRT_DONE:
                    289:                case MRT_ADD_VIF:
                    290:                case MRT_DEL_VIF:
                    291:                case MRT_ADD_MFC:
                    292:                case MRT_DEL_MFC:
                    293:                case MRT_ASSERT:
                    294:                        error = ip_mrouter_set(so, optname, m);
                    295:                        break;
                    296: #endif
                    297:
                    298:                default:
                    299:                        error = ip_ctloutput(op, so, level, optname, m);
                    300:                        break;
1.13      mycroft   301:                }
                    302:                break;
1.1       cgd       303:
1.31      mycroft   304:        case PRCO_GETOPT:
                    305:                switch (optname) {
                    306:                case IP_HDRINCL:
                    307:                        *m = m_get(M_WAIT, M_SOOPTS);
                    308:                        (*m)->m_len = sizeof (int);
                    309:                        *mtod(*m, int *) = inp->inp_flags & INP_HDRINCL ? 1 : 0;
                    310:                        break;
                    311:
1.6       hpeyerl   312: #ifdef MROUTING
1.31      mycroft   313:                case MRT_VERSION:
                    314:                case MRT_ASSERT:
                    315:                        error = ip_mrouter_get(so, optname, m);
1.18      mycroft   316:                        break;
1.31      mycroft   317: #endif
                    318:
1.18      mycroft   319:                default:
1.31      mycroft   320:                        error = ip_ctloutput(op, so, level, optname, m);
1.18      mycroft   321:                        break;
                    322:                }
1.31      mycroft   323:                break;
1.1       cgd       324:        }
1.31      mycroft   325:        return (error);
1.1       cgd       326: }
                    327:
1.27      mycroft   328: int
1.29      mycroft   329: rip_bind(inp, nam)
                    330:        struct inpcb *inp;
                    331:        struct mbuf *nam;
                    332: {
                    333:        struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
                    334:
                    335:        if (nam->m_len != sizeof(*addr))
                    336:                return (EINVAL);
                    337:        if (ifnet.tqh_first == 0)
                    338:                return (EADDRNOTAVAIL);
                    339:        if (addr->sin_family != AF_INET &&
                    340:            addr->sin_family != AF_IMPLINK)
                    341:                return (EAFNOSUPPORT);
1.32      mycroft   342:        if (!in_nullhost(addr->sin_addr) &&
1.29      mycroft   343:            ifa_ifwithaddr(sintosa(addr)) == 0)
                    344:                return (EADDRNOTAVAIL);
                    345:        inp->inp_laddr = addr->sin_addr;
                    346:        return (0);
                    347: }
                    348:
                    349: int
1.27      mycroft   350: rip_connect(inp, nam)
                    351:        struct inpcb *inp;
                    352:        struct mbuf *nam;
                    353: {
                    354:        struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
                    355:
                    356:        if (nam->m_len != sizeof(*addr))
                    357:                return (EINVAL);
                    358:        if (ifnet.tqh_first == 0)
                    359:                return (EADDRNOTAVAIL);
                    360:        if (addr->sin_family != AF_INET &&
                    361:            addr->sin_family != AF_IMPLINK)
                    362:                return (EAFNOSUPPORT);
                    363:        inp->inp_faddr = addr->sin_addr;
                    364:        return (0);
                    365: }
                    366:
                    367: void
                    368: rip_disconnect(inp)
                    369:        struct inpcb *inp;
                    370: {
                    371:
1.32      mycroft   372:        inp->inp_faddr = zeroin_addr;
1.27      mycroft   373: }
                    374:
1.13      mycroft   375: u_long rip_sendspace = RIPSNDQ;
                    376: u_long rip_recvspace = RIPRCVQ;
                    377:
1.1       cgd       378: /*ARGSUSED*/
1.9       mycroft   379: int
1.26      mycroft   380: rip_usrreq(so, req, m, nam, control, p)
1.1       cgd       381:        register struct socket *so;
                    382:        int req;
1.2       cgd       383:        struct mbuf *m, *nam, *control;
1.26      mycroft   384:        struct proc *p;
1.1       cgd       385: {
1.27      mycroft   386:        register struct inpcb *inp;
                    387:        int s;
1.1       cgd       388:        register int error = 0;
1.13      mycroft   389: #ifdef MROUTING
1.6       hpeyerl   390:        extern struct socket *ip_mrouter;
                    391: #endif
1.27      mycroft   392:
1.22      pk        393:        if (req == PRU_CONTROL)
                    394:                return (in_control(so, (long)m, (caddr_t)nam,
1.26      mycroft   395:                    (struct ifnet *)control, p));
1.22      pk        396:
1.27      mycroft   397:        s = splsoftnet();
                    398:        inp = sotoinpcb(so);
1.28      mycroft   399: #ifdef DIAGNOSTIC
                    400:        if (req != PRU_SEND && req != PRU_SENDOOB && control)
                    401:                panic("rip_usrreq: unexpected control mbuf");
                    402: #endif
1.27      mycroft   403:        if (inp == 0 && req != PRU_ATTACH) {
1.22      pk        404:                error = EINVAL;
                    405:                goto release;
                    406:        }
                    407:
1.1       cgd       408:        switch (req) {
                    409:
                    410:        case PRU_ATTACH:
1.27      mycroft   411:                if (inp != 0) {
                    412:                        error = EISCONN;
                    413:                        break;
                    414:                }
1.26      mycroft   415:                if (p == 0 || (error = suser(p->p_ucred, &p->p_acflag))) {
1.13      mycroft   416:                        error = EACCES;
                    417:                        break;
                    418:                }
1.27      mycroft   419:                if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
                    420:                        error = soreserve(so, rip_sendspace, rip_recvspace);
                    421:                        if (error)
                    422:                                break;
                    423:                }
                    424:                error = in_pcballoc(so, &rawcbtable);
                    425:                if (error)
1.13      mycroft   426:                        break;
1.27      mycroft   427:                inp = sotoinpcb(so);
1.17      cgd       428:                inp->inp_ip.ip_p = (long)nam;
1.42.6.1! itojun    429: #ifdef IPSEC
        !           430:                error = ipsec_init_policy(&inp->inp_sp);
        !           431: #endif /*IPSEC*/
1.1       cgd       432:                break;
                    433:
                    434:        case PRU_DETACH:
1.13      mycroft   435: #ifdef MROUTING
1.6       hpeyerl   436:                if (so == ip_mrouter)
                    437:                        ip_mrouter_done();
                    438: #endif
1.13      mycroft   439:                in_pcbdetach(inp);
1.1       cgd       440:                break;
                    441:
                    442:        case PRU_BIND:
1.29      mycroft   443:                error = rip_bind(inp, nam);
1.27      mycroft   444:                break;
                    445:
                    446:        case PRU_LISTEN:
                    447:                error = EOPNOTSUPP;
                    448:                break;
                    449:
                    450:        case PRU_CONNECT:
                    451:                error = rip_connect(inp, nam);
                    452:                if (error)
1.13      mycroft   453:                        break;
1.1       cgd       454:                soisconnected(so);
1.13      mycroft   455:                break;
                    456:
                    457:        case PRU_CONNECT2:
                    458:                error = EOPNOTSUPP;
                    459:                break;
                    460:
1.27      mycroft   461:        case PRU_DISCONNECT:
                    462:                soisdisconnected(so);
                    463:                rip_disconnect(inp);
                    464:                break;
                    465:
1.13      mycroft   466:        /*
                    467:         * Mark the connection as being incapable of further input.
                    468:         */
                    469:        case PRU_SHUTDOWN:
                    470:                socantsendmore(so);
                    471:                break;
                    472:
1.27      mycroft   473:        case PRU_RCVD:
                    474:                error = EOPNOTSUPP;
                    475:                break;
                    476:
1.13      mycroft   477:        /*
                    478:         * Ship a packet out.  The appropriate raw output
                    479:         * routine handles any massaging necessary.
                    480:         */
                    481:        case PRU_SEND:
1.28      mycroft   482:                if (control && control->m_len) {
                    483:                        m_freem(control);
                    484:                        m_freem(m);
                    485:                        error = EINVAL;
                    486:                        break;
                    487:                }
                    488:        {
1.27      mycroft   489:                if (nam) {
                    490:                        if ((so->so_state & SS_ISCONNECTED) != 0) {
1.13      mycroft   491:                                error = EISCONN;
1.28      mycroft   492:                                goto die;
1.13      mycroft   493:                        }
1.27      mycroft   494:                        error = rip_connect(inp, nam);
                    495:                        if (error) {
1.28      mycroft   496:                        die:
1.27      mycroft   497:                                m_freem(m);
                    498:                                break;
                    499:                        }
1.13      mycroft   500:                } else {
1.27      mycroft   501:                        if ((so->so_state & SS_ISCONNECTED) == 0) {
1.13      mycroft   502:                                error = ENOTCONN;
1.28      mycroft   503:                                goto die;
1.13      mycroft   504:                        }
                    505:                }
1.27      mycroft   506:                error = rip_output(m, inp);
                    507:                if (nam)
                    508:                        rip_disconnect(inp);
1.28      mycroft   509:        }
1.13      mycroft   510:                break;
                    511:
                    512:        case PRU_SENSE:
                    513:                /*
                    514:                 * stat: don't bother with a blocksize.
                    515:                 */
1.27      mycroft   516:                splx(s);
1.1       cgd       517:                return (0);
1.13      mycroft   518:
                    519:        case PRU_RCVOOB:
1.27      mycroft   520:                error = EOPNOTSUPP;
                    521:                break;
                    522:
1.13      mycroft   523:        case PRU_SENDOOB:
1.28      mycroft   524:                m_freem(control);
1.27      mycroft   525:                m_freem(m);
1.13      mycroft   526:                error = EOPNOTSUPP;
                    527:                break;
                    528:
                    529:        case PRU_SOCKADDR:
                    530:                in_setsockaddr(inp, nam);
                    531:                break;
                    532:
                    533:        case PRU_PEERADDR:
                    534:                in_setpeeraddr(inp, nam);
                    535:                break;
                    536:
                    537:        default:
                    538:                panic("rip_usrreq");
1.1       cgd       539:        }
1.27      mycroft   540:
1.22      pk        541: release:
1.27      mycroft   542:        splx(s);
1.1       cgd       543:        return (error);
                    544: }

CVSweb <webmaster@jp.NetBSD.org>