7 void do_string_to_ipaddress(unsigned char * ip, IPADDRESS & ipaddress) {
11 unsigned long do_ipaddress_to_unsigned_long(IPADDRESS & ipaddress) {
15 // ip address conversion functions
16 void do_binary_to_ipaddress(unsigned char* ip,IPADDRESS& ipaddress) {
24 // ip address conversion functions
25 void do_binary_to_string(unsigned char* ip,char* buffer) {
27 do_binary_to_ipaddress(ip, ipaddress);
28 do_ipaddress_to_string(ipaddress, buffer);
31 void do_ipaddress_to_string(IPADDRESS ipaddress, char* buffer) {
32 sprintf(buffer,"%d.%d.%d.%d", ipaddress.a1, ipaddress.a2, ipaddress.a3, ipaddress.a4);
36 // this function returns the ip protocol string based on the ip protocol number
37 char* return_ip_protocol(unsigned char protocol) {
41 } else if(protocol == 0x6) {
43 } else if(protocol == 17) {
45 } else if(protocol == 121) {