mySqlToIp4: Convert MySQL ATONs to Rip4

Description Usage Arguments Details Value

View source: R/RcppExports.R

Description

When you query a MySQL db, you should use INET_ATON(ip_field) to convert a string IP to an (unsigned) int.

Usage

1

Arguments

x

input numeric vector

Details

Unfortunately, the RMySQL driver will convert these to doubles because not all unsigned ints are representable as ints. Because doubles get normalized, we can't mask subnets directly.

Instead, we can map the top half of unsigned integers to the negative half of signed ints using 2s-complement.

Value

integer format IP addresses


nfultz/Rip46 documentation built on May 23, 2019, 4:30 p.m.