Lines Matching defs:entry

123 	struct proto_input_entry *entry;
128 entry = _MALLOC(sizeof (*entry), M_IFADDR, M_WAITOK);
130 if (entry == NULL)
133 bzero(entry, sizeof (*entry));
134 entry->protocol = protocol;
135 entry->input = input;
136 entry->detached = detached;
137 entry->hash = proto_hash_value(protocol);
138 entry->chain = chains;
143 entry->domain = dp;
147 entry->next = proto_input_add_list;
148 proto_input_add_list = entry;
161 struct proto_input_entry *entry = NULL;
163 for (entry = proto_hash[proto_hash_value(protocol)]; entry != NULL;
164 entry = entry->next) {
165 if (entry->protocol == protocol)
169 if (entry != NULL)
170 entry->detach = 1;
174 proto_delayed_attach(struct proto_input_entry *entry)
178 for (next_entry = entry->next; entry != NULL; entry = next_entry) {
182 hash_slot = proto_hash_value(entry->protocol);
183 next_entry = entry->next;
187 if (exist->protocol == entry->protocol)
191 /* If the entry already exists, call detached and dispose */
193 if (entry->detached)
194 entry->detached(entry->protocol);
195 FREE(entry, M_IFADDR);
197 entry->next = proto_hash[hash_slot];
198 proto_hash[hash_slot] = entry;
206 struct proto_input_entry *entry;
215 entry = proto_input_add_list;
219 proto_delayed_attach(entry);
227 for (entry = proto_hash[i];
228 entry != NULL && proto_total_waiting; entry = entry->next) {
229 if (entry->inject_first != NULL) {
233 packet_list = entry->inject_first;
235 entry->inject_first = NULL;
236 entry->inject_last = NULL;
241 if (entry->domain != NULL && !(entry->domain->
243 lck_mtx_lock(entry->domain->dom_mtx);
247 if (entry->chain) {
248 entry->input(entry->protocol,
259 entry->input(entry->protocol,
265 lck_mtx_unlock(entry->domain->dom_mtx);
275 struct proto_input_entry *entry;
278 for (entry = proto_hash[proto_hash_value(protocol)]; entry != NULL;
279 entry = entry->next) {
280 if (entry->protocol == protocol)
284 if (entry->domain && !(entry->domain->dom_flags & DOM_REENTRANT)) {
285 lck_mtx_lock(entry->domain->dom_mtx);
289 if (entry->chain) {
290 entry->input(entry->protocol, packet_list);
298 entry->input(entry->protocol, packet);
303 lck_mtx_unlock(entry->domain->dom_mtx);
311 struct proto_input_entry *entry;
320 for (entry = proto_hash[hash_slot]; entry != NULL;
321 entry = entry->next) {
322 if (entry->protocol == protocol)
326 if (entry != NULL) {
328 if (entry->inject_first == NULL) {
331 entry->inject_first = packet_list;
333 mbuf_setnextpkt(entry->inject_last, packet_list);
335 entry->inject_last = last_packet;