netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
ddp.h File Reference
`#include "endian.h"`

Go to the source code of this file.

## Data Structures
struct | elaphdr
struct | ddpehdr
struct | ddpshdr

## Macros
#define | SZ_ELAPHDR 3
#define | ELAP_DDPSHORT 0x01
#define | ELAP_DDPEXTEND 0x02
#define | deh_pad deh_u.du_bits.dub_pad
#define | deh_hops deh_u.du_bits.dub_hops
#define | deh_len deh_u.du_bits.dub_len
#define | deh_sum deh_u.du_bits.dub_sum
#define | deh_bytes deh_u.du_bytes
#define | SZ_DDPEHDR 12
#define | DDP_MAXHOPS 15
#define | dsh_pad dsh_u.du_bits.dub_pad
#define | dsh_len dsh_u.du_bits.dub_len
#define | dsh_dport dsh_u.du_bits.dub_dport
#define | dsh_sport dsh_u.du_bits.dub_sport
#define | dsh_bytes dsh_u.du_bytes
#define | SZ_DDPSHDR 4

## Detailed Description

<-1byte(8bits) ->
+---------------+
| 0 | hopc |len|
+---------------+
| len (cont) |
+---------------+
| |
+- DDP csum -+
| |
+---------------+
| |
+- Dest NET -+
| |
+---------------+
| |
+- Src NET -+
| |
+---------------+
| Dest NODE |
+---------------+
| Src NODE |
+---------------+
| Dest PORT |
+---------------+
| Src PORT |
+---------------+

On Apples, there is also a ddp_type field, after src_port. However, under this unix implementation, user level processes need to be able to set the ddp_type. In later revisions, the ddp_type may only be available in a raw_appletalk interface.

## Macro Definition Documentation

## ◆ DDP_MAXHOPS

#define DDP_MAXHOPS 15

## ◆ deh_bytes

#define deh_bytes deh_u.du_bytes

## ◆ deh_hops

#define deh_hops deh_u.du_bits.dub_hops

## ◆ deh_len

#define deh_len deh_u.du_bits.dub_len

## ◆ deh_pad

#define deh_pad deh_u.du_bits.dub_pad

## ◆ deh_sum

#define deh_sum deh_u.du_bits.dub_sum

## ◆ dsh_bytes

#define dsh_bytes dsh_u.du_bytes

## ◆ dsh_dport

#define dsh_dport dsh_u.du_bits.dub_dport

## ◆ dsh_len

#define dsh_len dsh_u.du_bits.dub_len

## ◆ dsh_pad

#define dsh_pad dsh_u.du_bits.dub_pad

## ◆ dsh_sport

#define dsh_sport dsh_u.du_bits.dub_sport

## ◆ ELAP_DDPEXTEND

#define ELAP_DDPEXTEND 0x02

## ◆ ELAP_DDPSHORT

#define ELAP_DDPSHORT 0x01

## ◆ SZ_DDPEHDR

#define SZ_DDPEHDR 12

## ◆ SZ_DDPSHDR

#define SZ_DDPSHDR 4

## ◆ SZ_ELAPHDR

#define SZ_ELAPHDR 3