Rev 4743 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4743 | Rev 4756 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #ifndef __NET_TCP_HEADER_H__ |
38 | #ifndef __NET_TCP_HEADER_H__ |
39 | #define __NET_TCP_HEADER_H__ |
39 | #define __NET_TCP_HEADER_H__ |
40 | 40 | ||
41 | #include <sys/types.h> |
41 | #include <sys/types.h> |
42 | 42 | ||
43 | /** Returns the actual TCP header length. |
43 | /** Returns the actual TCP header length in bytes. |
44 | * @param header The TCP packet header. Input parameter. |
44 | * @param[in] header The TCP packet header. |
45 | */ |
45 | */ |
46 | #define TCP_HEADER_LENGTH( header ) (( header )->header_length * 4u ) |
46 | #define TCP_HEADER_LENGTH( header ) (( header )->header_length * 4u ) |
47 | 47 | ||
48 | /** Returns the actual TCP header length. |
48 | /** Returns the TCP header length. |
49 | * @param header The TCP packet header. Input parameter. |
49 | * @param[in] length The TCP header length in bytes. |
50 | */ |
50 | */ |
51 | #define TCP_COMPUTE_HEADER_LENGTH( length ) (( uint8_t ) (( length ) / 4u )) |
51 | #define TCP_COMPUTE_HEADER_LENGTH( length ) (( uint8_t ) (( length ) / 4u )) |
52 | 52 | ||
53 | /** Type definition of the transmission datagram header. |
53 | /** Type definition of the transmission datagram header. |
54 | * @see tcp_header |
54 | * @see tcp_header |