Lines Matching defs:fdb_entry
34 _cleanup_fdbentry_free_ FdbEntry *fdb_entry = NULL;
41 fdb_entry = hashmap_get(network->fdb_entries_by_section, UINT_TO_PTR(section));
42 if (fdb_entry) {
43 *ret = fdb_entry;
44 fdb_entry = NULL;
56 fdb_entry = new0(FdbEntry, 1);
58 if (!fdb_entry) {
65 fdb_entry->network = network;
66 fdb_entry->mac_addr = mac_addr;
68 LIST_PREPEND(static_fdb_entries, network->static_fdb_entries, fdb_entry);
71 fdb_entry->section = section;
73 UINT_TO_PTR(fdb_entry->section), fdb_entry);
77 *ret = fdb_entry;
78 fdb_entry = NULL;
97 int fdb_entry_configure(Link *const link, FdbEntry *const fdb_entry) {
104 assert(fdb_entry);
123 r = sd_netlink_message_append_ether_addr(req, NDA_LLADDR, fdb_entry->mac_addr);
128 if (0 != fdb_entry->vlan_id) {
129 r = sd_netlink_message_append_u16(req, NDA_VLAN, fdb_entry->vlan_id);
143 void fdb_entry_free(FdbEntry *fdb_entry) {
144 if(!fdb_entry)
147 if(fdb_entry->network) {
148 LIST_REMOVE(static_fdb_entries, fdb_entry->network->static_fdb_entries,
149 fdb_entry);
151 if (fdb_entry->section)
152 hashmap_remove(fdb_entry->network->fdb_entries_by_section,
153 UINT_TO_PTR(fdb_entry->section));
156 free(fdb_entry->mac_addr);
158 free(fdb_entry);
175 _cleanup_fdbentry_free_ FdbEntry *fdb_entry = NULL;
184 r = fdb_entry_new_static(network, section_line, &fdb_entry);
190 &fdb_entry->mac_addr->ether_addr_octet[0],
191 &fdb_entry->mac_addr->ether_addr_octet[1],
192 &fdb_entry->mac_addr->ether_addr_octet[2],
193 &fdb_entry->mac_addr->ether_addr_octet[3],
194 &fdb_entry->mac_addr->ether_addr_octet[4],
195 &fdb_entry->mac_addr->ether_addr_octet[5]);
202 fdb_entry = NULL;
221 _cleanup_fdbentry_free_ FdbEntry *fdb_entry = NULL;
230 r = fdb_entry_new_static(network, section_line, &fdb_entry);
236 rvalue, &fdb_entry->vlan_id, userdata);
240 fdb_entry = NULL;