1139827Simp/*- 215885Sjulian * Copyright (c) 1990,1991 Regents of The University of Michigan. 315885Sjulian * All Rights Reserved. 415885Sjulian * 515885Sjulian * Permission to use, copy, modify, and distribute this software and 615885Sjulian * its documentation for any purpose and without fee is hereby granted, 715885Sjulian * provided that the above copyright notice appears in all copies and 815885Sjulian * that both that copyright notice and this permission notice appear 915885Sjulian * in supporting documentation, and that the name of The University 1015885Sjulian * of Michigan not be used in advertising or publicity pertaining to 1115885Sjulian * distribution of the software without specific, written prior 1215885Sjulian * permission. This software is supplied as is without expressed or 1315885Sjulian * implied warranties of any kind. 1415885Sjulian * 1515885Sjulian * Research Systems Unix Group 1615885Sjulian * The University of Michigan 1715885Sjulian * c/o Mike Clark 1815885Sjulian * 535 W. William Street 1915885Sjulian * Ann Arbor, Michigan 2015885Sjulian * +1-313-763-0525 2115885Sjulian * netatalk@itd.umich.edu 22103024Ssobomax * 23103024Ssobomax * $FreeBSD$ 2415885Sjulian */ 2515885Sjulian 26165972Srwatson#ifndef _NETATALK_AT_H_ 27165972Srwatson#define _NETATALK_AT_H_ 28165972Srwatson 2915885Sjulian/* 3015885Sjulian * Supported protocols 3115885Sjulian */ 32165972Srwatson#define ATPROTO_DDP 0 33165972Srwatson#define ATPROTO_AARP 254 3415885Sjulian 35165972Srwatson#define DDP_MAXSZ 587 3615885Sjulian 3715885Sjulian/* 38165972Srwatson * If ATPORT_FIRST <= Port < ATPORT_RESERVED, the port was created by a 3915885Sjulian * privileged process. 40165972Srwatson * 41165972Srwatson * If ATPORT_RESERVED <= Port < ATPORT_LAST, the port was not necessarily 42165972Srwatson * created by a privileged process. 4315885Sjulian */ 44165972Srwatson#define ATPORT_FIRST 1 45165972Srwatson#define ATPORT_RESERVED 128 46165972Srwatson#define ATPORT_LAST 255 4715885Sjulian 4815885Sjulian/* 4915885Sjulian * AppleTalk address. 5015885Sjulian */ 5115885Sjulianstruct at_addr { 52165972Srwatson u_short s_net; 53165972Srwatson u_char s_node; 5415885Sjulian}; 5515885Sjulian 56165972Srwatson#define ATADDR_ANYNET (u_short)0x0000 57165972Srwatson#define ATADDR_ANYNODE (u_char)0x00 58165972Srwatson#define ATADDR_ANYPORT (u_char)0x00 59165972Srwatson#define ATADDR_BCAST (u_char)0xff /* There is no BCAST for NET. */ 6015885Sjulian 6117964Sjulianstruct netrange { 62165972Srwatson u_char nr_phase; 63165972Srwatson u_short nr_firstnet; 64165972Srwatson u_short nr_lastnet; 6517964Sjulian}; 6617964Sjulian 6715885Sjulian/* 68165972Srwatson * Socket address, AppleTalk style. We keep magic information in the zero 69165972Srwatson * bytes. There are three types, NONE, CONFIG which has the phase and a net 70165972Srwatson * range, and IFACE which has the network address of an interface. IFACE may 71165972Srwatson * be filled in by the client, and is filled in by the kernel. 7215885Sjulian */ 7315885Sjulianstruct sockaddr_at { 74165972Srwatson u_char sat_len; 75165972Srwatson u_char sat_family; 76165972Srwatson u_char sat_port; 77165972Srwatson struct at_addr sat_addr; 78165972Srwatson union { 79165972Srwatson struct netrange r_netrange; 80165972Srwatson char r_zero[8]; /* Hide struct netrange here. */ 81165972Srwatson } sat_range; 8215885Sjulian}; 8315885Sjulian 84165972Srwatson#define sat_zero sat_range.r_zero 8515885Sjulian 86165972Srwatson#endif /* !_NETATALK_AT_H_ */ 87