summaryrefslogtreecommitdiffstats
path: root/ospfclient (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: Convert event.h to frrevent.hDonald Sharp2023-03-242-2/+2
| | | | | | | We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert `struct event_master` to `struct event_loop`Donald Sharp2023-03-241-1/+1
| | | | | | Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_master_XXX functions to event_master_XXXDonald Sharp2023-03-241-1/+1
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp2023-03-241-4/+4
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert struct thread_master to struct event_master and it's ilkDonald Sharp2023-03-241-1/+1
| | | | | | | Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_fetch and thread_call to event_fetch and event_callDonald Sharp2023-03-241-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Convert thread_add_XXX functions to event_add_XXXDonald Sharp2023-03-241-5/+5
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename `struct thread` to `struct event`Donald Sharp2023-03-241-4/+4
| | | | | | | | | Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Rename thread.[ch] to event.[ch]Donald Sharp2023-03-242-2/+2
| | | | | | | | | | | This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfclient: remove register "READY" requirementChristian Hopps2023-02-201-51/+89
| | | | | | - also add ability of the apibin to process commands on stdin Signed-off-by: Christian Hopps <chopps@labn.net>
* ospfclient: bugfix and no implicit registerChristian Hopps2023-02-201-31/+32
| | | | | | | - dont delete the callback on opaque data delete - require explicit registration Signed-off-by: Christian Hopps <chopps@labn.net>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-094-60/+4
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: sort out & explain licenses used in FRRDavid Lamparter2023-02-091-339/+0
| | | | | | | New "introduction" note in `COPYING`, and all the licenses moved into `doc/licenses/`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd, ospfclient: Do not just include .c files in another .cDonald Sharp2022-12-052-4/+1
| | | | | | | ospfclient.c includes .c files directly from ospfd. Let's separate these out a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfd/ospfclient: add option to flush/withdrawal with zero lengthLou Berger2022-10-214-23/+37
| | | | | | default behavior is unchanged, i.e., to not zero Signed-off-by: Lou Berger <lberger@labn.net>
* ospfd: ospf_apiserver.c - fix link local opaque LSA deleteLou Berger2022-10-212-4/+4
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testingLou Berger2022-10-191-0/+6
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospfclient: condition optimizationsri-mohan12022-07-271-6/+6
| | | | | | Its better to check the length and then the type of the LSA Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
* ospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into ↵Donald Sharp2022-07-221-0/+6
| | | | | | | | | | | | | stack Even though OSPF_MAX_LSA_SIZE is quite large and holds the upper bound on what can be written into a lsa, let's add a small check to ensure it is not possible to do a bad thing. This wins one of the long standing bug awards. 2003! Fixes: #11602 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* ospfclient: add router id support to python clientChristian Hopps2022-06-231-1/+52
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* ospfclient: fix help urlJafar Al-Gharaibeh2022-06-211-3/+2
| | | | Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* ospfclient: add ospfclient api python classChristian Hopps2022-06-022-0/+1141
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* *: Properly use memset() when zeroingDonatas Abraitis2022-05-111-2/+2
| | | | | | | Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* *: Fix spelling of FollowingDonald Sharp2022-04-011-3/+3
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Change thread->func to return void instead of intDonald Sharp2022-02-241-11/+6
| | | | | | | The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* build: fix `AM_LDFLAGS` usage (and gcov)David Lamparter2021-07-211-1/+1
| | | | | | | | | | | | | | | | like the other automake variables, setting `xyz_LDFLAGS` causes `AM_LDFLAGS` to be ignored for `xyz`. For some reason I had in my mind that automake doesn't do this for LDFLAGS, but... it does. (Which is consistent with `_CFLAGS` and co.) So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which includes `SAN_FLAGS` too). Set up new `LIB_LDFLAGS` and `MODULE_LDFLAGS` to handle all of this correctly (and move these bits to a central location.) Fixes: #9034 Fixes: 0c4285d77eb ("build: properly split CFLAGS from AC_CFLAGS") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: require semicolon after FRR_DAEMON_INFO & co.David Lamparter2021-03-171-1/+1
| | | | | | ... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: require semicolon after DEFINE_MTYPE & coDavid Lamparter2021-03-171-2/+2
| | | | | | | | | | | | | | | | | Back when I put this together in 2015, ISO C11 was still reasonably new and we couldn't require it just yet. Without ISO C11, there is no "good" way (only bad hacks) to require a semicolon after a macro that ends with a function definition. And if you added one anyway, you'd get "spurious semicolon" warnings on some compilers... With C11, `_Static_assert()` at the end of a macro will make it so that the semicolon is properly required, consumed, and not warned about. Consistently requiring semicolons after "file-level" macros matches Linux kernel coding style and helps some editors against mis-syntax'ing these macros. Signed-off-by: David Lamparter <equinox@diac24.net>
* lib/xref: put setup calls in librariesDavid Lamparter2021-02-011-0/+3
| | | | | | | | Our "true" libraries (i.e. not modules) don't invoke neither FRR_DAEMON_INFO nor FRR_MODULE_SETUP, hence XREF_SETUP isn't invoked either. Invoke it directly to get things working. Signed-off-by: David Lamparter <equinox@diac24.net>
* ospfclient: replace inet_ntoaMark Stapp2020-10-221-14/+15
| | | | | | Replace all use of inet_ntoa; use pI4 (and printfrr). Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ospfd: fix SA warnings in ospfd, ospfclientMark Stapp2020-10-141-6/+12
| | | | | | Fix some SA warnings in ospf GR and ospfclient code. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* ospfclient: Provide some protection against blindly trusting inputDonald Sharp2020-10-091-2/+17
| | | | | | | | | Coverity rightly points out that blindly trusting the lsalen from received data may not be the smartest thing to do. Add a bit of code to prevent us from blindly malloc'ing too much memory. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: Replace s_addr 0 => INADDR_ANYDonatas Abraitis2020-02-061-1/+1
| | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* ospfclient: don't install man pageDavid Lamparter2020-01-151-1/+1
| | | | | | | ... we're not installing ospfclient (it's a demo/example program), so installing the man page is quite useless. Signed-off-by: David Lamparter <equinox@diac24.net>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-1/+1
| | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* build: make rfptest and ospfclient "noinst"David Lamparter2018-10-281-1/+1
| | | | | | | | | | Both of these are testing/demo-style tools that don't make sense as part of a normal installation. So don't install them. NB: this is only the executables, libospfclient and the RFP code are not affected. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: add --enable-static-bin optionDavid Lamparter2018-10-011-1/+13
| | | | | | | | | This option can be used to get statically linked binaries. Note: libfrr.la is removed from modules' library dependency list. This is intentional and explained in a comment in lib/subdir.am. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-15/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+1
| | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* ospfd: Remove unused functionDonald Sharp2018-08-211-0/+1
| | | | | | | | | | | | | The ospf_external_route_lookup function was not being used so let's just remove it. Unfortunately the removal was not quite so simple as that ospf_asbr.h was being used to generate a reference for the `struct ospf_route` data structure, so we need to fix up the compile by fixing up header inclusions so that ospf_route.h is actually included Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: ALLOC calls cannot failDonald Sharp2018-08-111-8/+2
| | | | | | | | There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-273-46/+46
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp2017-08-094-29/+41
|\ | | | | more non-recursive build, fix cross-compile, & doc build mangling
| * build: non-recursive ospf*David Lamparter2017-08-044-29/+41
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: privs: make uid/gid accessible before setuidDavid Lamparter2017-08-021-0/+1
|/ | | | | | | | This splits off privs_preinit(), which does the lookups for user and group IDs. This is so the init code can create state directories while still running as root. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-173-862/+755
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: more `show thread cpu`Quentin Young2017-06-301-1/+1
| | | | | | | Add support for naming pthreads. Also, note that we don't have any records yet if that's the case. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: simplify log message lookupQuentin Young2017-06-211-2/+2
| | | | | | | | | | | | | | | | log.c provides functionality for associating a constant (typically a protocol constant) with a string and finding the string given the constant. However this is highly delicate code that is extremely prone to stack overflows and off-by-one's due to requiring the developer to always remember to update the array size constant and to do so correctly which, as shown by example, is never a good idea.b The original goal of this code was to try to implement lookups in O(1) time without a linear search through the message array. Since this code is used 99% of the time for debugs, it's worth the 5-6 additional cmp's worst case if it means we avoid explitable bugs due to oversights... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>