netatalk: ddp.h Source File

netatalk 4.5.1
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
48 struct 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
63 struct 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 */
81 } du_bits;
82 unsigned du_bytes;
83 } deh_u;
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
101 struct 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 */
116 } du_bits;
117 unsigned du_bytes;
118 } dsh_u;
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 */
endian.h
ddpehdr
Definition sys/netatalk/ddp.h:63
ddpehdr::deh_dport
unsigned char deh_dport
Definition sys/netatalk/ddp.h:93
ddpehdr::deh_u
union ddpehdr::@114054301027366104215325020315154361101120306343 deh_u
ddpehdr::deh_dnet
unsigned short deh_dnet
Definition sys/netatalk/ddp.h:89
ddpehdr::deh_dnode
unsigned char deh_dnode
Definition sys/netatalk/ddp.h:91
ddpehdr::dub_pad
unsigned dub_pad
Definition sys/netatalk/ddp.h:67
ddpehdr::du_bytes
unsigned du_bytes
Definition sys/netatalk/ddp.h:82
ddpehdr::deh_sport
unsigned char deh_sport
Definition sys/netatalk/ddp.h:94
ddpehdr::dub_hops
unsigned dub_hops
Definition sys/netatalk/ddp.h:68
ddpehdr::dub_len
unsigned dub_len
Definition sys/netatalk/ddp.h:69
ddpehdr::deh_snet
unsigned short deh_snet
Definition sys/netatalk/ddp.h:90
ddpehdr::dub_sum
unsigned dub_sum
Definition sys/netatalk/ddp.h:70
ddpehdr::du_bits
struct ddpehdr::@114054301027366104215325020315154361101120306343::@133371244314314145041140017342146050201246057052 du_bits
ddpehdr::deh_snode
unsigned char deh_snode
Definition sys/netatalk/ddp.h:92
ddpshdr
Definition sys/netatalk/ddp.h:101
ddpshdr::dub_len
unsigned dub_len
Definition sys/netatalk/ddp.h:106
ddpshdr::dub_pad
unsigned dub_pad
Definition sys/netatalk/ddp.h:105
ddpshdr::dub_dport
unsigned dub_dport
Definition sys/netatalk/ddp.h:107
ddpshdr::du_bits
struct ddpshdr::@114133033206273336311154352210254040306313205075::@327235100023004212006344345242016157121236217167 du_bits
ddpshdr::dub_sport
unsigned dub_sport
Definition sys/netatalk/ddp.h:108
ddpshdr::du_bytes
unsigned du_bytes
Definition sys/netatalk/ddp.h:117
ddpshdr::dsh_u
union ddpshdr::@114133033206273336311154352210254040306313205075 dsh_u
elaphdr
Definition sys/netatalk/ddp.h:48
elaphdr::el_dnode
unsigned char el_dnode
Definition sys/netatalk/ddp.h:49
elaphdr::el_snode
unsigned char el_snode
Definition sys/netatalk/ddp.h:50
elaphdr::el_type
unsigned char el_type
Definition sys/netatalk/ddp.h:51