aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp
AgeCommit message (Expand)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion11-70/+0
2021-12-03api: refactor to use REPLY_MSG_ID_BASE #defineKlement Sekera2-8/+8
2021-10-21fib: respect mfib entry flags on create with pathsPaul Atkins2-11/+13
2021-05-13tests: move test source to vpp/testDave Wallace2-912/+0
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-1/+0
2021-02-11tests: tag the tests that do not work with multi-worker configurationAndrew Yourtchenko1-0/+2
2020-12-14misc: move to new pool_foreach macrosDamjan Marion2-9/+9
2020-12-08fib: Source Address SelectionNeale Ranns1-2/+2
2020-05-06docs: clean up make docs jobPaul Vinciguerra5-13/+10
2020-04-16igmp: fix igmp proxy group mergeBenoît Ganne6-24/+25
2020-03-17fib: Always install all routers mcast addressesNeale Ranns1-3/+3
2020-02-18misc: fix coverity warningsDave Barach1-1/+1
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-1/+1
2020-01-03igmp: Add feature.yamlNeale Ranns1-0/+9
2019-12-14tests: changes for scapy 2.4.3 migrationsnaramre1-1/+2
2019-12-06igmp: use explicit types in apiOle Troan1-10/+11
2019-11-08tests: python3 use byte strings in raw()Ole Troan1-1/+1
2019-11-05misc: Fix python scripts shebang lineRenato Botelho do Couto1-1/+1
2019-09-27igmp: remove api boilerplateOle Troan4-145/+6
2019-09-16api: autogenerate api trace print/endianOle Troan1-0/+4
2019-08-22tests: move plugin tests to src/plugins/*/testDave Wallace2-0/+909
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-1/+1
2019-06-30igmp: accept packets that have more on the wire data than IGMP reports.Neale Ranns1-13/+19
2019-06-28igmp: Trace more data form input packetsNeale Ranns2-7/+16
2019-06-18fib: fib api updatesNeale Ranns2-22/+19
2019-05-16init / exit function orderingDave Barach3-22/+21
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
2019-04-23API: Python and Unix domain socket improvementOle Troan2-7/+3
2019-04-10API: Fix shared memory only action handlers.Ole Troan1-21/+21
2019-03-14IGMP: typo and doc fix (no behaviour change)Neale Ranns2-7/+7
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion1-3/+0
2018-12-13make build failure.Paul Vinciguerra1-2/+2
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan1-2/+2
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-8/+8
2018-11-13IGMP: improve CLI debug outputNeale Ranns9-42/+163
2018-11-06IGMP: Improved handling of (*,G) join and leaveNeale Ranns1-20/+74
2018-10-23c11 safe string handling supportDave Barach6-12/+12
2018-10-16IGMP: proxy deviceJakub Grajciar15-12/+749
2018-10-01IGMP: handle (*,G) report with no source addressesNeale Ranns1-8/+14
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra12-17/+17
2018-08-27IGMP: enable command on cliNeale Ranns4-2/+84
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+4
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-2/+5
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+29
2018-07-12IGMP: validate the packets length in the DPNeale Ranns3-25/+55
2018-07-10IGMP: coverity found defectsNeale Ranns3-4/+10
2018-07-09IGMP improvementsNeale Ranns27-1734/+3760
2018-06-29igmp: bugfix and minor improvementsJakub Grajciar5-76/+60
2018-06-10IGMP: use simple u32 bit hash keyNeale Ranns3-18/+15
2018-06-08Add reaper functions to want events APIs (VPP-1304)Neale Ranns2-32/+43
(char *) vbl, (char *) value); svmdb_unmap (c); } static void unset_string (char *chroot_path, u8 * vbl) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); svmdb_local_unset_string_variable (c, (char *) vbl); svmdb_unmap (c); } static void dump_strings (char *chroot_path) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); svmdb_local_dump_strings (c); svmdb_unmap (c); } static void serialize_strings (char *chroot_path, char *filename) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); (void) svmdb_local_serialize_strings (c, filename); svmdb_unmap (c); } static void unserialize_strings (char *chroot_path, char *filename) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); (void) svmdb_local_unserialize_strings (c, filename); svmdb_unmap (c); } static void test_vlib_vec_rate (char *chroot_path, f64 vr) { svmdb_client_t *c; f64 *tv = 0; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); vec_add1 (tv, vr); svmdb_local_set_vec_variable (c, "vlib_vector_rate", (char *) tv, sizeof (*tv)); svmdb_unmap (c); vec_free (tv); } static void test_vec (char *chroot_path, u8 * vbl) { svmdb_client_t *c; u64 *tv = 0; int i; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); /* my amp goes to 11 */ for (i = 0; i < 11; i++) { vec_add1 (tv, i); } svmdb_local_set_vec_variable (c, (char *) vbl, (char *) tv, sizeof (tv[0])); svmdb_unmap (c); vec_free (tv); } static void fake_install (char *chroot_path, u8 * add_value) { svmdb_client_t *c; u8 *v = 0; u8 **values = 0; u8 *oldvalue; u8 *value; int nitems = 0, i; serialize_main_t m; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); oldvalue = svmdb_local_get_vec_variable (c, "installed_sw", 1); if (oldvalue) { unserialize_open_data (&m, oldvalue, vec_len (oldvalue)); nitems = unserialize_likely_small_unsigned_integer (&m); for (i = 0; i < nitems; i++) { unserialize_cstring (&m, (char **) &value); vec_add1 (values, value); } vec_free (v); } nitems++; value = format (0, "%s%c", add_value, 0); vec_add1 (values, value); fformat (stdout, "Resulting installed_sw vector:\n"); serialize_open_vector (&m, v); serialize_likely_small_unsigned_integer (&m, vec_len (values)); for (i = 0; i < vec_len (values); i++) { fformat (stdout, "%s\n", values[i]); serialize_cstring (&m, (char *) values[i]); } v = serialize_close_vector (&m); svmdb_local_set_vec_variable (c, "installed_sw", v, sizeof (v[0])); svmdb_unmap (c); for (i = 0; i < vec_len (values); i++) vec_free (values[i]); vec_free (values); } static void sigaction_handler (int signum, siginfo_t * i, void *notused) { u32 action, opaque; action = (u32) (uword) i->si_ptr; action >>= 28; opaque = (u32) (uword) i->si_ptr; opaque &= ~(0xF0000000); clib_warning ("signal %d, action %d, opaque %x", signum, action, opaque); } static void test_reg (char *chroot_path, u8 * vbl) { svmdb_client_t *c; svmdb_notification_args_t args; svmdb_notification_args_t *a = &args; struct sigaction sa; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); memset (&sa, 0, sizeof (sa)); sa.sa_sigaction = sigaction_handler; sa.sa_flags = SA_SIGINFO; if (sigaction (SIGUSR2, &sa, 0) < 0) { clib_unix_warning ("sigaction"); return; } memset (a, 0, sizeof (*a)); c = svmdb_map (ma); a->add_del = 1 /* add */ ; a->nspace = SVMDB_NAMESPACE_STRING; a->var = (char *) vbl; a->elsize = 1; a->signum = SIGUSR2; a->action = SVMDB_ACTION_GET; a->opaque = 0x0eadbeef; svmdb_local_add_del_notification (c, a); (void) svmdb_local_get_string_variable (c, (char *) vbl); a->add_del = 0; /* del */ svmdb_local_add_del_notification (c, a); svmdb_unmap (c); } static void unset_vec (char *chroot_path, u8 * vbl) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); svmdb_local_unset_vec_variable (c, (char *) vbl); svmdb_unmap (c); } static void dump_vecs (char *chroot_path) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); svmdb_local_dump_vecs (c); svmdb_unmap (c); } static void crash_test (char *chroot_path) { svmdb_client_t *c; svmdb_map_args_t *ma; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); clib_warning ("Grab region mutex and crash deliberately!"); c->db_rp->mutex_owner_pid = getpid (); c->db_rp->mutex_owner_tag = -13; pthread_mutex_lock (&c->db_rp->mutex); abort (); } static void map_with_size (char *chroot_path, uword size) { svmdb_client_t *c; svmdb_map_args_t *ma; svmdbtool_main.size = size; ma = map_arg_setup (chroot_path); c = svmdb_map (ma); svmdb_unmap (c); } int main (int argc, char **argv) { unformat_input_t input; int parsed = 0; u8 *vbl = 0, *value = 0; char *chroot_path = 0; u8 *chroot_path_u8; u8 *filename; uword size; f64 vr; int uid, gid, rv; struct passwd _pw, *pw; struct group _grp, *grp; char *s, buf[128]; svmdbtool_main.uid = geteuid (); svmdbtool_main.gid = getegid (); unformat_init_command_line (&input, argv); while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT) { if (unformat (&input, "get-string %s", &vbl)) { get_string (chroot_path, vbl); vec_free (vbl); parsed++; } else if (unformat (&input, "set-string %s %s", &vbl, &value)) { set_string (chroot_path, vbl, value); vec_free (vbl); vec_free (value); parsed++; } else if (unformat (&input, "unset-string %s", &vbl)) { unset_string (chroot_path, vbl); vec_free (vbl); parsed++; } else if (unformat (&input, "dump-strings")) { dump_strings (chroot_path); parsed++; } else if (unformat (&input, "unset-vec %s", &vbl)) { unset_vec (chroot_path, vbl); vec_free (vbl); parsed++; } else if (unformat (&input, "dump-vecs")) { dump_vecs (chroot_path); parsed++; } else if (unformat (&input, "test-vec %s", &vbl)) { test_vec (chroot_path, vbl); // vec_free(vbl); parsed++; } else if (unformat (&input, "vlib-vec-rate %f", &vr)) { test_vlib_vec_rate (chroot_path, vr); parsed++; } else if (unformat (&input, "test-reg %s", &vbl)) { test_reg (chroot_path, vbl); parsed++; } else if (unformat (&input, "crash-test")) { crash_test (chroot_path); } else if (unformat (&input, "chroot %s", &chroot_path_u8)) { chroot_path = (char *) chroot_path_u8; } else if (unformat (&input, "fake-install %s", &value)) { fake_install (chroot_path, value); parsed++; } else if (unformat (&input, "size %d", &size)) { map_with_size (chroot_path, size); parsed++; } else if (unformat (&input, "uid %d", &uid)) svmdbtool_main.uid = uid; else if (unformat (&input, "gid %d", &gid)) svmdbtool_main.gid = gid; else if (unformat (&input, "uid %s", &s)) { /* lookup the username */ pw = NULL; rv = getpwnam_r (s, &_pw, buf, sizeof (buf), &pw); if (rv < 0) { fformat (stderr, "cannot fetch username %s", s); exit (1); } if (pw == NULL) { fformat (stderr, "username %s does not exist", s); exit (1); } vec_free (s); svmdbtool_main.uid = pw->pw_uid; } else if (unformat (&input, "gid %s", &s)) { /* lookup the group name */ grp = NULL; rv = getgrnam_r (s, &_grp, buf, sizeof (buf), &grp); if (rv != 0) { fformat (stderr, "cannot fetch group %s", s); exit (1); } if (grp == NULL) { fformat (stderr, "group %s does not exist", s); exit (1); } vec_free (s); svmdbtool_main.gid = grp->gr_gid; } else if (unformat (&input, "serialize-strings %s", &filename)) { vec_add1 (filename, 0); serialize_strings (chroot_path, (char *) filename); parsed++; } else if (unformat (&input, "unserialize-strings %s", &filename)) { vec_add1 (filename, 0); unserialize_strings (chroot_path, (char *) filename); parsed++; } else { break; } } unformat_free (&input); if (!parsed) { fformat (stdout, "%s: get-string <name> | set-string <name> <value>\n", argv[0]); fformat (stdout, " unset-string <name> | dump-strings\n"); fformat (stdout, " test-vec <name> |\n"); fformat (stdout, " unset-vec <name> | dump-vecs\n"); fformat (stdout, " chroot <prefix> [uid <nnn-or-userid>]\n"); fformat (stdout, " [gid <nnn-or-group-name>]\n"); } exit (0); } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */