Rev 4505 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4505 | Rev 4731 | ||
|---|---|---|---|
| Line 37... | Line 37... | ||
| 37 | #ifndef __NET_PACKET_HEADER_H__ |
37 | #ifndef __NET_PACKET_HEADER_H__ |
| 38 | #define __NET_PACKET_HEADER_H__ |
38 | #define __NET_PACKET_HEADER_H__ |
| 39 | 39 | ||
| 40 | #include "packet.h" |
40 | #include "packet.h" |
| 41 | 41 | ||
| - | 42 | /** Returns the actual packet data length. |
|
| - | 43 | * @param header The packet header. Input parameter. |
|
| - | 44 | */ |
|
| - | 45 | #define PACKET_DATA_LENGTH( header ) (( header )->data_end - ( header )->data_start ) |
|
| - | 46 | ||
| - | 47 | /** Returns the maximum packet address length. |
|
| - | 48 | * @param header The packet header. Input parameter. |
|
| - | 49 | */ |
|
| - | 50 | #define PACKET_MAX_ADDRESS_LENGTH( header ) (( header )->dest_addr - ( header )->src_addr ) |
|
| - | 51 | ||
| - | 52 | /** Returns the minimum packet suffix. |
|
| - | 53 | * @param header The packet header. Input parameter. |
|
| - | 54 | */ |
|
| - | 55 | #define PACKET_MIN_SUFFIX( header ) (( header )->length - ( header )->data_start - ( header )->max_content ) |
|
| - | 56 | ||
| 42 | /** Packet integrity check magic value. |
57 | /** Packet integrity check magic value. |
| 43 | */ |
58 | */ |
| 44 | #define PACKET_MAGIC_VALUE 0x11227788 |
59 | #define PACKET_MAGIC_VALUE 0x11227788 |
| 45 | 60 | ||
| 46 | /** Packet header. |
61 | /** Packet header. |
| Line 50... | Line 65... | ||
| 50 | */ |
65 | */ |
| 51 | packet_id_t packet_id; |
66 | packet_id_t packet_id; |
| 52 | /** Packet queue sorting value. |
67 | /** Packet queue sorting value. |
| 53 | * The packet queue is sorted the ascending order. |
68 | * The packet queue is sorted the ascending order. |
| 54 | */ |
69 | */ |
| 55 | int order; |
70 | size_t order; |
| 56 | /** Packet metric. |
71 | /** Packet metric. |
| 57 | */ |
72 | */ |
| 58 | size_t metric; |
73 | size_t metric; |
| 59 | /** Previous packet in the queue. |
74 | /** Previous packet in the queue. |
| 60 | */ |
75 | */ |