MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DHCP_Packet

Class DHCP_Packet

pcsx2/DEV9/PacketReader/IP/UDP/DHCP/DHCP_Packet.h:12–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace PacketReader::IP::UDP::DHCP
11{
12 class DHCP_Packet : public Payload
13 {
14 public:
15 u8 op;
16 u8 hardwareType;
17 u8 hardwareAddressLength;
18 u8 hops;
19 u32 transactionID; //xid
20 u16 seconds;
21 u16 flags;
22 IP_Address clientIP{};
23 IP_Address yourIP{};
24 IP_Address serverIP{};
25 IP_Address gatewayIP{};
26 u8 clientHardwareAddress[16]{}; //always 16 bytes, regardless of HardwareAddressLength
27 //192 bytes of padding
28 u32 magicCookie;
29 //Assumes ownership of ptrs assigned to it
30 std::vector<BaseOption*> options;
31
32 //used by GetLength & WriteBytes
33 int maxLength = 576;
34
35 DHCP_Packet() {}
36 DHCP_Packet(const u8* buffer, int bufferSize);
37 DHCP_Packet(const DHCP_Packet&);
38
39 virtual int GetLength();
40 virtual void WriteBytes(u8* buffer, int* offset);
41 virtual DHCP_Packet* Clone() const;
42
43 virtual ~DHCP_Packet();
44 };
45} // namespace PacketReader::IP::UDP::DHCP

Callers 1

SendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected