Skip to content

Commit

Permalink
Add ipprefix cast operators for ipaddr [2/n] (facebookincubator#11481)
Browse files Browse the repository at this point in the history
Summary:

Support casting ipprefix -> ipaddress, and ipaddress -> ipprefix.

We just need one new helper function, tryIpPrefixLengthFromIPAddressType, which takes in int128_t, gets the ippaddress, and then we check if the ippaddress is ipv4 or ipv6 mapped. We return 32 for ipv4 and 128 for ipv6 mapped.

Also applies suggestion from https://github.com/facebookincubator/velox/pull/11309/files

Differential Revision: D65641994
  • Loading branch information
yuandagits authored and facebook-github-bot committed Nov 8, 2024
1 parent 31aa90c commit ec7ed79
Show file tree
Hide file tree
Showing 6 changed files with 384 additions and 118 deletions.
Loading

0 comments on commit ec7ed79

Please sign in to comment.