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.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

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.