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

« back to all changes in this revision

Viewing changes to agent/mibgroup/mibII/ipCidrRouteTable_access.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:
22
22
/** a global static we'll make use of a lot to map to the right
23
23
   datatype to return (which for SNMP integer's is always a long). */
24
24
static u_long long_ret;
25
 
  
 
25
static in_addr_t addr_ret;
26
26
 
27
27
/*
28
28
 * User-defined data access functions for data in table ipCidrRouteTable 
32
32
get_ipCidrRouteDest(void *data_context, size_t * ret_len)
33
33
{
34
34
    RTENTRY *ourroute = (RTENTRY *) data_context;
35
 
    long_ret = ((struct sockaddr_in *) (&ourroute->rt_dst))->sin_addr.s_addr;
36
 
    *ret_len = sizeof(long_ret);
37
 
    return &long_ret;
 
35
    addr_ret = ((struct sockaddr_in *) (&ourroute->rt_dst))->sin_addr.s_addr;
 
36
    *ret_len = sizeof(addr_ret);
 
37
    return &addr_ret;
38
38
}
39
39
 
40
40
u_long         *
41
41
get_ipCidrRouteMask(void *data_context, size_t * ret_len)
42
42
{
43
43
    RTENTRY *ourroute = (RTENTRY *) data_context;
44
 
    long_ret = ((struct sockaddr_in *) (&ourroute->rt_genmask))->sin_addr.s_addr;
45
 
    *ret_len = sizeof(long_ret);
46
 
    return &long_ret;
 
44
    addr_ret = ((struct sockaddr_in *) (&ourroute->rt_genmask))->sin_addr.s_addr;
 
45
    *ret_len = sizeof(addr_ret);
 
46
    return &addr_ret;
47
47
}
48
48
 
49
49
long           *
59
59
get_ipCidrRouteNextHop(void *data_context, size_t * ret_len)
60
60
{
61
61
    RTENTRY *ourroute = (RTENTRY *) data_context;
62
 
    long_ret = ((struct sockaddr_in *) (&ourroute->rt_gateway))->sin_addr.s_addr;
63
 
    *ret_len = sizeof(long_ret);
64
 
    return &long_ret;
 
62
    addr_ret = ((struct sockaddr_in *) (&ourroute->rt_gateway))->sin_addr.s_addr;
 
63
    *ret_len = sizeof(addr_ret);
 
64
    return &addr_ret;
65
65
}
66
66
 
67
67
long           *