summaryrefslogtreecommitdiff
path: root/ospfclient
AgeCommit message (Collapse)Author
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert `struct event_master` to `struct event_loop`Donald Sharp
Let's find a better name for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_master_XXX functions to event_master_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert THREAD_XXX macros to EVENT_XXX macrosDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert struct thread_master to struct event_master and it's ilkDonald Sharp
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_fetch and thread_call to event_fetch and event_callDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Convert thread_add_XXX functions to event_add_XXXDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
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>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
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>
2023-02-20ospfclient: remove register "READY" requirementChristian Hopps
- also add ability of the apibin to process commands on stdin Signed-off-by: Christian Hopps <chopps@labn.net>
2023-02-20ospfclient: bugfix and no implicit registerChristian Hopps
- dont delete the callback on opaque data delete - require explicit registration Signed-off-by: Christian Hopps <chopps@labn.net>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09*: sort out & explain licenses used in FRRDavid Lamparter
New "introduction" note in `COPYING`, and all the licenses moved into `doc/licenses/`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-12-05ospfd, ospfclient: Do not just include .c files in another .cDonald Sharp
ospfclient.c includes .c files directly from ospfd. Let's separate these out a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-10-21ospfd/ospfclient: add option to flush/withdrawal with zero lengthLou Berger
default behavior is unchanged, i.e., to not zero Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-21ospfd: ospf_apiserver.c - fix link local opaque LSA deleteLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2022-10-19ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testingLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2022-07-27ospfclient: condition optimizationsri-mohan1
Its better to check the length and then the type of the LSA Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-07-22ospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into ↵Donald Sharp
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>
2022-06-23ospfclient: add router id support to python clientChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-06-21ospfclient: fix help urlJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2022-06-02ospfclient: add ospfclient api python classChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-05-11*: Properly use memset() when zeroingDonatas Abraitis
Wrong: memset(&a, 0, sizeof(struct ...)); Good: memset(&a, 0, sizeof(a)); Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-01*: Fix spelling of FollowingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-23*: Change thread->func to return void instead of intDonald Sharp
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>
2021-07-21build: fix `AM_LDFLAGS` usage (and gcov)David Lamparter
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>
2021-03-17*: require semicolon after FRR_DAEMON_INFO & co.David Lamparter
... again ... Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17*: require semicolon after DEFINE_MTYPE & coDavid Lamparter
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>
2021-02-01lib/xref: put setup calls in librariesDavid Lamparter
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>
2020-10-22ospfclient: replace inet_ntoaMark Stapp
Replace all use of inet_ntoa; use pI4 (and printfrr). Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-14ospfd: fix SA warnings in ospfd, ospfclientMark Stapp
Fix some SA warnings in ospf GR and ospfclient code. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-09ospfclient: Provide some protection against blindly trusting inputDonald Sharp
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>
2020-02-06*: Replace s_addr 0 => INADDR_ANYDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-01-15ospfclient: don't install man pageDavid Lamparter
... 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>
2020-01-15doc: rename man pages to frr-*David Lamparter
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>
2019-01-30build: fix a whole bunch of *FLAGSDavid Lamparter
- 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>
2018-10-28build: make rfptest and ospfclient "noinst"David Lamparter
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>
2018-10-01build: add --enable-static-bin optionDavid Lamparter
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>
2018-09-09build: fix not building docs w/o sphinxDavid Lamparter
Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08*: cleanup .gitignore filesDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08build: move vtysh & manpage listings to subdir.amDavid Lamparter
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>
2018-08-21ospfd: Remove unused functionDonald Sharp
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>
2018-08-11*: ALLOC calls cannot failDonald Sharp
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>
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
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>
2017-08-09Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp
more non-recursive build, fix cross-compile, & doc build mangling
2017-08-04build: non-recursive ospf*David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-02lib: privs: make uid/gid accessible before setuidDavid Lamparter
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>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-29lib: more `show thread cpu`Quentin Young
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>
2017-06-21*: simplify log message lookupQuentin Young
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>