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.21 2004/04/19 05:16:46 matt 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 const int isoctlerrmap[];
  138 extern const char all_es_snpa[], all_is_snpa[];
  139 
  140 extern struct callout snpac_age_ch;
  141 extern struct callout esis_config_ch;
  142 
  143 /* iso.c */
  144 int iso_addrmatch1 (const struct iso_addr *, const struct iso_addr *);
  145 int iso_addrmatch (const struct sockaddr_iso *, const struct sockaddr_iso *);
  146 int iso_netmatch (const struct sockaddr_iso *, const struct sockaddr_iso *);
  147 u_long iso_hashchar (caddr_t, int);
  148 int iso_hash (struct sockaddr_iso *, struct afhash *);
  149 int iso_netof (struct iso_addr *, caddr_t);
  150 int iso_control (struct socket *, u_long, caddr_t, struct ifnet *,
  151                      struct proc *);
  152 void iso_purgeaddr (struct ifaddr *, struct ifnet *);
  153 void iso_purgeif (struct ifnet *);
  154 void iso_ifscrub (struct ifnet *, struct iso_ifaddr *);
  155 int iso_ifinit (struct ifnet *, struct iso_ifaddr *, struct sockaddr_iso *,
  156                     int);
  157 struct ifaddr *iso_ifwithidi (struct sockaddr *);
  158 int iso_ck_addr (struct iso_addr *);
  159 int iso_eqtype (struct iso_addr *, struct iso_addr *);
  160 struct iso_ifaddr *iso_localifa (struct sockaddr_iso *);
  161 int iso_nlctloutput (int, int, caddr_t, struct mbuf *);
  162 void dump_isoaddr (struct sockaddr_iso *);
  163 
  164 /* iso_chksum.c */
  165 int iso_check_csum (struct mbuf *, int);
  166 void iso_gen_csum (struct mbuf *, int, int);
  167 int m_datalen (struct mbuf *);
  168 int m_compress (struct mbuf *, struct mbuf **);
  169 
  170 /* iso_snpac.c */
  171 void llc_rtrequest (int, struct rtentry *, struct rt_addrinfo *);
  172 void iso_setmcasts (struct ifnet *, int);
  173 int iso_snparesolve (struct ifnet *, struct sockaddr_iso *,
  174                          caddr_t, int *);
  175 void snpac_free (struct llinfo_llc *);
  176 int snpac_add (struct ifnet *, struct iso_addr *, caddr_t, int,
  177                    u_short, int);
  178 int snpac_ioctl (struct socket *, u_long, caddr_t, struct proc *);
  179 void snpac_logdefis (struct rtentry *);
  180 void snpac_age (void *);
  181 int snpac_ownmulti (caddr_t, u_int);
  182 void snpac_flushifp (struct ifnet *);
  183 void snpac_rtrequest (int, struct iso_addr *, struct iso_addr *,
  184                          struct iso_addr *, int, struct rtentry **);
  185 void snpac_addrt (struct ifnet *, struct iso_addr *, struct iso_addr *,
  186                      struct iso_addr *);
  187 #endif /* _KERNEL */
  188 #endif /* _NETISO_ISO_VAR_H_ */

Cache object: 0f10e5faa8a78c172efb4e447828c189


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