Skip to content

Commit

Permalink
move to pre-def constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jrepp authored and jrepp committed Mar 15, 2024
1 parent 60b37e0 commit f4d2749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
// Replacement address RFC 4291: https://tools.ietf.org/html/rfc4291

// These constants are for self-documenting string formatting expansions
const uint32_t IPV6_STRING_SIZE =
sizeof "[1234:1234:1234:1234:1234:1234:1234:1234/128%longinterface]:65535";
const uint32_t IPV4_STRING_SIZE = sizeof "255.255.255.255:65535";
// sizeof "[1234:1234:1234:1234:1234:1234:1234:1234/128%longinterface]:65535";
const uint32_t IPV6_STRING_SIZE = 66;
// sizeof "255.255.255.255:65535";
const uint32_t IPV4_STRING_SIZE = 22;

//
// Distinct states of parsing an address
Expand Down

0 comments on commit f4d2749

Please sign in to comment.