--------------------- PatchSet 6166 Date: 2007/11/22 14:16:17 Author: rmartinez Branch: squid3-ipv6 Tag: (none) Log: As strings, the code is IP independent ;-) ! Members: src/snmp_agent.cc:1.7.4.14->1.7.4.15 Index: squid3/src/snmp_agent.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/snmp_agent.cc,v retrieving revision 1.7.4.14 retrieving revision 1.7.4.15 diff -u -r1.7.4.14 -r1.7.4.15 --- squid3/src/snmp_agent.cc 22 Nov 2007 14:12:32 -0000 1.7.4.14 +++ squid3/src/snmp_agent.cc 22 Nov 2007 14:16:17 -0000 1.7.4.15 @@ -1,5 +1,5 @@ /* - * $Id: snmp_agent.cc,v 1.7.4.14 2007/11/22 14:12:32 rmartinez Exp $ + * $Id: snmp_agent.cc,v 1.7.4.15 2007/11/22 14:16:17 rmartinez Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis @@ -243,19 +243,10 @@ // like IpAddr does (SMI_IPADDRESS) // See: rfc4001.txt Answer->type = ASN_OCTET_STR; - if (laddr.IsIPv4()) { - char host[MAX_IPSTRLEN]; - laddr.NtoA(host,MAX_IPSTRLEN); - Answer->val_len = strlen(host); - Answer->val.string = (u_char *) xstrdup(host); - } -#if USE_IPV6 - else { /* It's an IPv6 value */ - Answer->val_len = sizeof(struct in6_addr); - struct in6_addr *iaddr6 = (struct in6_addr *)Answer->val.string; - laddr.GetInAddr(*iaddr6); - } -#endif /* USE_IPV6 */ + char host[MAX_IPSTRLEN]; + laddr.NtoA(host,MAX_IPSTRLEN); + Answer->val_len = strlen(host); + Answer->val.string = (u_char *) xstrdup(host); } break;