@ -425,12 +425,12 @@ int main(void) {
}
}
memset ( & nat_ping_result , 0 , sizeof ( nat_ping_result ) ) ;
memset ( & nat_ping_result , 0 , sizeof ( nat_ping_result ) ) ;
/* nat_ip в network byte order, конвертируем в host order для API */
/* nat_ip уже в network byte order, API тоже принимает NBO */
uint32_t target_ip_hos t = ntohl ( link_sc1 - > nat_ip ) ;
uint32_t target_ip_ne t = link_sc1 - > nat_ip ;
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " TEST: sending ping with pubkey, nat_ip_net=0x%08x nat_ip_host=0x%08x nat_ port=%u " ,
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " TEST: sending ping with pubkey, nat_ip_net=0x%08x nat_port=%u " ,
link_sc1 - > nat_ip , target_ip_host , link_sc1 - > nat_port ) ;
link_sc1 - > nat_ip , link_sc1 - > nat_port ) ;
int ret = route_ping_send_req_addr ( inst_s - > bgp , conn_sc2 ,
int ret = route_ping_send_req_addr ( inst_s - > bgp , conn_sc2 ,
target_ip_hos t , link_sc1 - > nat_port ,
target_ip_ne t , link_sc1 - > nat_port ,
3 , 10 , 200 , 3000 , nat_ping_resp_cb , NULL ,
3 , 10 , 200 , 3000 , nat_ping_resp_cb , NULL ,
node_c1 - > node . public_key ) ;
node_c1 - > node . public_key ) ;
if ( ret ! = 0 ) {
if ( ret ! = 0 ) {
@ -473,12 +473,12 @@ int main(void) {
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " Testing route ping without embedded pubkey... " ) ;
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " Testing route ping without embedded pubkey... " ) ;
memset ( & nat_ping_result , 0 , sizeof ( nat_ping_result ) ) ;
memset ( & nat_ping_result , 0 , sizeof ( nat_ping_result ) ) ;
/* nat_ip в network byte order, конвертируем в host order для API */
/* nat_ip уже в network byte order, API тоже принимает NBO */
target_ip_hos t = ntohl ( link_sc1 - > nat_ip ) ;
target_ip_ne t = link_sc1 - > nat_ip ;
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " TEST: sending ping NO pubkey, nat_ip_net=0x%08x nat_ip_host=0x%08x nat_ port=%u " ,
DEBUG_INFO ( DEBUG_CATEGORY_BGP , " TEST: sending ping NO pubkey, nat_ip_net=0x%08x nat_port=%u " ,
link_sc1 - > nat_ip , target_ip_host , link_sc1 - > nat_port ) ;
link_sc1 - > nat_ip , link_sc1 - > nat_port ) ;
ret = route_ping_send_req_addr ( inst_s - > bgp , conn_sc2 ,
ret = route_ping_send_req_addr ( inst_s - > bgp , conn_sc2 ,
target_ip_hos t , link_sc1 - > nat_port ,
target_ip_ne t , link_sc1 - > nat_port ,
3 , 10 , 200 , 3000 , nat_ping_resp_cb , NULL ,
3 , 10 , 200 , 3000 , nat_ping_resp_cb , NULL ,
node_c1 - > node . public_key ) ;
node_c1 - > node . public_key ) ;
if ( ret ! = 0 ) {
if ( ret ! = 0 ) {