Created
January 7, 2014 03:14
-
-
Save lucemia/8294130 to your computer and use it in GitHub Desktop.
open bidder how to decode ip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This field is indeed a little nasty, for parsing it check the documentation from the protobuf: | |
| // The first 3 bytes of the IP address in network byte order for IPv4, or the | |
| // first 6 bytes for IPv6. Note that the number and position of the bytes | |
| // included from IPv6 addresses may change later. | |
| This means you must first check if the size is 3 or 6 bytes, then depending on the size you can get the raw bytes and create the partial IP of the correct type. The last octet is not provided because Ad Exchange removes this information for privacy reasons. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment