Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

net_ascii.h/net_ascii.c

Prototype

Code Block

          void  NetASCII_IPv4_to_Str(NET_IPv4_ADDR   addr_ip,
                                     CPU_CHAR       *p_addr_ip_ascii,
                                     CPU_BOOLEAN     lead_zeros,
                                     NET_ERR        *p_err);

Arguments

addr_ip

IPv4 address (in host-order).

...

RFC 1983 states that “dotted-decimal notation... refers [to] IPv4 addresses of the form A.B.C.D; where each letter represents, in decimal, one byte of a four-byte IPv4 address.” In other words, the dotted-decimal notation separates four decimal byte values by the dot, or period, character (‘.’). Each decimal value represents one byte of the IPv4 address starting with the most significant byte in network order.

IPv4 Address Examples:

Hexadecimal Equivalent
Dotted Decimal Notation

DOTTED DECIMAL NOTATION

HEXADECIMAL EQUIVALENT

127.0.0.1

0x7F000001

192.168.1.64

0xC0A80140

255.255.255.0

0xFFFFFF00

MSB ….…… LSB

MSB …. LSB

MSB

Most Significant Byte in Dotted-Decimal IPv4 Address

...