@ -91,7 +91,7 @@ network_in(char *src, bool is_cidr)
else
else
ip_family ( dst ) = PGSQL_AF_INET ;
ip_family ( dst ) = PGSQL_AF_INET ;
bits = inet_net_pton ( ip_family ( dst ) , src , ip_addr ( dst ) ,
bits = pg_ inet_net_pton( ip_family ( dst ) , src , ip_addr ( dst ) ,
is_cidr ? ip_addrsize ( dst ) : - 1 ) ;
is_cidr ? ip_addrsize ( dst ) : - 1 ) ;
if ( ( bits < 0 ) | | ( bits > ip_maxbits ( dst ) ) )
if ( ( bits < 0 ) | | ( bits > ip_maxbits ( dst ) ) )
ereport ( ERROR ,
ereport ( ERROR ,
@ -145,7 +145,7 @@ network_out(inet *src, bool is_cidr)
char * dst ;
char * dst ;
int len ;
int len ;
dst = inet_net_ntop ( ip_family ( src ) , ip_addr ( src ) , ip_bits ( src ) ,
dst = pg_ inet_net_ntop( ip_family ( src ) , ip_addr ( src ) , ip_bits ( src ) ,
tmp , sizeof ( tmp ) ) ;
tmp , sizeof ( tmp ) ) ;
if ( dst = = NULL )
if ( dst = = NULL )
ereport ( ERROR ,
ereport ( ERROR ,
@ -1192,7 +1192,7 @@ network_host(PG_FUNCTION_ARGS)
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
/* force display of max bits, regardless of masklen... */
/* force display of max bits, regardless of masklen... */
if ( inet_net_ntop ( ip_family ( ip ) , ip_addr ( ip ) , ip_maxbits ( ip ) ,
if ( pg_ inet_net_ntop( ip_family ( ip ) , ip_addr ( ip ) , ip_maxbits ( ip ) ,
tmp , sizeof ( tmp ) ) = = NULL )
tmp , sizeof ( tmp ) ) = = NULL )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_INVALID_BINARY_REPRESENTATION ) ,
( errcode ( ERRCODE_INVALID_BINARY_REPRESENTATION ) ,
@ -1217,7 +1217,7 @@ network_show(PG_FUNCTION_ARGS)
int len ;
int len ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
if ( inet_net_ntop ( ip_family ( ip ) , ip_addr ( ip ) , ip_maxbits ( ip ) ,
if ( pg_ inet_net_ntop( ip_family ( ip ) , ip_addr ( ip ) , ip_maxbits ( ip ) ,
tmp , sizeof ( tmp ) ) = = NULL )
tmp , sizeof ( tmp ) ) = = NULL )
ereport ( ERROR ,
ereport ( ERROR ,
( errcode ( ERRCODE_INVALID_BINARY_REPRESENTATION ) ,
( errcode ( ERRCODE_INVALID_BINARY_REPRESENTATION ) ,
@ -1240,7 +1240,7 @@ inet_abbrev(PG_FUNCTION_ARGS)
char * dst ;
char * dst ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
dst = inet_net_ntop ( ip_family ( ip ) , ip_addr ( ip ) ,
dst = pg_ inet_net_ntop( ip_family ( ip ) , ip_addr ( ip ) ,
ip_bits ( ip ) , tmp , sizeof ( tmp ) ) ;
ip_bits ( ip ) , tmp , sizeof ( tmp ) ) ;
if ( dst = = NULL )
if ( dst = = NULL )
@ -1258,7 +1258,7 @@ cidr_abbrev(PG_FUNCTION_ARGS)
char * dst ;
char * dst ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
char tmp [ sizeof ( " xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:255.255.255.255/128 " ) ] ;
dst = inet_cidr_ntop ( ip_family ( ip ) , ip_addr ( ip ) ,
dst = pg_ inet_cidr_ntop( ip_family ( ip ) , ip_addr ( ip ) ,
ip_bits ( ip ) , tmp , sizeof ( tmp ) ) ;
ip_bits ( ip ) , tmp , sizeof ( tmp ) ) ;
if ( dst = = NULL )
if ( dst = = NULL )