PelionIoT / nanostack-libservice

Other
2 stars 11 forks source link

Add IPv4 string conversion utils #69

Closed Taiki-San closed 6 years ago

Taiki-San commented 6 years ago

This PR is in response to https://github.com/ARMmbed/mbed-os/pull/6293#issuecomment-396533529 and introduce two utils, enabling :

Was not sure about the convention regarding the headers, so went with the existing ones after updating the year. Do you have any comment?

If this PR go through, I'll follow with the second suggestion of @kjbracey-arm then change the original PR (https://github.com/ARMmbed/mbed-os/pull/6293) to use those new utils, if that's ok with everyone.

Taiki-San commented 6 years ago

Are those changes what you had in mind @kjbracey-arm ?

Taiki-San commented 6 years ago

Hopefully, what was left should be fixed.

Taiki-San commented 6 years ago

After the change, the counter was incremented before the exit test, meaning it would have left after the third component instead of the forth.

Taiki-San commented 6 years ago

Sorry for missing that one. I squashed the various fixes in the first commit.

Taiki-San commented 6 years ago

Thanks. Once this one is merged, I'll have a look at the util determining if a string is an IPv4 or an IPv6 literal.

kjbracey commented 6 years ago

We should be doing a subtree merge of libservice into mbed-os next week, to pick up this and #68 and #70