|
|
|
|
@ -635,13 +635,13 @@ int32_t _csg_trend_send(pd_trend_port_t *ptrend)
|
|
|
|
|
sk_server = csg.wave_svr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char ip_str[INET_ADDRSTRLEN];
|
|
|
|
|
inet_ntop(AF_INET, &(sk_server.sin_addr), ip_str, sizeof(ip_str));
|
|
|
|
|
printf("IP Address: %s\n", ip_str);
|
|
|
|
|
//char ip_str[INET_ADDRSTRLEN];
|
|
|
|
|
//inet_ntop(AF_INET, &(sk_server.sin_addr), ip_str, sizeof(ip_str));
|
|
|
|
|
//printf("IP Address: %s\n", ip_str);
|
|
|
|
|
|
|
|
|
|
// 获取端口号,使用ntohs()函数转换回主机字节序
|
|
|
|
|
unsigned short port = ntohs(sk_server.sin_port);
|
|
|
|
|
printf("Port: %d\n", port);
|
|
|
|
|
//unsigned short port = ntohs(sk_server.sin_port);
|
|
|
|
|
//printf("Port: %d\n", port);
|
|
|
|
|
|
|
|
|
|
_csg_send(fd, pkt, pkt_head->len, sk_server);
|
|
|
|
|
}
|
|
|
|
|
|