: Daniel Tingstrom; net-snmp-coders@lists.sourceforge.net
Subject: Re: Creating inetCidrRouteTable row entries
Den 21-01-2014 16:32, Daniel Tingstrom skrev:
> I couldn't find an existing function to convert a prefix length to a
> netmask, so I just wrote my own. Net SNMP version is 5.
Den 21-01-2014 16:32, Daniel Tingstrom skrev:
> I couldn't find an existing function to convert a prefix length to a
> netmask, so I just wrote my own. Net SNMP version is 5.7.2. Here is the
> patch:
Thanks for finding this!
> --- route_ioctl.c.old 2012-10-09 18:28:58.0 -0400
> +++ route_
DEBUGSTR = inet_ntoa(mask.sin_addr);
DEBUGMSGTL(("access:route","mask %s\n", DEBUGSTR));
Daniel
-Original Message-
From: Daniel Tingstrom [mailto:dtingst...@atcorp.com]
Sent: Tuesday, January 21, 2014 9:50 AM
To: net-snmp-coders@lists.sourceforge.net
Subject: RE: Creati
FYI, the prefix length can be accessed by entry->rt_pfx_len in this method
(_netsnmp_ioctl_route_set_v4). I wrote a little code to convert
entry->rt_pfx_len (the prefix length) to a netmask (unsigned int) and
tried it out. Adding new routes via inetCidrRouteTable seems to work now.
If anyone's inte