]> git.saurik.com Git - apple/xnu.git/blame - bsd/net/net_stubs.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / bsd / net / net_stubs.c
CommitLineData
fe8ab488 1/*
cb323159 2 * Copyright (c) 2012-2019 Apple Inc. All rights reserved.
fe8ab488
A
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
39037602 5 *
fe8ab488
A
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.
39037602 14 *
fe8ab488
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
39037602 17 *
fe8ab488
A
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.
39037602 25 *
fe8ab488
A
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
39236c6e
A
29#include <kern/debug.h>
30
d9a64523
A
31#if !NETWORKING
32
0a7de745
A
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); \
fe8ab488
A
39 }
40
41STUB(bpf_attach);
42STUB(bpf_tap_in);
43STUB(bpf_tap_out);
44STUB(bpfattach);
f427ee49
A
45#if !SKYWALK
46STUB(bpf_tap_packet_in);
47STUB(bpf_tap_packet_out);
48#endif /* SKYWALK */
fe8ab488
A
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);
5ba3f43e 93STUB(ifnet_allocate_internal);
fe8ab488
A
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_promiscuous);
152STUB(ifnet_set_stat);
153STUB(ifnet_set_tso_mtu);
154STUB(ifnet_set_wake_flags);
155STUB(ifnet_softc);
156STUB(ifnet_stat);
157STUB(ifnet_stat_increment);
158STUB(ifnet_stat_increment_in);
159STUB(ifnet_stat_increment_out);
160STUB(ifnet_touch_lastchange);
161STUB(ifnet_type);
162STUB(ifnet_unit);
163STUB(in_cksum);
164STUB(inet_arp_handle_input);
165STUB(inet_arp_init_ifaddr);
166STUB(inet_arp_lookup);
167STUB(ipf_addv4);
168STUB(ipf_addv6);
169STUB(ipf_inject_input);
170STUB(ipf_inject_output);
171STUB(ipf_remove);
172STUB(kev_msg_post);
173STUB(kev_vendor_code_find);
174STUB(mbuf_adj);
175STUB(mbuf_adjustlen);
176STUB(mbuf_align_32);
177STUB(mbuf_alloccluster);
178STUB(mbuf_allocpacket);
179STUB(mbuf_allocpacket_list);
180STUB(mbuf_attachcluster);
181STUB(mbuf_clear_csum_performed);
182STUB(mbuf_clear_csum_requested);
183STUB(mbuf_clear_vlan_tag);
184STUB(mbuf_concatenate);
185STUB(mbuf_copy_pkthdr);
186STUB(mbuf_copyback);
187STUB(mbuf_copydata);
188STUB(mbuf_copym);
189STUB(mbuf_data);
190STUB(mbuf_data_to_physical);
191STUB(mbuf_datastart);
192STUB(mbuf_dup);
193STUB(mbuf_flags);
194STUB(mbuf_free);
195STUB(mbuf_freecluster);
196STUB(mbuf_freem);
197STUB(mbuf_freem_list);
198STUB(mbuf_get);
199STUB(mbuf_get_csum_performed);
200STUB(mbuf_get_csum_requested);
201STUB(mbuf_get_mhlen);
202STUB(mbuf_get_minclsize);
203STUB(mbuf_get_mlen);
204STUB(mbuf_get_traffic_class);
205STUB(mbuf_get_tso_requested);
206STUB(mbuf_get_vlan_tag);
207STUB(mbuf_getcluster);
208STUB(mbuf_gethdr);
209STUB(mbuf_getpacket);
210STUB(mbuf_inbound_modified);
211STUB(mbuf_inet_cksum);
212STUB(mbuf_is_traffic_class_privileged);
213STUB(mbuf_leadingspace);
214STUB(mbuf_len);
215STUB(mbuf_maxlen);
216STUB(mbuf_mclget);
217STUB(mbuf_mclhasreference);
218STUB(mbuf_next);
219STUB(mbuf_nextpkt);
220STUB(mbuf_outbound_finalize);
221STUB(mbuf_pkthdr_adjustlen);
222STUB(mbuf_pkthdr_header);
223STUB(mbuf_pkthdr_len);
224STUB(mbuf_pkthdr_rcvif);
225STUB(mbuf_pkthdr_setheader);
226STUB(mbuf_pkthdr_setlen);
227STUB(mbuf_pkthdr_setrcvif);
228STUB(mbuf_prepend);
229STUB(mbuf_pulldown);
230STUB(mbuf_pullup);
231STUB(mbuf_set_csum_performed);
232STUB(mbuf_set_csum_requested);
233STUB(mbuf_set_traffic_class);
234STUB(mbuf_set_vlan_tag);
235STUB(mbuf_setdata);
236STUB(mbuf_setflags);
237STUB(mbuf_setflags_mask);
238STUB(mbuf_setlen);
239STUB(mbuf_setnext);
240STUB(mbuf_setnextpkt);
241STUB(mbuf_settype);
242STUB(mbuf_split);
243STUB(mbuf_stats);
244STUB(mbuf_tag_allocate);
245STUB(mbuf_tag_find);
246STUB(mbuf_tag_free);
247STUB(mbuf_tag_id_find);
248STUB(mbuf_add_drvaux);
249STUB(mbuf_find_drvaux);
250STUB(mbuf_del_drvaux);
251STUB(mbuf_trailingspace);
252STUB(mbuf_type);
39037602
A
253STUB(mbuf_get_flowid);
254STUB(mbuf_set_flowid);
255STUB(mbuf_get_timestamp);
256STUB(mbuf_set_timestamp);
257STUB(mbuf_get_tx_compl_data);
258STUB(mbuf_set_tx_compl_data);
259STUB(mbuf_get_status);
260STUB(mbuf_set_status);
261STUB(mbuf_get_timestamp_requested);
262STUB(mbuf_set_timestamp_requested);
263STUB(mbuf_register_tx_compl_callback);
264STUB(mbuf_unregister_tx_compl_callback);
cb323159
A
265STUB(mbuf_get_keepalive_flag);
266STUB(mbuf_set_keepalive_flag);
fe8ab488
A
267STUB(net_init_add);
268STUB(proto_inject);
269STUB(proto_input);
270STUB(proto_register_plumber);
271STUB(proto_unregister_plumber);
272STUB(sflt_attach);
273STUB(sflt_detach);
274STUB(sflt_register);
275STUB(sflt_unregister);
276STUB(sock_accept);
277STUB(sock_bind);
278STUB(sock_close);
279STUB(sock_connect);
280STUB(sock_connectwait);
281STUB(sock_getpeername);
282STUB(sock_getsockname);
283STUB(sock_getsockopt);
284STUB(sock_gettype);
285STUB(sock_inject_data_in);
286STUB(sock_inject_data_out);
287STUB(sock_ioctl);
288STUB(sock_isconnected);
289STUB(sock_isnonblocking);
290STUB(sock_listen);
291STUB(sock_nointerrupt);
292STUB(sock_receive);
293STUB(sock_receivembuf);
294STUB(sock_send);
295STUB(sock_sendmbuf);
296STUB(sock_setpriv);
297STUB(sock_setsockopt);
298STUB(sock_shutdown);
299STUB(sock_socket);
300STUB(sockopt_copyin);
301STUB(sockopt_copyout);
302STUB(sockopt_direction);
303STUB(sockopt_level);
304STUB(sockopt_name);
305STUB(sockopt_valsize);
306STUB(kev_post_msg);
307STUB(ctl_id_by_name);
308STUB(ctl_name_by_id);
309STUB(ifnet_allocate_extended);
310STUB(ifnet_bandwidths);
311STUB(ifnet_clone_attach);
312STUB(ifnet_clone_detach);
313STUB(ifnet_dequeue);
314STUB(ifnet_dequeue_multi);
39037602 315STUB(ifnet_dequeue_multi_bytes);
fe8ab488
A
316STUB(ifnet_dequeue_service_class);
317STUB(ifnet_dequeue_service_class_multi);
318STUB(ifnet_enqueue);
319STUB(ifnet_get_delegate);
320STUB(ifnet_get_inuse_address_list);
321STUB(ifnet_get_local_ports);
322STUB(ifnet_get_local_ports_extended);
323STUB(ifnet_get_rcvq_maxlen);
324STUB(ifnet_get_sndq_len);
325STUB(ifnet_get_sndq_maxlen);
326STUB(ifnet_idle_flags);
327STUB(ifnet_inet6_defrouter_llreachinfo);
328STUB(ifnet_inet_defrouter_llreachinfo);
329STUB(ifnet_input_extended);
330STUB(ifnet_latencies);
331STUB(ifnet_link_quality);
332STUB(ifnet_notice_master_elected);
333STUB(ifnet_notice_node_absence);
334STUB(ifnet_notice_node_presence);
cb323159 335STUB(ifnet_notice_node_presence_v2);
fe8ab488
A
336STUB(ifnet_poll_params);
337STUB(ifnet_purge);
338STUB(ifnet_report_issues);
339STUB(ifnet_set_bandwidths);
340STUB(ifnet_set_idle_flags);
341STUB(ifnet_set_latencies);
342STUB(ifnet_set_link_quality);
343STUB(ifnet_set_output_sched_model);
344STUB(ifnet_set_poll_params);
345STUB(ifnet_set_rcvq_maxlen);
346STUB(ifnet_set_sndq_maxlen);
347STUB(ifnet_start);
fe8ab488 348STUB(ifnet_tx_compl_status);
39037602 349STUB(ifnet_tx_compl);
fe8ab488
A
350STUB(ifnet_flowid);
351STUB(ifnet_enable_output);
352STUB(ifnet_disable_output);
3e170ce0
A
353STUB(ifnet_get_keepalive_offload_frames);
354STUB(ifnet_link_status_report);
39037602
A
355STUB(ifnet_set_fastlane_capable);
356STUB(ifnet_get_fastlane_capable);
357STUB(ifnet_get_unsent_bytes);
358STUB(ifnet_get_buffer_status);
359STUB(ifnet_normalise_unsent_data);
d9a64523 360STUB(ifnet_set_low_power_mode);
cb323159
A
361STUB(ifnet_notify_tcp_keepalive_offload_timeout);
362STUB(ifnet_interface_advisory_report);
fe8ab488
A
363STUB(in6_localaddr);
364STUB(in_localaddr);
365STUB(in6addr_local);
366STUB(inaddr_local);
367STUB(inp_clear_INP_INADDR_ANY);
368STUB(ip_gre_output);
369STUB(m_cat);
370STUB(m_free);
371STUB(m_freem);
372STUB(m_get);
373STUB(m_gethdr);
374STUB(m_mtod);
375STUB(m_prepend_2);
376STUB(m_pullup);
377STUB(m_split);
fe8ab488 378STUB(mbuf_get_driver_scratch);
3e170ce0 379STUB(mbuf_get_unsent_data_bytes);
39037602
A
380STUB(mbuf_get_buffer_status);
381STUB(mbuf_pkt_new_flow);
382STUB(mbuf_last_pkt);
fe8ab488
A
383STUB(mbuf_get_priority);
384STUB(mbuf_get_service_class);
385STUB(mbuf_get_service_class_index);
386STUB(mbuf_get_service_class_max_count);
387STUB(mbuf_get_traffic_class_index);
388STUB(mbuf_get_traffic_class_max_count);
389STUB(mbuf_is_service_class_privileged);
390STUB(mbuf_pkthdr_aux_flags);
391STUB(mcl_to_paddr);
392STUB(net_add_domain);
393STUB(net_add_domain_old);
394STUB(net_add_proto);
395STUB(net_add_proto_old);
396STUB(net_del_domain);
397STUB(net_del_domain_old);
398STUB(net_del_proto);
399STUB(net_del_proto_old);
cb323159 400STUB(net_domain_contains_hostname);
fe8ab488
A
401STUB(pffinddomain);
402STUB(pffinddomain_old);
403STUB(pffindproto);
404STUB(pffindproto_old);
405STUB(pru_abort_notsupp);
406STUB(pru_accept_notsupp);
407STUB(pru_bind_notsupp);
408STUB(pru_connect2_notsupp);
409STUB(pru_connect_notsupp);
410STUB(pru_disconnect_notsupp);
411STUB(pru_listen_notsupp);
412STUB(pru_peeraddr_notsupp);
413STUB(pru_rcvd_notsupp);
414STUB(pru_rcvoob_notsupp);
415STUB(pru_send_notsupp);
416STUB(pru_send_list_notsupp);
417STUB(pru_sense_null);
418STUB(pru_shutdown_notsupp);
419STUB(pru_sockaddr_notsupp);
420STUB(pru_sopoll_notsupp);
421STUB(sbappendaddr);
422STUB(sbappendrecord);
423STUB(sbflush);
424STUB(sbspace);
425STUB(soabort);
426STUB(socantrcvmore);
427STUB(socantsendmore);
428STUB(sock_getlistener);
429STUB(sock_gettclassopt);
430STUB(sock_release);
431STUB(sock_retain);
432STUB(sock_settclassopt);
433STUB(sock_catchevents);
434STUB(sock_setupcall);
435STUB(sock_setupcalls);
436STUB(sodisconnect);
437STUB(sofree);
438STUB(sofreelastref);
439STUB(soisconnected);
440STUB(soisconnecting);
441STUB(soisdisconnected);
442STUB(soisdisconnecting);
443STUB(sonewconn);
444STUB(sooptcopyin);
445STUB(sooptcopyout);
446STUB(sopoll);
447STUB(soreceive);
448STUB(soreceive_list);
449STUB(soreserve);
450STUB(sorwakeup);
451STUB(sosend);
452STUB(sosend_list);
453STUB(utun_ctl_disable_crypto_dtls);
454STUB(utun_ctl_register_dtls);
455STUB(utun_pkt_dtls_input);
456STUB(dlil_resolve_multi);
457STUB(inet_cksum_simple);
458STUB(arp_ip_handle_input);
459STUB(arp_ifinit);
460STUB(arp_lookup_ip);
461STUB(ip_gre_register_input);
462STUB(sock_iskernel);
5ba3f43e
A
463STUB(iflt_attach_internal);
464STUB(ipf_addv4_internal);
465STUB(ipf_addv6_internal);
466STUB(sflt_register_internal);
467STUB(sock_accept_internal);
468STUB(sock_socket_internal);
f427ee49
A
469STUB(vsock_add_transport);
470STUB(vsock_remove_transport);
471STUB(vsock_reset_transport);
472STUB(vsock_put_message);
fe8ab488
A
473#undef STUB
474
39037602 475/*
fe8ab488
A
476 * Called from vm_pageout.c. Nothing to be done when there's no networking.
477 */
d9a64523 478void mbuf_drain(boolean_t);
0a7de745
A
479void
480mbuf_drain(boolean_t)
39236c6e 481{
39037602 482 return;
39236c6e
A
483}
484
fe8ab488 485#endif /* !NETWORKING */