~ubuntu-branches/ubuntu/wily/net-snmp/wily-proposed

« back to all changes in this revision

Viewing changes to snmplib/snmpTCPIPv6Domain.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-28 14:59:36 UTC
  • mfrom: (1.2.3 upstream) (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100628145936-cbiallic69pn044g
Tags: 5.4.3~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/snmpd.postinst: source debconf before doing work, LP: #589056
  - debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
  - Add apport hook (LP: #533603):
  - debian/{snmp,snmpd}.apport: Added.
  - debian/control: Build-depends on dh-apport.
  - debian/rules: 
    + Add --with apport.
    + override_dh_apport to install hook on snmpd package only.
 * Dropped patches:
   - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
#ifdef NETSNMP_TRANSPORT_TCPIPV6_DOMAIN
4
4
 
5
 
/*
6
 
 * hack-o-matic for Cygwin to use winsock2
7
 
*/
8
 
#if defined(cygwin)
9
 
#undef HAVE_UNISTD_H
10
 
#undef HAVE_NETINET_IN_H
11
 
#undef HAVE_ARPA_INET_H
12
 
#undef HAVE_NET_IF_H
13
 
#undef HAVE_NETDB_H
14
 
#undef HAVE_SYS_PARAM_H
15
 
#undef HAVE_SYS_SELECT_H
16
 
#undef HAVE_SYS_SOCKET_H
17
 
#undef HAVE_IN_ADDR_T
18
 
#endif
19
 
 
20
5
#include <stdio.h>
21
6
#include <sys/types.h>
22
7
#include <errno.h>
36
21
#include <sys/socket.h>
37
22
#endif
38
23
 
39
 
#if defined(HAVE_WINSOCK_H) || defined(cygwin)
 
24
#if defined(HAVE_WINSOCK_H)
40
25
    /*
41
26
     * Windows IPv6 support is part of WinSock2 only
42
27
     */
99
84
        char addr[INET6_ADDRSTRLEN];
100
85
        char tmp[INET6_ADDRSTRLEN + 18];
101
86
 
102
 
        sprintf(tmp, "TCP/IPv6: [%s]:%hd",
 
87
        sprintf(tmp, "TCP/IPv6: [%s]:%hu",
103
88
                inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
104
89
                          INET6_ADDRSTRLEN), ntohs(to->sin6_port));
105
90
        return strdup(tmp);