… | |
… | |
62 | |
62 | |
63 | void |
63 | void |
64 | sockinfo::set (const conf_node *conf, u8 prot_) |
64 | sockinfo::set (const conf_node *conf, u8 prot_) |
65 | { |
65 | { |
66 | if (prot_ == PROT_DNSv4) |
66 | if (prot_ == PROT_DNSv4) |
67 | set (conf->dns_hostname, conf->dns_hostname ? conf->dns_port : 0, prot_); |
67 | { |
|
|
68 | host = 0x01010101; port = htons (conf->id); prot = prot_; |
|
|
69 | } |
68 | else |
70 | else |
69 | set (conf->hostname, |
71 | set (conf->hostname, |
70 | prot_ == PROT_UDPv4 ? conf->udp_port |
72 | prot_ == PROT_UDPv4 ? conf->udp_port |
71 | : prot_ == PROT_TCPv4 ? conf->tcp_port |
73 | : prot_ == PROT_TCPv4 ? conf->tcp_port |
72 | : prot_ == PROT_DNSv4 ? conf->dns_port |
74 | : prot_ == PROT_DNSv4 ? conf->dns_port |