Annotation of 43BSDReno/sys/netinet/in_proto.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1982, 1986 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution is only permitted until one year after the first shipment
        !             6:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
        !             7:  * binary forms are permitted provided that: (1) source distributions retain
        !             8:  * this entire copyright notice and comment, and (2) distributions including
        !             9:  * binaries display the following acknowledgement:  This product includes
        !            10:  * software developed by the University of California, Berkeley and its
        !            11:  * contributors'' in the documentation or other materials provided with the
        !            12:  * distribution and in all advertising materials mentioning features or use
        !            13:  * of this software.  Neither the name of the University nor the names of
        !            14:  * its contributors may be used to endorse or promote products derived from
        !            15:  * this software without specific prior written permission.
        !            16:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            17:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            18:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            19:  *
        !            20:  *     @(#)in_proto.c  7.5 (Berkeley) 6/28/90
        !            21:  */
        !            22: 
        !            23: #include "param.h"
        !            24: #include "socket.h"
        !            25: #include "protosw.h"
        !            26: #include "domain.h"
        !            27: #include "mbuf.h"
        !            28: 
        !            29: #include "in.h"
        !            30: #include "in_systm.h"
        !            31: 
        !            32: /*
        !            33:  * TCP/IP protocol family: IP, ICMP, UDP, TCP.
        !            34:  */
        !            35: int    ip_output(),ip_ctloutput();
        !            36: int    ip_init(),ip_slowtimo(),ip_drain();
        !            37: int    icmp_input();
        !            38: int    udp_input(),udp_ctlinput();
        !            39: int    udp_usrreq();
        !            40: int    udp_init();
        !            41: int    tcp_input(),tcp_ctlinput();
        !            42: int    tcp_usrreq(),tcp_ctloutput();
        !            43: int    tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain();
        !            44: int    rip_input(),rip_output(),rip_ctloutput(), rip_usrreq();
        !            45: /*
        !            46:  * IMP protocol family: raw interface.
        !            47:  * Using the raw interface entry to get the timer routine
        !            48:  * in is a kludge.
        !            49:  */
        !            50: #include "imp.h"
        !            51: #if NIMP > 0
        !            52: int    rimp_output(), hostslowtimo();
        !            53: #endif
        !            54: 
        !            55: #ifdef NSIP
        !            56: int    idpip_input(), nsip_ctlinput();
        !            57: #endif
        !            58: 
        !            59: #ifdef TPIP
        !            60: int    tpip_input(), tpip_ctlinput(), tp_ctloutput(), tp_usrreq();
        !            61: int    tp_init(), tp_slowtimo(), tp_drain();
        !            62: #endif
        !            63: 
        !            64: #ifdef EON
        !            65: int    eoninput(), eonctlinput(), eonprotoinit();
        !            66: #endif EON
        !            67: 
        !            68: extern struct domain inetdomain;
        !            69: 
        !            70: struct protosw inetsw[] = {
        !            71: { 0,           &inetdomain,    0,              0,
        !            72:   0,           ip_output,      0,              0,
        !            73:   0,
        !            74:   ip_init,     0,              ip_slowtimo,    ip_drain,
        !            75: },
        !            76: { SOCK_DGRAM,  &inetdomain,    IPPROTO_UDP,    PR_ATOMIC|PR_ADDR,
        !            77:   udp_input,   0,              udp_ctlinput,   ip_ctloutput,
        !            78:   udp_usrreq,
        !            79:   udp_init,    0,              0,              0,
        !            80: },
        !            81: { SOCK_STREAM, &inetdomain,    IPPROTO_TCP,    PR_CONNREQUIRED|PR_WANTRCVD,
        !            82:   tcp_input,   0,              tcp_ctlinput,   tcp_ctloutput,
        !            83:   tcp_usrreq,
        !            84:   tcp_init,    tcp_fasttimo,   tcp_slowtimo,   tcp_drain,
        !            85: },
        !            86: { SOCK_RAW,    &inetdomain,    IPPROTO_RAW,    PR_ATOMIC|PR_ADDR,
        !            87:   rip_input,   rip_output,     0,              rip_ctloutput,
        !            88:   rip_usrreq,
        !            89:   0,           0,              0,              0,
        !            90: },
        !            91: { SOCK_RAW,    &inetdomain,    IPPROTO_ICMP,   PR_ATOMIC|PR_ADDR,
        !            92:   icmp_input,  rip_output,     0,              rip_ctloutput,
        !            93:   rip_usrreq,
        !            94:   0,           0,              0,              0,
        !            95: },
        !            96: #ifdef TPIP
        !            97: { SOCK_SEQPACKET,&inetdomain,  IPPROTO_TP,     PR_CONNREQUIRED|PR_WANTRCVD,
        !            98:   tpip_input,  0,              tpip_ctlinput,          tp_ctloutput,
        !            99:   tp_usrreq,
        !           100:   tp_init,     0,              tp_slowtimo,    tp_drain,
        !           101: },
        !           102: #endif
        !           103: /* EON (ISO CLNL over IP) */
        !           104: #ifdef EON
        !           105: { SOCK_RAW,    &inetdomain,    IPPROTO_EON,    0,
        !           106:   eoninput,    0,              eonctlinput,            0,
        !           107:   0,
        !           108:   eonprotoinit,        0,              0,              0,
        !           109: },
        !           110: #endif
        !           111: #ifdef NSIP
        !           112: { SOCK_RAW,    &inetdomain,    IPPROTO_IDP,    PR_ATOMIC|PR_ADDR,
        !           113:   idpip_input, rip_output,     nsip_ctlinput,  0,
        !           114:   rip_usrreq,
        !           115:   0,           0,              0,              0,
        !           116: },
        !           117: #endif
        !           118:        /* raw wildcard */
        !           119: { SOCK_RAW,    &inetdomain,    0,              PR_ATOMIC|PR_ADDR,
        !           120:   rip_input,   rip_output,     0,              rip_ctloutput,
        !           121:   rip_usrreq,
        !           122:   0,           0,              0,              0,
        !           123: },
        !           124: };
        !           125: 
        !           126: struct domain inetdomain =
        !           127:     { AF_INET, "internet", 0, 0, 0, 
        !           128:       inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };
        !           129: 
        !           130: #if NIMP > 0
        !           131: extern struct domain impdomain;
        !           132: 
        !           133: struct protosw impsw[] = {
        !           134: { SOCK_RAW,    &impdomain,     0,              PR_ATOMIC|PR_ADDR,
        !           135:   0,           rimp_output,    0,              0,
        !           136:   rip_usrreq,
        !           137:   0,           0,              hostslowtimo,   0,
        !           138: },
        !           139: };
        !           140: 
        !           141: struct domain impdomain =
        !           142:     { AF_IMPLINK, "imp", 0, 0, 0,
        !           143:       impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] };
        !           144: #endif
        !           145: 
        !           146: #include "hy.h"
        !           147: #if NHY > 0
        !           148: /*
        !           149:  * HYPERchannel protocol family: raw interface.
        !           150:  */
        !           151: int    rhy_output();
        !           152: extern struct domain hydomain;
        !           153: 
        !           154: struct protosw hysw[] = {
        !           155: { SOCK_RAW,    &hydomain,      0,              PR_ATOMIC|PR_ADDR,
        !           156:   0,           rhy_output,     0,              0,
        !           157:   rip_usrreq,
        !           158:   0,           0,              0,              0,
        !           159: },
        !           160: };
        !           161: 
        !           162: struct domain hydomain =
        !           163:     { AF_HYLINK, "hy", 0, 0, 0, hysw, &hysw[sizeof (hysw)/sizeof(hysw[0])] };
        !           164: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.