The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netiso/clnp.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: clnp.h,v 1.16 2003/08/07 16:33:32 agc Exp $    */
    2 
    3 /*-
    4  * Copyright (c) 1991, 1993, 1994
    5  *      The Regents of the University of California.  All rights reserved.
    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. Neither the name of the University nor the names of its contributors
   16  *    may be used to endorse or promote products derived from this software
   17  *    without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   29  * SUCH DAMAGE.
   30  *
   31  *      @(#)clnp.h      8.2 (Berkeley) 4/16/94
   32  */
   33 
   34 /***********************************************************
   35                 Copyright IBM Corporation 1987
   36 
   37                       All Rights Reserved
   38 
   39 Permission to use, copy, modify, and distribute this software and its
   40 documentation for any purpose and without fee is hereby granted,
   41 provided that the above copyright notice appear in all copies and that
   42 both that copyright notice and this permission notice appear in
   43 supporting documentation, and that the name of IBM not be
   44 used in advertising or publicity pertaining to distribution of the
   45 software without specific, written prior permission.
   46 
   47 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
   48 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
   49 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
   50 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   51 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
   52 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
   53 SOFTWARE.
   54 
   55 ******************************************************************/
   56 
   57 /*
   58  * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
   59  */
   60 
   61 /* should be config option but cpp breaks with too many #defines */
   62 #define DECBIT
   63 
   64 /*
   65  *      Return true if the mbuf is a cluster mbuf
   66  */
   67 #define IS_CLUSTER(m)   ((m)->m_flags & M_EXT)
   68 
   69 /*
   70  *      Move the halfword into the two characters
   71  */
   72 #define HTOC(msb, lsb, hword)\
   73         (msb) = (u_char)((hword) >> 8);\
   74         (lsb) = (u_char)((hword) & 0xff)
   75 /*
   76  *      Move the two charcters into the halfword
   77  */
   78 #define CTOH(msb, lsb, hword)\
   79         (hword) = ((msb) << 8) | (lsb)
   80 
   81 /*
   82  *      Return true if the checksum has been set - ie. the checksum is
   83  *      not zero
   84  */
   85 #define CKSUM_REQUIRED(clnp)\
   86         (((clnp)->cnf_cksum_msb != 0) || ((clnp)->cnf_cksum_lsb != 0))
   87 
   88 /*
   89  *      Fixed part of clnp header
   90  */
   91 struct clnp_fixed {
   92         u_char          cnf_proto_id;   /* network layer protocol identifier */
   93         u_char          cnf_hdr_len;    /* length indicator (octets) */
   94         u_char          cnf_vers;       /* version/protocol identifier
   95                                          * extension */
   96         u_char          cnf_ttl;/* lifetime (500 milliseconds) */
   97         u_char          cnf_type;       /* type code */
   98         /* Includes err_ok, more_segs, and seg_ok */
   99         u_char          cnf_seglen_msb; /* pdu segment length (octets) high
  100                                          * byte */
  101         u_char          cnf_seglen_lsb; /* pdu segment length (octets) low
  102                                          * byte */
  103         u_char          cnf_cksum_msb;  /* checksum high byte */
  104         u_char          cnf_cksum_lsb;  /* checksum low byte */
  105 } __attribute__((packed));
  106 #define CNF_TYPE        0x1f
  107 #define CNF_ERR_OK      0x20
  108 #define CNF_MORE_SEGS   0x40
  109 #define CNF_SEG_OK      0x80
  110 
  111 #define CLNP_CKSUM_OFF  0x07    /* offset of checksum */
  112 
  113 #define clnl_fixed      clnp_fixed
  114 
  115 /*
  116  *      Segmentation part of clnp header
  117  */
  118 struct clnp_segment {
  119         u_short         cng_id; /* data unit identifier */
  120         u_short         cng_off;/* segment offset */
  121         u_short         cng_tot_len;    /* total length */
  122 };
  123 
  124 /*
  125  *      Clnp fragment reassembly structures:
  126  *
  127  *      All packets undergoing reassembly are linked together in
  128  *      clnp_fragl structures. Each clnp_fragl structure contains a
  129  *      pointer to the original clnp packet header, as well as a
  130  *      list of packet fragments. Each packet fragment
  131  *      is headed by a clnp_frag structure. This structure contains the
  132  *      offset of the first and last byte of the fragment, as well as
  133  *      a pointer to the data (an mbuf chain) of the fragment.
  134  */
  135 
  136 /*
  137  *      NOTE:
  138  *              The clnp_frag structure is stored in an mbuf immedately
  139  *              preceding the fragment data. Since there are words in
  140  *              this struct, it must be word aligned.
  141  *
  142  *      NOTE:
  143  *              All the fragment code assumes that the entire clnp header is
  144  *              contained in the first mbuf.
  145  */
  146 struct clnp_frag {
  147         u_int           cfr_first;      /* offset of first byte of this frag */
  148         u_int           cfr_last;       /* offset of last byte of this frag */
  149         u_int           cfr_bytes;      /* bytes to shave to get to data */
  150         struct mbuf    *cfr_data;       /* ptr to data for this frag */
  151         struct clnp_frag *cfr_next;     /* next fragment in list */
  152 };
  153 
  154 struct clnp_fragl {
  155         struct iso_addr cfl_src;/* source of the pkt */
  156         struct iso_addr cfl_dst;/* destination of the pkt */
  157         u_short         cfl_id; /* id of the pkt */
  158         u_char          cfl_ttl;/* current ttl of pkt */
  159         u_short         cfl_last;       /* offset of last byte of packet */
  160         struct mbuf    *cfl_orighdr;    /* ptr to original header */
  161         struct clnp_frag *cfl_frags;    /* linked list of fragments for pkt */
  162         struct clnp_fragl *cfl_next;    /* next pkt being reassembled */
  163 };
  164 
  165 /*
  166  *      The following structure is used to index into an options section
  167  *      of a clnp datagram. These values can be used without worry that
  168  *      offset or length fields are invalid or too big, etc. That is,
  169  *      the consistancy of the options will be guaranteed before this
  170  *      structure is filled in. Any pointer (field ending in p) is
  171  *      actually the offset from the beginning of the mbuf the option
  172  *      is contained in.  A value of NULL for any pointer
  173  *      means that the option is not present. The length any option
  174  *      does not include the option code or option length fields.
  175  */
  176 struct clnp_optidx {
  177         u_short         cni_securep;    /* ptr to start of security option */
  178         char            cni_secure_len; /* length of entire security option */
  179 
  180         u_short         cni_srcrt_s;    /* offset of start of src rt option */
  181         u_short         cni_srcrt_len;  /* length of entire src rt option */
  182 
  183         u_short         cni_recrtp;     /* ptr to beginning of recrt option */
  184         char            cni_recrt_len;  /* length of entire recrt option */
  185 
  186         char            cni_priorp;     /* ptr to priority option */
  187 
  188         u_short         cni_qos_formatp;        /* ptr to format of qos
  189                                                  * option */
  190         char            cni_qos_len;    /* length of entire qos option */
  191 
  192         u_char          cni_er_reason;  /* reason from ER pdu option */
  193 
  194         /* ESIS options */
  195 
  196         u_short         cni_esct;       /* value from ISH ESCT option */
  197 
  198         u_short         cni_netmaskp;   /* ptr to beginning of netmask option */
  199         char            cni_netmask_len;        /* length of entire netmask
  200                                                  * option */
  201 
  202         u_short         cni_snpamaskp;  /* ptr to start of snpamask option */
  203         char            cni_snpamask_len;       /* length of entire snpamask
  204                                                  * option */
  205 
  206 };
  207 
  208 #define ER_INVALREAS    0xff    /* code for invalid ER pdu discard reason */
  209 
  210 /* given an mbuf and addr of option, return offset from data of mbuf */
  211 #define CLNP_OPTTOOFF(m, opt) ((u_short) (opt - mtod(m, caddr_t)))
  212 
  213 /* given an mbuf and offset of option, return address of option */
  214 #define CLNP_OFFTOOPT(m, off) ((caddr_t) (mtod(m, caddr_t) + off))
  215 
  216 /* return true iff src route is valid */
  217 #define CLNPSRCRT_VALID(oidx) ((oidx) && (oidx->cni_srcrt_s))
  218 
  219 /* return the offset field of the src rt */
  220 #define CLNPSRCRT_OFF(oidx, options)\
  221         (*((u_char *)(CLNP_OFFTOOPT(options, oidx->cni_srcrt_s) + 1)))
  222 
  223 /* return the type field of the src rt */
  224 #define CLNPSRCRT_TYPE(oidx, options)\
  225         ((u_char)(*(CLNP_OFFTOOPT(options, oidx->cni_srcrt_s))))
  226 
  227 /* return the length of the current address */
  228 #define CLNPSRCRT_CLEN(oidx, options)\
  229         ((u_char)(*(CLNP_OFFTOOPT(options, oidx->cni_srcrt_s) + CLNPSRCRT_OFF(oidx, options) - 1)))
  230 
  231 /* return the address of the current address */
  232 #define CLNPSRCRT_CADDR(oidx, options)\
  233         ((caddr_t)(CLNP_OFFTOOPT(options, oidx->cni_srcrt_s) + CLNPSRCRT_OFF(oidx, options)))
  234 
  235 /*
  236  * return true if the src route has run out of routes this is true if the
  237  * offset of next route is greater than the end of the rt
  238  */
  239 #define CLNPSRCRT_TERM(oidx, options)\
  240         (CLNPSRCRT_OFF(oidx, options) > oidx->cni_srcrt_len)
  241 
  242 /*
  243  *      Options a user can set/get
  244  */
  245 #define CLNPOPT_FLAGS   0x01    /* flags: seg permitted, no er xmit, etc  */
  246 #define CLNPOPT_OPTS    0x02    /* datagram options */
  247 
  248 /*
  249  *      Values for particular datagram options
  250  */
  251 #define CLNPOVAL_PAD            0xcc    /* padding */
  252 #define CLNPOVAL_SECURE         0xc5    /* security */
  253 #define CLNPOVAL_SRCRT          0xc8    /* source routing */
  254 #define CLNPOVAL_RECRT          0xcb    /* record route */
  255 #define CLNPOVAL_QOS            0xc3    /* quality of service */
  256 #define CLNPOVAL_PRIOR          0xcd    /* priority */
  257 #define CLNPOVAL_ERREAS         0xc1    /* ER PDU ONLY: reason for discard */
  258 
  259 #define CLNPOVAL_SRCSPEC        0x40    /* source address specific */
  260 #define CLNPOVAL_DSTSPEC        0x80    /* destination address specific */
  261 #define CLNPOVAL_GLOBAL         0xc0    /* globally unique */
  262 
  263 /* Globally Unique QOS */
  264 #define CLNPOVAL_SEQUENCING     0x10    /* sequencing preferred */
  265 #define CLNPOVAL_CONGESTED      0x08    /* congestion experienced */
  266 #define CLNPOVAL_LOWDELAY       0x04    /* low transit delay */
  267 
  268 #define CLNPOVAL_PARTRT         0x00    /* partial source routing */
  269 #define CLNPOVAL_COMPRT         0x01    /* complete source routing */
  270 
  271 /*
  272  *      Clnp flags used in a control block flags field.
  273  *      NOTE: these must be out of the range of bits defined in ../net/raw_cb.h
  274  */
  275 #define CLNP_NO_SEG             0x010   /* segmentation not permitted */
  276 #define CLNP_NO_ER              0x020   /* do not generate ERs */
  277 #define CLNP_SEND_RAW           0x080   /* send pkt as RAW DT not TP DT */
  278 #define CLNP_NO_CKSUM           0x100   /* don't use clnp checksum */
  279 #define CLNP_ECHO               0x200   /* send echo request */
  280 #define CLNP_NOCACHE            0x400   /* don't store cache information */
  281 #define CLNP_ECHOR              0x800   /* send echo reply */
  282 
  283 /* valid clnp flags */
  284 #define CLNP_VFLAGS \
  285         (CLNP_SEND_RAW|CLNP_NO_SEG|CLNP_NO_ER|CLNP_NO_CKSUM|\
  286          CLNP_ECHO|CLNP_NOCACHE|CLNP_ECHOR)
  287 
  288 /*
  289  * Constants used by clnp
  290  */
  291 #define CLNP_HDR_MIN    (sizeof (struct clnp_fixed))
  292 #define CLNP_HDR_MAX    (254)
  293 #define CLNP_TTL_UNITS  2       /* 500 milliseconds */
  294 #define CLNP_TTL        15*CLNP_TTL_UNITS       /* time to live (seconds) */
  295 #define ISO8473_V1      0x01
  296 
  297 /*
  298  *      Clnp packet types
  299  *      In order to test raw clnp and tp/clnp simultaneously, a third type of
  300  *      packet has been defined: CLNP_RAW. This is done so that the input
  301  *      routine can switch to the correct input routine (rclnp_input or
  302  *      tpclnp_input) based on the type field. If clnp had a higher level
  303  *      protocol field, this would not be necessary.
  304  */
  305 #define CLNP_DT                 0x1C    /* normal data */
  306 #define CLNP_ER                 0x01    /* error report */
  307 #define CLNP_RAW                0x1D    /* debug only */
  308 #define CLNP_EC                 0x1E    /* echo packet */
  309 #define CLNP_ECR                0x1F    /* echo reply */
  310 
  311 /*
  312  *      ER pdu error codes
  313  */
  314 #define GEN_NOREAS              0x00    /* reason not specified */
  315 #define GEN_PROTOERR            0x01    /* protocol procedure error */
  316 #define GEN_BADCSUM             0x02    /* incorrect checksum */
  317 #define GEN_CONGEST             0x03    /* pdu discarded due to congestion */
  318 #define GEN_HDRSYNTAX           0x04    /* header syntax error */
  319 #define GEN_SEGNEEDED           0x05    /* need segmentation but not allowed */
  320 #define GEN_INCOMPLETE          0x06    /* incomplete pdu received */
  321 #define GEN_DUPOPT              0x07    /* duplicate option */
  322 
  323 /* address errors */
  324 #define ADDR_DESTUNREACH        0x80    /* destination address unreachable */
  325 #define ADDR_DESTUNKNOWN        0x81    /* destination address unknown */
  326 
  327 /* source routing */
  328 #define SRCRT_UNSPECERR         0x90    /* unspecified src rt error */
  329 #define SRCRT_SYNTAX            0x91    /* syntax error in src rt field */
  330 #define SRCRT_UNKNOWNADDR       0x92    /* unknown addr in src rt field */
  331 #define SRCRT_BADPATH           0x93    /* path not acceptable */
  332 
  333 /* lifetime */
  334 #define TTL_EXPTRANSIT          0xa0    /* lifetime expired during transit */
  335 #define TTL_EXPREASS            0xa1    /* lifetime expired during reassembly */
  336 
  337 /* pdu discarded */
  338 #define DISC_UNSUPPOPT          0xb0    /* unsupported option not specified? */
  339 #define DISC_UNSUPPVERS         0xb1    /* unsupported protocol version */
  340 #define DISC_UNSUPPSECURE       0xb2    /* unsupported security option */
  341 #define DISC_UNSUPPSRCRT        0xb3    /* unsupported src rt option */
  342 #define DISC_UNSUPPRECRT        0xb4    /* unsupported rec rt option */
  343 
  344 /* reassembly */
  345 #define REASS_INTERFERE         0xc0    /* reassembly interference */
  346 #define CLNP_ERRORS             22
  347 
  348 
  349 #ifdef CLNP_ER_CODES
  350 u_char          clnp_er_codes[CLNP_ERRORS] = {
  351         GEN_NOREAS, GEN_PROTOERR, GEN_BADCSUM, GEN_CONGEST,
  352         GEN_HDRSYNTAX, GEN_SEGNEEDED, GEN_INCOMPLETE, GEN_DUPOPT,
  353         ADDR_DESTUNREACH, ADDR_DESTUNKNOWN,
  354         SRCRT_UNSPECERR, SRCRT_SYNTAX, SRCRT_UNKNOWNADDR, SRCRT_BADPATH,
  355         TTL_EXPTRANSIT, TTL_EXPREASS,
  356         DISC_UNSUPPOPT, DISC_UNSUPPVERS, DISC_UNSUPPSECURE,
  357         DISC_UNSUPPSRCRT, DISC_UNSUPPRECRT, REASS_INTERFERE
  358 };
  359 #endif
  360 
  361 #ifdef  TROLL
  362 
  363 #define TR_DUPEND               0x01    /* duplicate end of fragment */
  364 #define TR_DUPPKT               0x02    /* duplicate entire packet */
  365 #define TR_DROPPKT              0x04    /* drop packet on output */
  366 #define TR_TRIM                 0x08    /* trim bytes from packet */
  367 #define TR_CHANGE               0x10    /* change bytes in packet */
  368 #define TR_MTU                  0x20    /* delta to change device mtu */
  369 #define TR_CHUCK                0x40    /* drop packet in rclnp_input */
  370 #define TR_BLAST                0x80    /* force rclnp_output to blast many
  371                                          * packet */
  372 #define TR_RAWLOOP              0x100   /* make if_loop call clnpintr
  373                                          * directly */
  374 struct troll {
  375         int             tr_ops; /* operations to perform */
  376         float           tr_dup_size;    /* % to duplicate */
  377         float           tr_dup_freq;    /* frequency to duplicate packets */
  378         float           tr_drop_freq;   /* frequence to drop packets */
  379         int             tr_mtu_adj;     /* delta to adjust if mtu */
  380         int             tr_blast_cnt;   /* # of pkts to blast out */
  381 };
  382 
  383 #define SN_OUTPUT(clcp, m)\
  384         troll_output(clcp->clc_ifp, m, clcp->clc_firsthop, clcp->clc_rt)
  385 
  386 #define SN_MTU(ifp, rt) (((rt && rt->rt_rmx.rmx_mtu) ?\
  387         rt->rt_rmx.rmx_mtu : clnp_badmtu(ifp, rt, __LINE__, __FILE__))\
  388                 - trollctl.tr_mtu_adj)
  389 
  390 #ifdef _KERNEL
  391 extern float    troll_random;
  392 #endif
  393 
  394 #else                           /* NO TROLL */
  395 
  396 #define SN_OUTPUT(clcp, m)\
  397         (*clcp->clc_ifp->if_output)(clcp->clc_ifp, m, clcp->clc_firsthop, \
  398                                     clcp->clc_rt)
  399 
  400 #define SN_MTU(ifp, rt) (((rt && rt->rt_rmx.rmx_mtu) ?\
  401         rt->rt_rmx.rmx_mtu : clnp_badmtu(ifp, rt, __LINE__, __FILE__)))
  402 
  403 #endif                          /* TROLL */
  404 
  405 /*
  406  *      Macro to remove an address from a clnp header
  407  */
  408 #define CLNP_EXTRACT_ADDR(isoa, hoff, hend)\
  409         {\
  410                 isoa.isoa_len = (u_char)*hoff;\
  411                 if ((((++hoff) + isoa.isoa_len) > hend) ||\
  412                         (isoa.isoa_len > 20) || (isoa.isoa_len == 0)) {\
  413                         hoff = (caddr_t)0;\
  414                 } else {\
  415                         (void) bcopy(hoff, (caddr_t)isoa.isoa_genaddr, \
  416                                      isoa.isoa_len);\
  417                         hoff += isoa.isoa_len;\
  418                 }\
  419         }
  420 
  421 /*
  422  *      Macro to insert an address into a clnp header
  423  */
  424 #define CLNP_INSERT_ADDR(hoff, isoa)\
  425         *hoff++ = (isoa).isoa_len;\
  426         (void) bcopy((caddr_t)((isoa).isoa_genaddr), hoff, (isoa).isoa_len);\
  427         hoff += (isoa).isoa_len;
  428 
  429 /*
  430  *      Clnp hdr cache. Whenever a clnp packet is sent, a copy of the
  431  *      header is made and kept in this cache. In addition to a copy of
  432  *      the cached clnp hdr, the cache contains
  433  *      information necessary to determine whether the new packet
  434  *      to send requires a new header to be built.
  435  */
  436 struct clnp_cache {
  437         /* these fields are used to check the validity of the cache */
  438         struct iso_addr clc_dst;/* destination of packet */
  439         struct mbuf    *clc_options;    /* ptr to options mbuf */
  440         int             clc_flags;      /* flags passed to clnp_output */
  441 
  442         /* these fields are state that clnp_output requires to finish the pkt */
  443         int             clc_segoff;     /* offset of seg part of header */
  444         struct rtentry *clc_rt; /* ptr to rtentry (points into the route
  445                                  * structure) */
  446         struct sockaddr *clc_firsthop;  /* first hop of packet */
  447         struct ifnet   *clc_ifp;/* ptr to interface structure */
  448         struct iso_ifaddr
  449                        *clc_ifa;/* ptr to interface address */
  450         struct mbuf    *clc_hdr;/* cached pkt hdr (finally)! */
  451 };
  452 
  453 #ifdef  _KERNEL
  454 struct iso_addr;
  455 struct sockaddr_iso;
  456 struct mbuf;
  457 struct clnp_segment;
  458 struct sockaddr;
  459 struct rt_entry;
  460 struct clnp_fragl;
  461 struct clnp_optidx;
  462 struct isopcb;
  463 struct snpa_hdr;
  464 struct iso_ifaddr;
  465 struct route_iso;
  466 
  467 /* clnp_debug.c */
  468 char *clnp_hexp __P((char *, int, char *));
  469 char *clnp_iso_addrp __P((struct iso_addr *));
  470 char *clnp_saddr_isop __P((struct sockaddr_iso *));
  471 
  472 /* clnp_er.c */
  473 void clnp_er_input __P((struct mbuf *, struct iso_addr *, u_int));
  474 void clnp_discard __P((struct mbuf *, u_int));
  475 void clnp_emit_er __P((struct mbuf *, u_int));
  476 int clnp_er_index __P((u_int));
  477 
  478 int clnp_fragment __P((struct ifnet *, struct mbuf *, struct sockaddr *,
  479                        int, int, int, struct rtentry *));
  480 struct mbuf *clnp_reass __P((struct mbuf *, struct iso_addr *,
  481                              struct iso_addr *, struct clnp_segment *));
  482 int clnp_newpkt __P((struct mbuf *, struct iso_addr *, struct iso_addr *,
  483                      struct clnp_segment *));
  484 void clnp_insert_frag __P((struct clnp_fragl *, struct mbuf *,
  485                            struct clnp_segment *));
  486 struct mbuf    *clnp_comp_pdu __P((struct clnp_fragl *));
  487 #ifdef TROLL
  488 float troll_random __P((void));
  489 int troll_output __P((struct ifnet *, struct mbuf *, struct sockaddr *,
  490                       struct rtentry *));
  491 #endif
  492 
  493 /* clnp_input.c */
  494 void clnp_init  __P((void));
  495 void clnlintr    __P((void));
  496 void clnp_input __P((struct mbuf *, ...));
  497 
  498 /* clnp_options.c */
  499 void clnp_update_srcrt __P((struct mbuf *, struct clnp_optidx *));
  500 void clnp_dooptions __P((struct mbuf *, struct clnp_optidx *, struct ifnet *,
  501                          struct iso_addr *));
  502 int clnp_set_opts __P((struct mbuf **, struct mbuf **));
  503 int clnp_opt_sanity __P((struct mbuf *, caddr_t, int, struct clnp_optidx *));
  504 
  505 /* clnp_output.c */
  506 int clnp_output __P((struct mbuf *, ...));
  507 void clnp_ctloutput __P((void));
  508 
  509 /* clnp_raw.c */
  510 void rclnp_input __P((struct mbuf *, ...));
  511 int rclnp_output __P((struct mbuf *, ...));
  512 int rclnp_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
  513 int clnp_usrreq __P((struct socket *, int, struct mbuf *, struct mbuf *,
  514                      struct mbuf *, struct proc *));
  515 
  516 /* clnp_subr.c */
  517 struct mbuf    *clnp_data_ck __P((struct mbuf *, int));
  518 caddr_t clnp_extract_addr __P((caddr_t, int, struct iso_addr *,
  519                                struct iso_addr *));
  520 int clnp_ours   __P((struct iso_addr *));
  521 void clnp_forward __P((struct mbuf *, int, struct iso_addr *,
  522                        struct clnp_optidx *, int, struct snpa_hdr *));
  523 caddr_t clnp_insert_addr __P((caddr_t, struct iso_addr *, struct iso_addr *));
  524 int clnp_route  __P((struct iso_addr *, struct route_iso *, int,
  525                      struct sockaddr **, struct iso_ifaddr **));
  526 int clnp_srcroute __P((struct mbuf *, struct clnp_optidx *, struct route_iso *,
  527                        struct sockaddr **, struct iso_ifaddr **,
  528                        struct iso_addr *));
  529 int clnp_echoreply __P((struct mbuf *, int, struct sockaddr_iso *,
  530                         struct sockaddr_iso *, struct clnp_optidx *));
  531 int clnp_badmtu __P((struct ifnet *, struct rtentry *, int, char *));
  532 void clnp_ypocb  __P((caddr_t, caddr_t, u_int));
  533 
  534 /* clnp_timer.c */
  535 struct clnp_fragl *clnp_freefrags __P((struct clnp_fragl *));
  536 void clnp_slowtimo __P((void));
  537 void clnp_drain __P((void));
  538 
  539 #ifdef  TROLL
  540 struct troll    trollctl;
  541 #endif /* TROLL */
  542 
  543 #endif /* _KERNEL */

Cache object: 9a11ccf81547060778bdc2232f37c08c


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.