netatalk  4.4.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
sys/netatalk/ddp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
42
43#ifndef _NETATALK_DDP_H
44#define _NETATALK_DDP_H 1
45
46#include "endian.h"
47
48struct elaphdr {
49 unsigned char el_dnode;
50 unsigned char el_snode;
51 unsigned char el_type;
52};
53
54#define SZ_ELAPHDR 3
55
56#define ELAP_DDPSHORT 0x01
57#define ELAP_DDPEXTEND 0x02
58
63struct ddpehdr {
64 union {
65 struct {
66#if BYTE_ORDER == BIG_ENDIAN
67 unsigned dub_pad: 2;
68 unsigned dub_hops: 4;
69 unsigned dub_len: 10;
70 unsigned dub_sum: 16;
71#else /* BYTE_ORDER == BIG_ENDIAN */
72#if BYTE_ORDER == LITTLE_ENDIAN
73 unsigned dub_sum: 16;
74 unsigned dub_len: 10;
75 unsigned dub_hops: 4;
76 unsigned dub_pad: 2;
77#else /* BYTE_ORDER == LITTLE_ENDIAN */
78 OOPS!
79#endif /* BYTE_ORDER == LITTLE_ENDIAN */
80#endif /* BYTE_ORDER == BIG_ENDIAN */
82 unsigned du_bytes;
84#define deh_pad deh_u.du_bits.dub_pad
85#define deh_hops deh_u.du_bits.dub_hops
86#define deh_len deh_u.du_bits.dub_len
87#define deh_sum deh_u.du_bits.dub_sum
88#define deh_bytes deh_u.du_bytes
89 unsigned short deh_dnet;
90 unsigned short deh_snet;
91 unsigned char deh_dnode;
92 unsigned char deh_snode;
93 unsigned char deh_dport;
94 unsigned char deh_sport;
95};
96
97#define SZ_DDPEHDR 12
98
99#define DDP_MAXHOPS 15
100
101struct ddpshdr {
102 union {
103 struct {
104#if BYTE_ORDER == BIG_ENDIAN
105 unsigned dub_pad: 6;
106 unsigned dub_len: 10;
107 unsigned dub_dport: 8;
108 unsigned dub_sport: 8;
109#endif /* BYTE_ORDER == BIG_ENDIAN */
110#if BYTE_ORDER == LITTLE_ENDIAN
111 unsigned dub_sport: 8;
112 unsigned dub_dport: 8;
113 unsigned dub_len: 10;
114 unsigned dub_pad: 6;
115#endif /* BYTE_ORDER == LITTLE_ENDIAN */
117 unsigned du_bytes;
119#define dsh_pad dsh_u.du_bits.dub_pad
120#define dsh_len dsh_u.du_bits.dub_len
121#define dsh_dport dsh_u.du_bits.dub_dport
122#define dsh_sport dsh_u.du_bits.dub_sport
123#define dsh_bytes dsh_u.du_bytes
124};
125#define SZ_DDPSHDR 4
126
127#endif /* netatalk/ddp.h */
Definition sys/netatalk/ddp.h:63
unsigned char deh_dport
Definition sys/netatalk/ddp.h:93
unsigned short deh_dnet
Definition sys/netatalk/ddp.h:89
unsigned char deh_dnode
Definition sys/netatalk/ddp.h:91
unsigned dub_pad
Definition sys/netatalk/ddp.h:67
unsigned du_bytes
Definition sys/netatalk/ddp.h:82
unsigned char deh_sport
Definition sys/netatalk/ddp.h:94
union ddpehdr::@243272307121210173143377014153364206303202350247 deh_u
unsigned dub_hops
Definition sys/netatalk/ddp.h:68
unsigned dub_len
Definition sys/netatalk/ddp.h:69
unsigned short deh_snet
Definition sys/netatalk/ddp.h:90
unsigned dub_sum
Definition sys/netatalk/ddp.h:70
struct ddpehdr::@243272307121210173143377014153364206303202350247::@063162066016052021073242060213237353271112330257 du_bits
unsigned char deh_snode
Definition sys/netatalk/ddp.h:92
Definition sys/netatalk/ddp.h:101
unsigned dub_len
Definition sys/netatalk/ddp.h:106
struct ddpshdr::@244036062155212254351342367133014356044160052121::@132215232230347067323107372330303163256062324046 du_bits
union ddpshdr::@244036062155212254351342367133014356044160052121 dsh_u
unsigned dub_pad
Definition sys/netatalk/ddp.h:105
unsigned dub_dport
Definition sys/netatalk/ddp.h:107
unsigned dub_sport
Definition sys/netatalk/ddp.h:108
unsigned du_bytes
Definition sys/netatalk/ddp.h:117
Definition sys/netatalk/ddp.h:48
unsigned char el_dnode
Definition sys/netatalk/ddp.h:49
unsigned char el_snode
Definition sys/netatalk/ddp.h:50
unsigned char el_type
Definition sys/netatalk/ddp.h:51