]> git.saurik.com Git - apple/xnu.git/blob - bsd/net/net_stubs.c
xnu-6153.61.1.tar.gz
[apple/xnu.git] / bsd / net / net_stubs.c
1 /*
2 * Copyright (c) 2012-2019 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29 #include <kern/debug.h>
30
31 #if !NETWORKING
32
33 #define STUB(name) \
34 int name(void); \
35 int name(void) \
36 { \
37 panic("stub called in a config with no networking"); \
38 return (0); \
39 }
40
41 STUB(bpf_attach);
42 STUB(bpf_tap_in);
43 STUB(bpf_tap_out);
44 STUB(bpfattach);
45 STUB(ctl_deregister);
46 STUB(ctl_enqueuedata);
47 STUB(ctl_enqueuembuf);
48 STUB(ctl_enqueuembuf_list);
49 STUB(ctl_getenqueuespace);
50 STUB(ctl_register);
51 STUB(ether_add_proto);
52 STUB(ether_check_multi);
53 STUB(ether_del_proto);
54 STUB(ether_demux);
55 STUB(ether_frameout);
56 STUB(ether_ioctl);
57 STUB(fifo_advlock);
58 STUB(fifo_close);
59 STUB(fifo_inactive);
60 STUB(fifo_ioctl);
61 STUB(fifo_lookup);
62 STUB(fifo_open);
63 STUB(fifo_pathconf);
64 STUB(fifo_read);
65 STUB(fifo_select);
66 STUB(fifo_write);
67 STUB(ifaddr_address);
68 STUB(ifaddr_address_family);
69 STUB(ifaddr_dstaddress);
70 STUB(ifaddr_findbestforaddr);
71 STUB(ifaddr_ifnet);
72 STUB(ifaddr_netmask);
73 STUB(ifaddr_reference);
74 STUB(ifaddr_release);
75 STUB(ifaddr_withaddr);
76 STUB(ifaddr_withdstaddr);
77 STUB(ifaddr_withnet);
78 STUB(ifaddr_withroute);
79 STUB(iflt_attach);
80 STUB(iflt_detach);
81 STUB(ifmaddr_address);
82 STUB(ifmaddr_ifnet);
83 STUB(ifmaddr_lladdress);
84 STUB(ifmaddr_reference);
85 STUB(ifmaddr_release);
86 STUB(ifnet_add_multicast);
87 STUB(ifnet_addrlen);
88 STUB(ifnet_allocate);
89 STUB(ifnet_allocate_internal);
90 STUB(ifnet_attach);
91 STUB(ifnet_attach_protocol);
92 STUB(ifnet_baudrate);
93 STUB(ifnet_capabilities_enabled);
94 STUB(ifnet_capabilities_supported);
95 STUB(ifnet_detach);
96 STUB(ifnet_detach_protocol);
97 STUB(ifnet_eflags);
98 STUB(ifnet_event);
99 STUB(ifnet_family);
100 STUB(ifnet_subfamily);
101 STUB(ifnet_find_by_name);
102 STUB(ifnet_flags);
103 STUB(ifnet_free_address_list);
104 STUB(ifnet_free_multicast_list);
105 STUB(ifnet_get_address_list);
106 STUB(ifnet_get_address_list_family);
107 STUB(ifnet_get_link_mib_data);
108 STUB(ifnet_get_link_mib_data_length);
109 STUB(ifnet_get_multicast_list);
110 STUB(ifnet_get_service_class_sndq_len);
111 STUB(ifnet_get_tso_mtu);
112 STUB(ifnet_get_wake_flags);
113 STUB(ifnet_hdrlen);
114 STUB(ifnet_index);
115 STUB(ifnet_input);
116 STUB(ifnet_interface_family_find);
117 STUB(ifnet_ioctl);
118 STUB(ifnet_lastchange);
119 STUB(ifnet_list_free);
120 STUB(ifnet_list_get);
121 STUB(ifnet_lladdr);
122 STUB(ifnet_lladdr_copy_bytes);
123 STUB(ifnet_llbroadcast_copy_bytes);
124 STUB(ifnet_metric);
125 STUB(ifnet_mtu);
126 STUB(ifnet_name);
127 STUB(ifnet_offload);
128 STUB(ifnet_output);
129 STUB(ifnet_output_raw);
130 STUB(ifnet_reference);
131 STUB(ifnet_release);
132 STUB(ifnet_remove_multicast);
133 STUB(ifnet_resolve_multicast);
134 STUB(ifnet_set_addrlen);
135 STUB(ifnet_set_baudrate);
136 STUB(ifnet_set_capabilities_enabled);
137 STUB(ifnet_set_capabilities_supported);
138 STUB(ifnet_set_delegate);
139 STUB(ifnet_set_eflags);
140 STUB(ifnet_set_flags);
141 STUB(ifnet_set_hdrlen);
142 STUB(ifnet_set_link_mib_data);
143 STUB(ifnet_set_lladdr);
144 STUB(ifnet_set_metric);
145 STUB(ifnet_set_mtu);
146 STUB(ifnet_set_offload);
147 STUB(ifnet_set_promiscuous);
148 STUB(ifnet_set_stat);
149 STUB(ifnet_set_tso_mtu);
150 STUB(ifnet_set_wake_flags);
151 STUB(ifnet_softc);
152 STUB(ifnet_stat);
153 STUB(ifnet_stat_increment);
154 STUB(ifnet_stat_increment_in);
155 STUB(ifnet_stat_increment_out);
156 STUB(ifnet_touch_lastchange);
157 STUB(ifnet_type);
158 STUB(ifnet_unit);
159 STUB(in_cksum);
160 STUB(inet_arp_handle_input);
161 STUB(inet_arp_init_ifaddr);
162 STUB(inet_arp_lookup);
163 STUB(ipf_addv4);
164 STUB(ipf_addv6);
165 STUB(ipf_inject_input);
166 STUB(ipf_inject_output);
167 STUB(ipf_remove);
168 STUB(kev_msg_post);
169 STUB(kev_vendor_code_find);
170 STUB(mbuf_adj);
171 STUB(mbuf_adjustlen);
172 STUB(mbuf_align_32);
173 STUB(mbuf_alloccluster);
174 STUB(mbuf_allocpacket);
175 STUB(mbuf_allocpacket_list);
176 STUB(mbuf_attachcluster);
177 STUB(mbuf_clear_csum_performed);
178 STUB(mbuf_clear_csum_requested);
179 STUB(mbuf_clear_vlan_tag);
180 STUB(mbuf_concatenate);
181 STUB(mbuf_copy_pkthdr);
182 STUB(mbuf_copyback);
183 STUB(mbuf_copydata);
184 STUB(mbuf_copym);
185 STUB(mbuf_data);
186 STUB(mbuf_data_to_physical);
187 STUB(mbuf_datastart);
188 STUB(mbuf_dup);
189 STUB(mbuf_flags);
190 STUB(mbuf_free);
191 STUB(mbuf_freecluster);
192 STUB(mbuf_freem);
193 STUB(mbuf_freem_list);
194 STUB(mbuf_get);
195 STUB(mbuf_get_csum_performed);
196 STUB(mbuf_get_csum_requested);
197 STUB(mbuf_get_mhlen);
198 STUB(mbuf_get_minclsize);
199 STUB(mbuf_get_mlen);
200 STUB(mbuf_get_traffic_class);
201 STUB(mbuf_get_tso_requested);
202 STUB(mbuf_get_vlan_tag);
203 STUB(mbuf_getcluster);
204 STUB(mbuf_gethdr);
205 STUB(mbuf_getpacket);
206 STUB(mbuf_inbound_modified);
207 STUB(mbuf_inet_cksum);
208 STUB(mbuf_is_traffic_class_privileged);
209 STUB(mbuf_leadingspace);
210 STUB(mbuf_len);
211 STUB(mbuf_maxlen);
212 STUB(mbuf_mclget);
213 STUB(mbuf_mclhasreference);
214 STUB(mbuf_next);
215 STUB(mbuf_nextpkt);
216 STUB(mbuf_outbound_finalize);
217 STUB(mbuf_pkthdr_adjustlen);
218 STUB(mbuf_pkthdr_header);
219 STUB(mbuf_pkthdr_len);
220 STUB(mbuf_pkthdr_rcvif);
221 STUB(mbuf_pkthdr_setheader);
222 STUB(mbuf_pkthdr_setlen);
223 STUB(mbuf_pkthdr_setrcvif);
224 STUB(mbuf_prepend);
225 STUB(mbuf_pulldown);
226 STUB(mbuf_pullup);
227 STUB(mbuf_set_csum_performed);
228 STUB(mbuf_set_csum_requested);
229 STUB(mbuf_set_traffic_class);
230 STUB(mbuf_set_vlan_tag);
231 STUB(mbuf_setdata);
232 STUB(mbuf_setflags);
233 STUB(mbuf_setflags_mask);
234 STUB(mbuf_setlen);
235 STUB(mbuf_setnext);
236 STUB(mbuf_setnextpkt);
237 STUB(mbuf_settype);
238 STUB(mbuf_split);
239 STUB(mbuf_stats);
240 STUB(mbuf_tag_allocate);
241 STUB(mbuf_tag_find);
242 STUB(mbuf_tag_free);
243 STUB(mbuf_tag_id_find);
244 STUB(mbuf_add_drvaux);
245 STUB(mbuf_find_drvaux);
246 STUB(mbuf_del_drvaux);
247 STUB(mbuf_trailingspace);
248 STUB(mbuf_type);
249 STUB(mbuf_get_flowid);
250 STUB(mbuf_set_flowid);
251 STUB(mbuf_get_timestamp);
252 STUB(mbuf_set_timestamp);
253 STUB(mbuf_get_tx_compl_data);
254 STUB(mbuf_set_tx_compl_data);
255 STUB(mbuf_get_status);
256 STUB(mbuf_set_status);
257 STUB(mbuf_get_timestamp_requested);
258 STUB(mbuf_set_timestamp_requested);
259 STUB(mbuf_register_tx_compl_callback);
260 STUB(mbuf_unregister_tx_compl_callback);
261 STUB(mbuf_get_keepalive_flag);
262 STUB(mbuf_set_keepalive_flag);
263 STUB(net_init_add);
264 STUB(proto_inject);
265 STUB(proto_input);
266 STUB(proto_register_plumber);
267 STUB(proto_unregister_plumber);
268 STUB(sflt_attach);
269 STUB(sflt_detach);
270 STUB(sflt_register);
271 STUB(sflt_unregister);
272 STUB(sock_accept);
273 STUB(sock_bind);
274 STUB(sock_close);
275 STUB(sock_connect);
276 STUB(sock_connectwait);
277 STUB(sock_getpeername);
278 STUB(sock_getsockname);
279 STUB(sock_getsockopt);
280 STUB(sock_gettype);
281 STUB(sock_inject_data_in);
282 STUB(sock_inject_data_out);
283 STUB(sock_ioctl);
284 STUB(sock_isconnected);
285 STUB(sock_isnonblocking);
286 STUB(sock_listen);
287 STUB(sock_nointerrupt);
288 STUB(sock_receive);
289 STUB(sock_receivembuf);
290 STUB(sock_send);
291 STUB(sock_sendmbuf);
292 STUB(sock_setpriv);
293 STUB(sock_setsockopt);
294 STUB(sock_shutdown);
295 STUB(sock_socket);
296 STUB(sockopt_copyin);
297 STUB(sockopt_copyout);
298 STUB(sockopt_direction);
299 STUB(sockopt_level);
300 STUB(sockopt_name);
301 STUB(sockopt_valsize);
302 STUB(kev_post_msg);
303 STUB(ctl_id_by_name);
304 STUB(ctl_name_by_id);
305 STUB(ifnet_allocate_extended);
306 STUB(ifnet_bandwidths);
307 STUB(ifnet_clone_attach);
308 STUB(ifnet_clone_detach);
309 STUB(ifnet_dequeue);
310 STUB(ifnet_dequeue_multi);
311 STUB(ifnet_dequeue_multi_bytes);
312 STUB(ifnet_dequeue_service_class);
313 STUB(ifnet_dequeue_service_class_multi);
314 STUB(ifnet_enqueue);
315 STUB(ifnet_get_delegate);
316 STUB(ifnet_get_inuse_address_list);
317 STUB(ifnet_get_local_ports);
318 STUB(ifnet_get_local_ports_extended);
319 STUB(ifnet_get_rcvq_maxlen);
320 STUB(ifnet_get_sndq_len);
321 STUB(ifnet_get_sndq_maxlen);
322 STUB(ifnet_idle_flags);
323 STUB(ifnet_inet6_defrouter_llreachinfo);
324 STUB(ifnet_inet_defrouter_llreachinfo);
325 STUB(ifnet_input_extended);
326 STUB(ifnet_latencies);
327 STUB(ifnet_link_quality);
328 STUB(ifnet_notice_master_elected);
329 STUB(ifnet_notice_node_absence);
330 STUB(ifnet_notice_node_presence);
331 STUB(ifnet_notice_node_presence_v2);
332 STUB(ifnet_poll_params);
333 STUB(ifnet_purge);
334 STUB(ifnet_report_issues);
335 STUB(ifnet_set_bandwidths);
336 STUB(ifnet_set_idle_flags);
337 STUB(ifnet_set_latencies);
338 STUB(ifnet_set_link_quality);
339 STUB(ifnet_set_output_sched_model);
340 STUB(ifnet_set_poll_params);
341 STUB(ifnet_set_rcvq_maxlen);
342 STUB(ifnet_set_sndq_maxlen);
343 STUB(ifnet_start);
344 STUB(ifnet_tx_compl_status);
345 STUB(ifnet_tx_compl);
346 STUB(ifnet_flowid);
347 STUB(ifnet_enable_output);
348 STUB(ifnet_disable_output);
349 STUB(ifnet_get_keepalive_offload_frames);
350 STUB(ifnet_link_status_report);
351 STUB(ifnet_set_fastlane_capable);
352 STUB(ifnet_get_fastlane_capable);
353 STUB(ifnet_get_unsent_bytes);
354 STUB(ifnet_get_buffer_status);
355 STUB(ifnet_normalise_unsent_data);
356 STUB(ifnet_set_low_power_mode);
357 STUB(ifnet_notify_tcp_keepalive_offload_timeout);
358 STUB(ifnet_interface_advisory_report);
359 STUB(in6_localaddr);
360 STUB(in_localaddr);
361 STUB(in6addr_local);
362 STUB(inaddr_local);
363 STUB(inp_clear_INP_INADDR_ANY);
364 STUB(ip_gre_output);
365 STUB(m_cat);
366 STUB(m_free);
367 STUB(m_freem);
368 STUB(m_get);
369 STUB(m_gethdr);
370 STUB(m_mtod);
371 STUB(m_prepend_2);
372 STUB(m_pullup);
373 STUB(m_split);
374 STUB(mbuf_get_driver_scratch);
375 STUB(mbuf_get_unsent_data_bytes);
376 STUB(mbuf_get_buffer_status);
377 STUB(mbuf_pkt_new_flow);
378 STUB(mbuf_last_pkt);
379 STUB(mbuf_get_priority);
380 STUB(mbuf_get_service_class);
381 STUB(mbuf_get_service_class_index);
382 STUB(mbuf_get_service_class_max_count);
383 STUB(mbuf_get_traffic_class_index);
384 STUB(mbuf_get_traffic_class_max_count);
385 STUB(mbuf_is_service_class_privileged);
386 STUB(mbuf_pkthdr_aux_flags);
387 STUB(mcl_to_paddr);
388 STUB(net_add_domain);
389 STUB(net_add_domain_old);
390 STUB(net_add_proto);
391 STUB(net_add_proto_old);
392 STUB(net_del_domain);
393 STUB(net_del_domain_old);
394 STUB(net_del_proto);
395 STUB(net_del_proto_old);
396 STUB(net_domain_contains_hostname);
397 STUB(pffinddomain);
398 STUB(pffinddomain_old);
399 STUB(pffindproto);
400 STUB(pffindproto_old);
401 STUB(pru_abort_notsupp);
402 STUB(pru_accept_notsupp);
403 STUB(pru_bind_notsupp);
404 STUB(pru_connect2_notsupp);
405 STUB(pru_connect_notsupp);
406 STUB(pru_disconnect_notsupp);
407 STUB(pru_listen_notsupp);
408 STUB(pru_peeraddr_notsupp);
409 STUB(pru_rcvd_notsupp);
410 STUB(pru_rcvoob_notsupp);
411 STUB(pru_send_notsupp);
412 STUB(pru_send_list_notsupp);
413 STUB(pru_sense_null);
414 STUB(pru_shutdown_notsupp);
415 STUB(pru_sockaddr_notsupp);
416 STUB(pru_sopoll_notsupp);
417 STUB(sbappendaddr);
418 STUB(sbappendrecord);
419 STUB(sbflush);
420 STUB(sbspace);
421 STUB(soabort);
422 STUB(socantrcvmore);
423 STUB(socantsendmore);
424 STUB(sock_getlistener);
425 STUB(sock_gettclassopt);
426 STUB(sock_release);
427 STUB(sock_retain);
428 STUB(sock_settclassopt);
429 STUB(sock_catchevents);
430 STUB(sock_setupcall);
431 STUB(sock_setupcalls);
432 STUB(sodisconnect);
433 STUB(sofree);
434 STUB(sofreelastref);
435 STUB(soisconnected);
436 STUB(soisconnecting);
437 STUB(soisdisconnected);
438 STUB(soisdisconnecting);
439 STUB(sonewconn);
440 STUB(sooptcopyin);
441 STUB(sooptcopyout);
442 STUB(sopoll);
443 STUB(soreceive);
444 STUB(soreceive_list);
445 STUB(soreserve);
446 STUB(sorwakeup);
447 STUB(sosend);
448 STUB(sosend_list);
449 STUB(utun_ctl_disable_crypto_dtls);
450 STUB(utun_ctl_register_dtls);
451 STUB(utun_pkt_dtls_input);
452 STUB(dlil_resolve_multi);
453 STUB(inet_cksum_simple);
454 STUB(arp_ip_handle_input);
455 STUB(arp_ifinit);
456 STUB(arp_lookup_ip);
457 STUB(ip_gre_register_input);
458 STUB(sock_iskernel);
459 STUB(iflt_attach_internal);
460 STUB(ipf_addv4_internal);
461 STUB(ipf_addv6_internal);
462 STUB(sflt_register_internal);
463 STUB(sock_accept_internal);
464 STUB(sock_socket_internal);
465 #undef STUB
466
467 /*
468 * Called from vm_pageout.c. Nothing to be done when there's no networking.
469 */
470 void mbuf_drain(boolean_t);
471 void
472 mbuf_drain(boolean_t)
473 {
474 return;
475 }
476
477 #endif /* !NETWORKING */