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