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