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/netatalk/at.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 /*
    2  * Copyright (c) 1990,1991 Regents of The University of Michigan.
    3  * All Rights Reserved.
    4  *
    5  * Permission to use, copy, modify, and distribute this software and
    6  * its documentation for any purpose and without fee is hereby granted,
    7  * provided that the above copyright notice appears in all copies and
    8  * that both that copyright notice and this permission notice appear
    9  * in supporting documentation, and that the name of The University
   10  * of Michigan not be used in advertising or publicity pertaining to
   11  * distribution of the software without specific, written prior
   12  * permission. This software is supplied as is without expressed or
   13  * implied warranties of any kind.
   14  *
   15  *      Research Systems Unix Group
   16  *      The University of Michigan
   17  *      c/o Mike Clark
   18  *      535 W. William Street
   19  *      Ann Arbor, Michigan
   20  *      +1-313-763-0525
   21  *      netatalk@itd.umich.edu
   22  */
   23 
   24 #ifndef __AT_HEADER__
   25 #define __AT_HEADER__
   26 /*
   27  * Supported protocols
   28  */
   29 #define ATPROTO_DDP     0
   30 #define ATPROTO_AARP    254
   31 
   32 /*
   33  * Ethernet types, for DIX.
   34  * These should really be in some global header file, but we can't
   35  * count on them being there, and it's annoying to patch system files.
   36  */
   37 #define ETHERTYPE_AT    0x809B          /* AppleTalk protocol */
   38 #define ETHERTYPE_AARP  0x80F3          /* AppleTalk ARP */
   39 
   40 #define DDP_MAXSZ       587
   41 
   42 /*
   43  * If ATPORT_FIRST <= Port < ATPORT_RESERVED,
   44  * Port was created by a privileged process.
   45  * If ATPORT_RESERVED <= Port < ATPORT_LAST,
   46  * Port was not necessarily created by a
   47  * privileged process.
   48  */
   49 #define ATPORT_FIRST    1
   50 #define ATPORT_RESERVED 128
   51 #define ATPORT_LAST     255
   52 
   53 /*
   54  * AppleTalk address.
   55  */
   56 struct at_addr {
   57     u_short     s_net;
   58     u_char      s_node;
   59 };
   60 
   61 #define ATADDR_ANYNET   (u_short)0x0000
   62 #define ATADDR_ANYNODE  (u_char)0x00
   63 #define ATADDR_ANYPORT  (u_char)0x00
   64 #define ATADDR_BCAST    (u_char)0xff            /* There is no BCAST for NET */
   65 
   66 struct netrange {
   67     u_char              nr_phase;
   68     u_short             nr_firstnet;
   69     u_short             nr_lastnet;
   70 };
   71 
   72 /*
   73  * Socket address, AppleTalk style.  We keep magic information in the 
   74  * zero bytes.  There are three types, NONE, CONFIG which has the phase
   75  * and a net range, and IFACE which has the network address of an
   76  * interface.  IFACE may be filled in by the client, and is filled in
   77  * by the kernel.
   78  */
   79 struct sockaddr_at {
   80     u_char              sat_len;
   81     u_char              sat_family;
   82     u_char              sat_port;
   83     struct at_addr      sat_addr;
   84     union {
   85         struct netrange r_netrange;
   86         char            r_zero[ 8 ];    /* Hide a struct netrange in here */
   87     } sat_range;
   88 };
   89 
   90 #define sat_zero sat_range.r_zero
   91 
   92 #ifdef KERNEL
   93 extern struct domain    atalkdomain;
   94 extern struct protosw   atalksw[];
   95 #endif
   96 
   97 #endif __AT_HEADER__

Cache object: a2b3c1962d255022fe620a7db5eae940


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