Reply to post: Re: Compatibility

OK, this time it's for real: The last available IPv4 address block has gone

I am the liquor

Re: Compatibility

Computationally, strcmp is, and always has been, the wrong way to do this. The correct answer, as it always has been, is to use inet_pton (or the equivalent in your favourite language) and compare the two addresses in binary form.

I think Adam's point was that the human brain's stdlib only has strcmp(). It doesn't implement inet_pton or binary comparison.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019