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/iso_var.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: iso_var.h,v 1.20 2003/08/07 16:33:38 agc Exp $ */
    2 
    3 /*-
    4  * Copyright (c) 1988, 1991, 1993
    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  *      @(#)iso_var.h   8.1 (Berkeley) 6/10/93
   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 #ifndef _NETISO_ISO_VAR_H_
   57 #define _NETISO_ISO_VAR_H_
   58 
   59 #include <sys/callout.h>
   60 
   61 /*
   62  * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
   63  */
   64 
   65 /*
   66  *      Interface address, iso version. One of these structures is
   67  *      allocated for each interface with an osi address. The ifaddr
   68  *      structure conatins the protocol-independent part
   69  *      of the structure, and is assumed to be first.
   70  */
   71 struct iso_ifaddr {
   72         struct ifaddr   ia_ifa; /* protocol-independent info */
   73 #define ia_ifp          ia_ifa.ifa_ifp
   74 #define ia_flags        ia_ifa.ifa_flags
   75         int             ia_snpaoffset;
   76                         TAILQ_ENTRY(iso_ifaddr) ia_list;        /* list of iso addresses */
   77         struct sockaddr_iso ia_addr;    /* reserve space for interface name */
   78         struct sockaddr_iso ia_dstaddr; /* reserve space for broadcast addr */
   79 #define ia_broadaddr    ia_dstaddr
   80         struct sockaddr_iso ia_sockmask;        /* reserve space for general
   81                                                  * netmask */
   82 };
   83 
   84 struct iso_aliasreq {
   85         char            ifra_name[IFNAMSIZ];    /* if name, e.g. "en0" */
   86         struct sockaddr_iso ifra_addr;
   87         struct sockaddr_iso ifra_dstaddr;
   88         struct sockaddr_iso ifra_mask;
   89         int             ifra_snpaoffset;
   90 };
   91 
   92 struct iso_ifreq {
   93         char            ifr_name[IFNAMSIZ];     /* if name, e.g. "en0" */
   94         struct sockaddr_iso ifr_Addr;
   95 };
   96 
   97 /*
   98  *      Given a pointer to an iso_ifaddr (ifaddr),
   99  *      return a pointer to the addr as a sockaddr_iso
  100  */
  101 #define IA_SIS(ia) (&(((struct iso_ifaddr *)(ia))->ia_addr))
  102 
  103 #define SIOCDIFADDR_ISO _IOW('i',25, struct iso_ifreq)  /* delete IF addr */
  104 #define SIOCAIFADDR_ISO _IOW('i',26, struct iso_aliasreq)       /* add/chg IFalias */
  105 #define SIOCGIFADDR_ISO _IOWR('i',33, struct iso_ifreq) /* get ifnet address */
  106 #define SIOCGIFDSTADDR_ISO _IOWR('i',34, struct iso_ifreq)      /* get dst address */
  107 #define SIOCGIFNETMASK_ISO _IOWR('i',37, struct iso_ifreq)      /* get dst address */
  108 
  109 /*
  110  * This stuff should go in if.h or if_llc.h or someplace else,
  111  * but for now . . .
  112  */
  113 
  114 struct llc_etherhdr {
  115         char            dst[6];
  116         char            src[6];
  117         char            len[2];
  118         char            llc_dsap;
  119         char            llc_ssap;
  120         char            llc_ui_byte;
  121 };
  122 
  123 struct snpa_hdr {
  124         struct ifnet   *snh_ifp;
  125         char            snh_dhost[6];
  126         char            snh_shost[6];
  127         short           snh_flags;
  128 };
  129 #ifdef _KERNEL
  130 TAILQ_HEAD(iso_ifaddrhead, iso_ifaddr);
  131 extern struct iso_ifaddrhead iso_ifaddr; /* linked list of iso address ifaces */
  132 extern struct ifqueue clnlintrq;        /* clnl packet input queue */
  133 extern int iso_systype;
  134 struct afhash;
  135 struct llinfo_llc;
  136 
  137 extern char all_es_snpa[], all_is_snpa[];
  138 
  139 extern struct callout snpac_age_ch;
  140 extern struct callout esis_config_ch;
  141 
  142 /* iso.c */
  143 int iso_addrmatch1 __P((struct iso_addr *, struct iso_addr *));
  144 int iso_addrmatch __P((struct sockaddr_iso *, struct sockaddr_iso *));
  145 int iso_netmatch __P((struct sockaddr_iso *, struct sockaddr_iso *));
  146 u_long iso_hashchar __P((caddr_t, int));
  147 int iso_hash __P((struct sockaddr_iso *, struct afhash *));
  148 int iso_netof __P((struct iso_addr *, caddr_t));
  149 int iso_control __P((struct socket *, u_long, caddr_t, struct ifnet *,
  150                      struct proc *));
  151 void iso_purgeaddr __P((struct ifaddr *, struct ifnet *));
  152 void iso_purgeif __P((struct ifnet *));
  153 void iso_ifscrub __P((struct ifnet *, struct iso_ifaddr *));
  154 int iso_ifinit __P((struct ifnet *, struct iso_ifaddr *, struct sockaddr_iso *,
  155                     int ));
  156 struct ifaddr *iso_ifwithidi __P((struct sockaddr *));
  157 int iso_ck_addr __P((struct iso_addr *));
  158 int iso_eqtype __P((struct iso_addr *, struct iso_addr *));
  159 struct iso_ifaddr *iso_localifa __P((struct sockaddr_iso *));
  160 int iso_nlctloutput __P((int, int, caddr_t, struct mbuf *));
  161 void dump_isoaddr __P((struct sockaddr_iso *));
  162 
  163 /* iso_chksum.c */
  164 int iso_check_csum __P((struct mbuf *, int));
  165 void iso_gen_csum __P((struct mbuf *, int, int));
  166 int m_datalen __P((struct mbuf *));
  167 int m_compress __P((struct mbuf *, struct mbuf **));
  168 
  169 /* iso_snpac.c */
  170 void llc_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *));
  171 void iso_setmcasts __P((struct ifnet *, int));
  172 int iso_snparesolve __P((struct ifnet *, struct sockaddr_iso *,
  173                          caddr_t, int *));
  174 void snpac_free __P((struct llinfo_llc *));
  175 int snpac_add __P((struct ifnet *, struct iso_addr *, caddr_t, int,
  176                    u_short, int));
  177 int snpac_ioctl __P((struct socket *, u_long, caddr_t, struct proc *));
  178 void snpac_logdefis __P((struct rtentry *));
  179 void snpac_age __P((void *));
  180 int snpac_ownmulti __P((caddr_t, u_int));
  181 void snpac_flushifp __P((struct ifnet *));
  182 void snpac_rtrequest __P((int, struct iso_addr *, struct iso_addr *,
  183                          struct iso_addr *, int, struct rtentry **));
  184 void snpac_addrt __P((struct ifnet *, struct iso_addr *, struct iso_addr *,
  185                      struct iso_addr *));
  186 #endif /* _KERNEL */
  187 #endif /* _NETISO_ISO_VAR_H_ */

Cache object: ebd6c41f56acbd0d1c8f87d2bca4d0ee


[ 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.