IP codes and definitions. More...
#include <sys/types.h>
Defines | |
#define | IPVERSION 4 |
Default IPVERSION. | |
#define | MAXTTL 255 |
Maximum time to live counter. | |
#define | IPDEFTTL 64 |
Default time to live counter. | |
IP type of service definitions | |
#define | IPTOS_TOS_MASK 0x1E |
IP TOS mask. | |
#define | IPTOS_PRECEDENCE_SHIFT 5 |
Precedence shift. | |
#define | IPTOS_DELAY_SHIFT 4 |
Delay shift. | |
#define | IPTOS_THROUGHPUT_SHIFT 3 |
Throughput shift. | |
#define | IPTOS_RELIABILITY_SHIFT 2 |
Reliability shift. | |
#define | IPTOS_COST_SHIFT 1 |
Cost shift. | |
#define | IPTOS_NORMALDELAY (0x0 << IPTOS_DELAY_SHIFT) |
Normal delay. | |
#define | IPTOS_LOWDELAY (0x1 << IPTOS_DELAY_SHIFT) |
Low delay. | |
#define | IPTOS_NORMALTHROUGHPUT (0x0 << IPTOS_THROUGHPUT_SHIFT) |
Normal throughput. | |
#define | IPTOS_THROUGHPUT (0x1 << IPTOS_THROUGHPUT_SHIFT) |
Throughput. | |
#define | IPTOS_NORMALRELIABILITY (0x0 << IPTOS_RELIABILITY_SHIFT) |
Normal reliability. | |
#define | IPTOS_RELIABILITY (0x1 << IPTOS_RELIABILITY_SHIFT) |
Reliability. | |
#define | IPTOS_NORMALCOST (0x0 << IPTOS_COST_SHIFT) |
Normal cost. | |
#define | IPTOS_MICNCOST (0x1 << IPTOS_COST_SHIFT) |
Minimum cost. | |
IP TOS precedence definitions | |
#define | IPTOS_PREC_MASK 0xE0 |
Precedence mask. | |
#define | IPTOS_PREC_ROUTINE (0x0 << IPTOS_PRECEDENCE_SHIFT) |
Routine precedence. | |
#define | IPTOS_PREC_PRIORITY (0x1 << IPTOS_PRECEDENCE_SHIFT) |
Priority precedence. | |
#define | IPTOS_PREC_IMMEDIATE (0x2 << IPTOS_PRECEDENCE_SHIFT) |
Immediate precedence. | |
#define | IPTOS_PREC_FLASH (0x3 << IPTOS_PRECEDENCE_SHIFT) |
Flash precedence. | |
#define | IPTOS_PREC_FLASHOVERRIDE (0x4 << IPTOS_PRECEDENCE_SHIFT) |
Flash override precedence. | |
#define | IPTOS_PREC_CRITIC_ECP (0x5 << IPTOS_PRECEDENCE_SHIFT) |
Critical precedence. | |
#define | IPTOS_PREC_INTERNETCONTROL (0x6 << IPTOS_PRECEDENCE_SHIFT) |
Inter-network control precedence. | |
#define | IPTOS_PREC_NETCONTROL (0x7 << IPTOS_PRECEDENCE_SHIFT) |
Network control precedence. | |
IP options definitions | |
#define | IPOPT_COPY_SHIFT 7 |
Copy shift. | |
#define | IPOPT_CLASS_SHIFT 5 |
Class shift. | |
#define | IPOPT_NUMBER_SHIFT 0 |
Number shift. | |
#define | IPOPT_CLASS_MASK 0x60 |
Class mask. | |
#define | IPOPT_NUMBER_MASK 0x1F |
Number mask. | |
#define | IPOPT_COPY (1 << IPOPT_COPY_SHIFT) |
Copy flag. | |
#define | IPOPT_TYPE(copy, class, number) (((copy) &IPOPT_COPY) | ((class) &IPOPT_CLASS_MASK) | ((number << IPOPT_NUMBER_SHIFT) &IPOPT_NUMBER_MASK)) |
Returns IP option type. | |
#define | IPOPT_COPIED(o) ((o) &IPOPT_COPY) |
Returns a value indicating whether the IP option should be copied. | |
#define | IPOPT_CLASS(o) ((o) &IPOPT_CLASS_MASK) |
Returns an IP option class. | |
#define | IPOPT_NUMBER(o) ((o) &IPOPT_NUMBER_MASK) |
Returns an IP option number. | |
IP option class definitions | |
#define | IPOPT_CONTROL (0 << IPOPT_CLASS_SHIFT) |
Control class. | |
#define | IPOPT_RESERVED1 (1 << IPOPT_CLASS_SHIFT) |
Reserved class 1. | |
#define | IPOPT_MEASUREMENT (2 << IPOPT_CLASS_SHIFT) |
Measurement class. | |
#define | IPOPT_RESERVED2 (3 << IPOPT_CLASS_SHIFT) |
Reserved class 2. | |
IP option type definitions | |
#define | IPOPT_END IPOPT_TYPE(0, IPOPT_CONTROL, 0) |
End of list. | |
#define | IPOPT_NOOP IPOPT_TYPE(0, IPOPT_CONTROL, 1) |
No operation. | |
#define | IPOPT_SEC IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 2) |
Security. | |
#define | IPOPT_LSRR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 3) |
Loose source. | |
#define | IPOPT_SSRR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 9) |
Strict route. | |
#define | IPOPT_RR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 7) |
Record route. | |
#define | IPOPT_SID IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 8) |
Stream identifier. | |
#define | IPOPT_SID_LENGTH 4 |
Stream identifier length. | |
#define | IPOPT_TIMESTAMP IPOPT_TYPE(IPOPT_COPY, IPOPT_MEASUREMENT, 4) |
Internet timestamp. | |
#define | IPOPT_CIPSO IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 5) |
Commercial IP security option. | |
#define | IPOPT_NOP IPOPT_NOOP |
No operation variant. | |
#define | IPOPT_EOL IPOPT_END |
End of list variant. | |
#define | IPOPT_TS IPOPT_TIMESTAMP |
Timestamp variant. | |
IP security option definitions | |
#define | IPOPT_SEC_LENGTH 11 |
Security length. | |
#define | IPOPT_SEC_UNCLASIFIED 0x0 |
Unclasified. | |
#define | IPOPT_SEC_CONFIDENTIAL 0xF035 |
Confidential. | |
#define | IPOPT_SEC_EFTO 0x789A |
EFTO. | |
#define | IPOPT_SEC_MMMM 0xBC4D |
MMMM. | |
#define | IPOPT_SEC_PROG 0x5E26 |
PROG. | |
#define | IPOPT_SEC_RESTRICTED 0xAF13 |
Restricted. | |
#define | IPOPT_SEC_SECRET 0xD788 |
Secret. | |
#define | IPOPT_SEC_TOP_SECRET 0x6BC5 |
Top secret. | |
IP timestamp option definitions | |
#define | IPOPT_TS_TSONLY 0 |
Tiemstamp only. | |
#define | IPOPT_TS_TSANDADDR 1 |
Timestamps and addresses. | |
#define | IPOPT_TS_PRESPEC 3 |
Specified modules only. | |
Typedefs | |
typedef uint8_t | ip_ttl_t |
IP time to live counter type definition. | |
typedef uint8_t | ip_tos_t |
IP type of service type definition. | |
typedef uint8_t | ip_protocol_t |
IP transport protocol type definition. |
IP codes and definitions.