2.2.1.2.4.1 IPv4 Address Structure
The IPv4 Address structure specifies the format of an IPv4 socket address. This structure is built as if on a little-endian machine and is treated as a byte array.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AddressFamily |
Port |
||||||||||||||||||||||||||||||
Address |
|||||||||||||||||||||||||||||||
Padding |
|||||||||||||||||||||||||||||||
... |
AddressFamily (2 bytes): The address family; MUST be 0x0002.
Port (2 bytes): An IP port number.
Address (4 bytes): An IP address, as specified in [RFC791].
Padding (8 bytes): This field is set to zero and ignored by the server.