| 40 | }; |
| 41 | |
| 42 | struct DHCPHeader { |
| 43 | uint8_t op; // Operation code |
| 44 | uint8_t htype; // Hardware type (1 = Ethernet) |
| 45 | uint8_t hlen; // Length of hardware addresses (6 = MAC) |
| 46 | uint8_t hops; |
| 47 | BigEndianUInt32 xID; // Transmission ID |
| 48 | BigEndianUInt16 secs; // NUmber of seconds since the process has started |
| 49 | BigEndianUInt16 flags; // Flags |
| 50 | uint32_t clientIP; // Client's IP Address if known |
| 51 | uint32_t yourIP; // IP Address assigned to client |
| 52 | uint32_t serverIP; // Server IP Address |
| 53 | uint32_t gatewayIP; // Gateway IP Address |
| 54 | uint8_t clientAddress[16]; // Client Hardware Address |
| 55 | int8_t serverName[64]; // Server name |
| 56 | uint8_t bootFilename[128]; |
| 57 | BigEndianUInt32 cookie; |
| 58 | uint8_t options[100]; |
| 59 | } __attribute__((packed)); |
| 60 | |
| 61 | template<uint8_t optlen> |
| 62 | struct DHCPOption{ |
nothing calls this directly
no outgoing calls
no test coverage detected