2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
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.
15 * Research Systems Unix Group
16 * The University of Michigan
18 * 535 W. William Street
21 * netatalk@itd.umich.edu
23 * $DragonFly: src/sys/netproto/atalk/ddp.h,v 1.2 2006/10/23 21:50:33 dillon Exp $
25 #ifndef _NETATALK_DDP_H_
26 #define _NETATALK_DDP_H_
56 * On Apples, there is also a ddp_type field, after src_port. However,
57 * under this unix implementation, user level processes need to be able
58 * to set the ddp_type. In later revisions, the ddp_type may only be
59 * available in a raw_appletalk interface.
70 #define ELAP_DDPSHORT 0x01
71 #define ELAP_DDPEXTEND 0x02
74 * Extended DDP header. Includes sickness for dealing with arbitrary
75 * bitfields on a little-endian arch.
80 #if BYTE_ORDER == BIG_ENDIAN
86 #if BYTE_ORDER == LITTLE_ENDIAN
95 #define deh_pad deh_u.du_bits.dub_pad
96 #define deh_hops deh_u.du_bits.dub_hops
97 #define deh_len deh_u.du_bits.dub_len
98 #define deh_sum deh_u.du_bits.dub_sum
99 #define deh_bytes deh_u.du_bytes
108 #define DDP_MAXHOPS 15
113 #if BYTE_ORDER == BIG_ENDIAN
116 unsigned dub_dport
:8;
117 unsigned dub_sport
:8;
119 #if BYTE_ORDER == LITTLE_ENDIAN
120 unsigned dub_sport
:8;
121 unsigned dub_dport
:8;
128 #define dsh_pad dsh_u.du_bits.dub_pad
129 #define dsh_len dsh_u.du_bits.dub_len
130 #define dsh_dport dsh_u.du_bits.dub_dport
131 #define dsh_sport dsh_u.du_bits.dub_sport
132 #define dsh_bytes dsh_u.du_bytes
135 #endif /* _NETATALK_DDP_H_ */