summaryrefslogtreecommitdiffstats
path: root/ripd/rip_snmp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZDonald Sharp2023-11-211-1/+1
| | | | | | | | INTERFACE_NAMSIZ is just a redefine of IFNAMSIZ and IFNAMSIZ is the standard for interface name length on all platforms that FRR currently compiles on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-241-2/+2
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-241-2/+2
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-16/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: Properly use memset() when zeroingDonatas Abraitis2022-05-111-3/+3
| | | | | | | Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* *: clean up ifp-by-local-address function(s)David Lamparter2021-11-171-1/+1
| | | | | | | | | | | | | Most users of if_lookup_address_exact only cared about whether the address is any local address. Split that off into a separate function. For the users that actually need the ifp - which I'm about to add a few of - change it to prefer returning interfaces that are UP. (Function name changed due to slight change in behavior re. UP state, to avoid possible bugs from this change.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd: Fix misleading comments for some partsDonatas Abraitis2021-08-051-1/+1
| | | | | | Mostly just retrun => return and misleading comments at all. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* build: make builddir include path consistentDavid Lamparter2021-04-211-1/+1
| | | | | | | ... by referencing all autogenerated headers relative to the root directory. (90% of the changes here is `version.h`.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib, bgpd: add a specific oid_copy function for IPv6 addrsPat Ruddy2021-03-251-5/+4
| | | | | | | Do not overload the v4 oid_copy_addr function for ipv6 coverity does not like this kind of thing. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* *: require semicolon after FRR_DAEMON_INFO & co.David Lamparter2021-03-171-1/+2
| | | | | | ... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
* ripd: #if 0 we know what you are up to.Donald Sharp2021-01-281-11/+0
| | | | | | rip, ripped out the #if 0 code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Replace `sizeof something` to sizeof(something)Donatas Abraitis2020-03-081-1/+1
| | | | | | Satisfy checkpatch.pl requirements (check for sizeof without parenthesis) Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: Remove break after returnDonatas Abraitis2020-02-131-4/+0
| | | | | | Just a deadcode. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* *: strip trailing whitespaceQuentin Young2019-09-301-1/+1
| | | | | | Some of it has snuck by CI Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* ripd: remove the rip global variableRenato Westphal2019-01-181-7/+12
| | | | | | | | | | | | | | | | This is the last step to make ripd ready for multi-instance support. Remove the rip global variable and add a "rip" parameter to all functions that need to know the RIP instance they are working on. On some functions, retrieve the RIP instance from the interface variable when it exists (this assumes interfaces can pertain to one RIP instance at most, which is ok for VRF support). In preparation for the next commits (VRF support), add a "vrd_id" member to the rip structure, and use rip->vrf_id instead of VRF_DEFAULT wherever possible. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: move global counters to the rip structureRenato Westphal2019-01-181-2/+5
| | | | | | | | The only sideeffect of this change is that these counters will be reset when RIP is deconfigured and then configured again, but this shouldn't be a problem as the RIP MIB isn't specific about this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: move "peer_list" to the rip structureRenato Westphal2019-01-181-0/+3
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* ripd: rip_snmp.c - Remove not needed checkIlya Shipitsin2018-04-111-1/+1
| | | | | | | | | | | | rn cannot be null here issue detected by cppcheck: [ripd/rip_snmp.c:208] -> [ripd/rip_snmp.c:207]: (warning) Either the condition 'if(rn&&!strncmp(i->name,ifp->name,INTERFACE_NAMSIZ))' is redundant or there is possible null pointer dereference: rn. Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-41/+41
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-442/+423
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-4/+3
| | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: snmp: convert into modulesDavid Lamparter2017-03-251-6/+22
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use hooks for sending SNMP trapsDavid Lamparter2017-03-251-7/+13
| | | | | | | This means there are no ties into the SNMP code anymore other than the init call at startup. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ripd: fix snmp compileDavid Lamparter2017-03-241-0/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib, pimd, zebra: Convert if_lookup_exact_address to VRF onlyDonald Sharp2017-03-151-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: snmp: add a load of "static" specifiersDavid Lamparter2016-07-281-3/+3
| | | | | | | Make it easier to see which bits in *_snmp.c are actually referenced from non-SNMP parts of the code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* snmp: fix warningsDavid Lamparter2016-05-261-3/+3
| | | | | | | batch-fix all warnings that come up when enabling AgentX SNMP support. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit dfee58f1d41a2e36c7f5f38a3ef5712224131824)
* Zebra: Add IPv6 protocol filtering support & Setting Src of IPv6 routesDinesh G Dutt2015-09-161-1/+1
| | | | | | | | | | | | | | | | | | Ticket: Reviewed By: CCR-3335 Testing Done: bgpsmoke, ENHE tests etc. Add support for filtering routes from upper layer protocols to zebra via route-maps for IPv6. The same functionality already existed for IPv4. In addition, add support for setting source of routes via IPv6 protocol map. Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Vivek Venkataraman <vivek@cumulusnetworks.com> Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com>
* *: nuke ^L (page feed)David Lamparter2014-06-041-3/+3
| | | | | | | | | | | | | | Quagga sources have inherited a slew of Page Feed (^L, \xC) characters from ancient history. Among other things, these break patchwork's XML-RPC API because \xC is not a valid character in XML documents. Nuke them from high orbit. Patches can be adapted simply by: sed -e 's%^L%%' -i filename.patch (you can type page feeds in some environments with Ctrl-V Ctrl-L) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* snmp: let handlers accept OID from a lesser prefixVincent Bernat2012-06-251-0/+12
| | | | | | | | | Most table handlers do not expect to be given an OID whose prefix is outside what they can handle. This is not a problem with the SMUX implementation since it always correct the OID such that the prefix matches. However, this is not the case for the AgentX implementation. A new function, smux_header_table() is used to do this normalization.
* build: only define HAVE_SNMPVincent Bernat2012-06-251-6/+0
| | | | | NetSNMP is the only SNMP implementation for Quagga. We don't need two different symbols.
* [snmp] Compiler warning fixes for when "--enable-snmp" is configured.Chris Caputo2009-06-021-5/+9
| | | | | Compiled on 32-bit and 64-bit linux gcc 4.1.2 platforms. No run-time testing on 32-bit and limited run-time testing on 64-bit.
* Make --enable-snmp cross compile and make libcrypto optional with ↵Joakim Tjernlund2008-08-251-1/+3
| | | | | | | --without-crypto Autoconfig work by me, the rest was done by "Kirill K. Smirnov" <lich@math.spbu.ru>
* 2005-09-29 Alain Ritoux <alain.ritoux@6wind.com>vincent2005-09-291-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/filer.c: show protocol name in filter_show() * lib/plist.c: show protocol name in vty_show_prefix_entry() * routemap.c: show protocol name in vty_show_route_map_entry() * lib/vty.c: in vty_command(), show protocol name if command unknown * zebra/zserv.c: Always provide distance fo route add * ripd/rip_snmp.c: rip2IfConfReceive() sends values in conformance with RFC. Also PeerDomain is now set to a STRING type. * ripd/ripd.h: rip_redistribute_add() API includes metric and distance * ripd/ripd.c: rip_redistribute_add() API i.e. stores metric and distance Now allows a RIP-route to overcome a redistributed route coming from a protocol with worse (higher) administrative distance Metrics from redistribution are shown in show ip rip * ripd/rip_zebra.c: adapt to the rip_redistribute_add() API, i.e. provide distance and metric * ripd/rip_interface.c: adapt to the rip_redistribute_add() API * ripd/rip_routemap.c: no RMAP_COMPILE_ERROR on (metric > 16) usage rather a CMD_WARNING, because set metric ius shared with other protocols using larger values (such as OSPF) The match metric action takes first external metric if present (from redistribution) then RIP metric.
* Make initializing smux connection configurable - "smux peer OID" commandhasso2004-10-131-7/+1
| | | | | initializes connection, and "no smux peer" command terminates it. Fixes bugzilla #47 and #112.
* 2003-06-19 Paul Jakma <paul@dishone.st>paul2003-06-191-3/+5
| | | | | * Fix lib/smux.c's reliance on daemons exporting struct thread_master *master.
* Fix build for net-snmppaul2003-03-181-0/+3
|
* Initial revisionpaul2002-12-131-0/+577