Home
last modified time | relevance | path

Searched refs:lldp_rx (Results 1 – 10 of 10) sorted by relevance

/systemd-251/src/libsystemd-network/
Dsd-lldp-rx.c33 static void lldp_rx_flush_neighbors(sd_lldp_rx *lldp_rx) { in lldp_rx_flush_neighbors() argument
34 assert(lldp_rx); in lldp_rx_flush_neighbors()
36 hashmap_clear(lldp_rx->neighbor_by_id); in lldp_rx_flush_neighbors()
39 static void lldp_rx_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_event_t event, sd_lldp_neighbor *n) { in lldp_rx_callback() argument
40 assert(lldp_rx); in lldp_rx_callback()
43 if (!lldp_rx->callback) in lldp_rx_callback()
44 … return (void) log_lldp_rx(lldp_rx, "Received '%s' event.", lldp_rx_event_to_string(event)); in lldp_rx_callback()
46 log_lldp_rx(lldp_rx, "Invoking callback for '%s' event.", lldp_rx_event_to_string(event)); in lldp_rx_callback()
47 lldp_rx->callback(lldp_rx, event, n, lldp_rx->userdata); in lldp_rx_callback()
50 static int lldp_rx_make_space(sd_lldp_rx *lldp_rx, size_t extra) { in lldp_rx_make_space() argument
[all …]
Dtest-lldp-rx.c33 static void lldp_rx_handler(sd_lldp_rx *lldp_rx, sd_lldp_rx_event_t event, sd_lldp_neighbor *n, voi… in lldp_rx_handler() argument
37 static int start_lldp_rx(sd_lldp_rx **lldp_rx, sd_event *e, sd_lldp_rx_callback_t cb, void *cb_data… in start_lldp_rx() argument
40 r = sd_lldp_rx_new(lldp_rx); in start_lldp_rx()
44 r = sd_lldp_rx_set_ifindex(*lldp_rx, 42); in start_lldp_rx()
48 r = sd_lldp_rx_set_callback(*lldp_rx, cb, cb_data); in start_lldp_rx()
52 r = sd_lldp_rx_attach_event(*lldp_rx, e, 0); in start_lldp_rx()
56 r = sd_lldp_rx_start(*lldp_rx); in start_lldp_rx()
63 static int stop_lldp_rx(sd_lldp_rx *lldp_rx) { in stop_lldp_rx() argument
66 r = sd_lldp_rx_stop(lldp_rx); in stop_lldp_rx()
70 r = sd_lldp_rx_detach_event(lldp_rx); in stop_lldp_rx()
[all …]
Dlldp-neighbor.c52 assert(n->n_ref > 0 || n->lldp_rx); in sd_lldp_neighbor_ref()
84 if (n->n_ref <= 0 && !n->lldp_rx) in sd_lldp_neighbor_unref()
97 if (!n->lldp_rx) in lldp_neighbor_unlink()
104 (void) hashmap_remove_value(n->lldp_rx->neighbor_by_id, &n->id, n); in lldp_neighbor_unlink()
106 assert_se(prioq_remove(n->lldp_rx->neighbor_by_expiry, n, &n->prioq_idx) >= 0); in lldp_neighbor_unlink()
108 n->lldp_rx = NULL; in lldp_neighbor_unlink()
132 static int parse_string(sd_lldp_rx *lldp_rx, char **s, const void *q, size_t n) { in parse_string() argument
140 log_lldp_rx(lldp_rx, "Found duplicate string, ignoring field."); in parse_string()
153 log_lldp_rx(lldp_rx, "Found inner NUL in string, ignoring field."); in parse_string()
177 return log_lldp_rx_errno(n->lldp_rx, SYNTHETIC_ERRNO(EBADMSG), in lldp_neighbor_parse()
[all …]
Dfuzz-lldp-rx.c24 _cleanup_(sd_lldp_rx_unrefp) sd_lldp_rx *lldp_rx = NULL; in LLVMFuzzerTestOneInput()
30 assert_se(sd_lldp_rx_new(&lldp_rx) >= 0); in LLVMFuzzerTestOneInput()
31 assert_se(sd_lldp_rx_set_ifindex(lldp_rx, 42) >= 0); in LLVMFuzzerTestOneInput()
32 assert_se(sd_lldp_rx_attach_event(lldp_rx, e, 0) >= 0); in LLVMFuzzerTestOneInput()
33 assert_se(sd_lldp_rx_start(lldp_rx) >= 0); in LLVMFuzzerTestOneInput()
38 assert_se(sd_lldp_rx_stop(lldp_rx) >= 0); in LLVMFuzzerTestOneInput()
39 assert_se(sd_lldp_rx_detach_event(lldp_rx) >= 0); in LLVMFuzzerTestOneInput()
Dlldp-rx-internal.h39 #define log_lldp_rx_errno(lldp_rx, error, fmt, ...) \ argument
42 sd_lldp_rx, lldp_rx, \
44 #define log_lldp_rx(lldp_rx, fmt, ...) \ argument
47 sd_lldp_rx, lldp_rx, \
Dlldp-neighbor.h25 sd_lldp_rx *lldp_rx; member
/systemd-251/src/systemd/
Dsd-lldp-rx.h45 typedef void (*sd_lldp_rx_callback_t)(sd_lldp_rx *lldp_rx, sd_lldp_rx_event_t event, sd_lldp_neighb…
48 sd_lldp_rx *sd_lldp_rx_ref(sd_lldp_rx *lldp_rx);
49 sd_lldp_rx *sd_lldp_rx_unref(sd_lldp_rx *lldp_rx);
51 int sd_lldp_rx_start(sd_lldp_rx *lldp_rx);
52 int sd_lldp_rx_stop(sd_lldp_rx *lldp_rx);
53 int sd_lldp_rx_is_running(sd_lldp_rx *lldp_rx);
55 int sd_lldp_rx_attach_event(sd_lldp_rx *lldp_rx, sd_event *event, int64_t priority);
56 int sd_lldp_rx_detach_event(sd_lldp_rx *lldp_rx);
57 sd_event *sd_lldp_rx_get_event(sd_lldp_rx *lldp_rx);
59 int sd_lldp_rx_set_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_callback_t cb, void *userdata);
[all …]
/systemd-251/src/network/
Dnetworkd-lldp-rx.c51 static void lldp_rx_handler(sd_lldp_rx *lldp_rx, sd_lldp_rx_event_t event, sd_lldp_neighbor *n, voi… in lldp_rx_handler() argument
77 if (link->lldp_rx) in link_lldp_rx_configure()
80 r = sd_lldp_rx_new(&link->lldp_rx); in link_lldp_rx_configure()
84 r = sd_lldp_rx_attach_event(link->lldp_rx, link->manager->event, 0); in link_lldp_rx_configure()
88 r = sd_lldp_rx_set_ifindex(link->lldp_rx, link->ifindex); in link_lldp_rx_configure()
92 r = sd_lldp_rx_match_capabilities(link->lldp_rx, in link_lldp_rx_configure()
99 r = sd_lldp_rx_set_filter_address(link->lldp_rx, &link->hw_addr.ether); in link_lldp_rx_configure()
103 r = sd_lldp_rx_set_callback(link->lldp_rx, lldp_rx_handler, link); in link_lldp_rx_configure()
121 if (!link->lldp_rx) { in link_lldp_save()
126 r = sd_lldp_rx_get_neighbors(link->lldp_rx, &l); in link_lldp_save()
Dnetworkd-link.c191 link->lldp_rx = sd_lldp_rx_unref(link->lldp_rx); in link_free_engines()
343 k = sd_lldp_rx_stop(link->lldp_rx); in link_stop_engines()
668 if (link->lldp_rx) { in link_acquire_dynamic_conf()
669 r = sd_lldp_rx_start(link->lldp_rx); in link_acquire_dynamic_conf()
2200 if (link->lldp_rx) { in link_update_hardware_address()
2201 r = sd_lldp_rx_set_filter_address(link->lldp_rx, &link->hw_addr.ether); in link_update_hardware_address()
2377 if (link->lldp_rx) { in link_update_name()
2378 r = sd_lldp_rx_set_ifname(link->lldp_rx, link->ifname); in link_update_name()
Dnetworkd-link.h166 sd_lldp_rx *lldp_rx; member