1/*
2 * Copyright (c) 2015-2022 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 !SKYWALK
32
33#define STUB(_name) \
34__attribute__((noreturn)) \
35int _name(void); \
36int \
37_name(void) \
38{ \
39 panic("stub called in a config with no SKYWALK"); \
40 /* NOTREACHED */ \
41 __builtin_unreachable(); \
42}
43
44STUB(kern_buflet_get_data_address);
45STUB(kern_buflet_get_data_offset);
46STUB(kern_buflet_get_data_length);
47STUB(kern_buflet_get_data_limit);
48STUB(kern_buflet_get_object_address);
49STUB(kern_buflet_get_object_limit);
50STUB(kern_buflet_get_object_segment);
51STUB(kern_buflet_set_data_address);
52STUB(kern_buflet_set_data_offset);
53STUB(kern_buflet_set_data_length);
54STUB(kern_buflet_set_data_limit);
55STUB(kern_buflet_set_buffer_offset);
56STUB(kern_channel_advance_slot);
57STUB(kern_channel_available_slot_count);
58STUB(kern_channel_get_context);
59STUB(kern_channel_get_next_slot);
60STUB(kern_channel_notify);
61STUB(kern_channel_reclaim);
62STUB(kern_channel_ring_get_container);
63STUB(kern_channel_ring_get_context);
64STUB(kern_channel_slot_get_context);
65STUB(kern_channel_slot_attach_packet);
66STUB(kern_channel_slot_detach_packet);
67STUB(kern_channel_slot_get_packet);
68STUB(kern_channel_increment_ring_stats);
69STUB(kern_channel_increment_ring_net_stats);
70STUB(kern_channel_tx_refill);
71STUB(kern_channel_get_service_class);
72STUB(kern_channel_event_transmit_status);
73STUB(kern_channel_event_transmit_status_with_nexus);
74STUB(kern_channel_event_transmit_expired);
75STUB(kern_channel_event_transmit_expired_with_nexus);
76STUB(kern_netif_queue_rx_enqueue);
77STUB(kern_netif_queue_tx_dequeue);
78STUB(kern_netif_queue_get_service_class);
79STUB(kern_copy_and_inet_checksum);
80STUB(kern_inet_checksum);
81STUB(kern_nexus_attr_create);
82STUB(kern_nexus_attr_clone);
83STUB(kern_nexus_attr_destroy);
84STUB(kern_nexus_attr_set);
85STUB(kern_nexus_attr_get);
86STUB(kern_nexus_controller_create);
87STUB(kern_nexus_controller_destroy);
88STUB(kern_nexus_controller_alloc_provider_instance);
89STUB(kern_nexus_controller_alloc_net_provider_instance);
90STUB(kern_nexus_controller_bind_provider_instance);
91STUB(kern_nexus_controller_deregister_provider);
92STUB(kern_nexus_controller_free_provider_instance);
93STUB(kern_nexus_controller_read_provider_attr);
94STUB(kern_nexus_controller_register_provider);
95STUB(kern_nexus_controller_unbind_provider_instance);
96STUB(kern_nexus_deregister_domain_provider);
97STUB(kern_nexus_get_default_domain_provider);
98STUB(kern_nexus_get_flowswitch_instance);
99STUB(kern_nexus_get_context);
100STUB(kern_nexus_get_pbufpool);
101STUB(kern_nexus_register_domain_provider);
102STUB(kern_nexus_netif_llink_add);
103STUB(kern_nexus_netif_llink_remove);
104STUB(kern_packet_check_for_expiry_and_notify);
105STUB(kern_packet_clear_flow_uuid);
106STUB(kern_packet_clone);
107STUB(kern_packet_clone_nosleep);
108STUB(kern_packet_get_euuid);
109STUB(kern_packet_finalize);
110STUB(kern_packet_get_buflet_count);
111STUB(kern_packet_get_data_length);
112STUB(kern_packet_get_compression_generation_count);
113STUB(kern_packet_get_flow_uuid);
114STUB(kern_packet_get_inet_checksum);
115STUB(kern_packet_get_headroom);
116STUB(kern_packet_get_link_broadcast);
117STUB(kern_packet_get_link_ethfcs);
118STUB(kern_packet_get_link_header_offset);
119STUB(kern_packet_get_link_header_length);
120STUB(kern_packet_get_link_multicast);
121STUB(kern_packet_get_network_header_offset);
122STUB(kern_packet_get_next_buflet);
123STUB(kern_packet_get_object_index);
124STUB(kern_packet_get_policy_id);
125STUB(kern_packet_get_skip_policy_id);
126STUB(kern_packet_get_service_class);
127STUB(kern_packet_get_service_class_index);
128STUB(kern_packet_is_high_priority);
129STUB(kern_packet_get_traffic_class);
130STUB(kern_packet_get_timestamp);
131STUB(kern_packet_get_transport_header_offset);
132STUB(kern_packet_get_transport_new_flow);
133STUB(kern_packet_get_transport_retransmit);
134STUB(kern_packet_get_transport_last_packet);
135STUB(kern_packet_get_transport_traffic_background)
136STUB(kern_packet_get_transport_traffic_realtime)
137STUB(kern_packet_set_compression_generation_count);
138STUB(kern_packet_set_flow_uuid);
139STUB(kern_packet_set_inet_checksum);
140STUB(kern_packet_set_headroom);
141STUB(kern_packet_set_link_broadcast);
142STUB(kern_packet_set_link_header_offset);
143STUB(kern_packet_set_link_header_length);
144STUB(kern_packet_set_link_multicast);
145STUB(kern_packet_set_link_ethfcs);
146STUB(kern_packet_set_network_header_offset);
147STUB(kern_packet_set_policy_id);
148STUB(kern_packet_set_service_class);
149STUB(kern_packet_set_timestamp);
150STUB(kern_packet_set_traffic_class);
151STUB(kern_packet_set_transport_header_offset);
152STUB(kern_packet_get_timestamp_requested);
153STUB(kern_packet_get_tx_completion_status);
154STUB(kern_packet_set_tx_completion_status);
155STUB(kern_packet_tx_completion);
156STUB(kern_packet_set_group_start);
157STUB(kern_packet_get_group_start);
158STUB(kern_packet_set_group_end);
159STUB(kern_packet_get_group_end);
160STUB(kern_packet_set_expire_time);
161STUB(kern_packet_get_expire_time);
162STUB(kern_packet_set_expiry_action);
163STUB(kern_packet_get_expiry_action);
164STUB(kern_packet_set_token);
165STUB(kern_packet_get_token);
166STUB(kern_packet_get_packetid);
167STUB(kern_packet_set_vlan_tag);
168STUB(kern_packet_get_vlan_tag);
169STUB(kern_packet_get_vlan_id);
170STUB(kern_packet_get_vlan_priority);
171STUB(kern_packet_get_app_metadata);
172STUB(kern_packet_set_wake_flag);
173STUB(kern_packet_get_wake_flag);
174STUB(kern_packet_add_buflet);
175STUB(kern_packet_append);
176STUB(kern_packet_get_next);
177STUB(kern_packet_set_next);
178STUB(kern_packet_set_chain_counts);
179STUB(kern_packet_get_chain_counts);
180STUB(kern_packet_set_trace_id);
181STUB(kern_packet_get_trace_id);
182STUB(kern_packet_trace_event);
183STUB(kern_packet_copy_bytes);
184STUB(kern_packet_set_fpd_sequence_number);
185STUB(kern_packet_set_fpd_context_id);
186STUB(kern_packet_set_fpd_command);
187STUB(kern_packet_get_flowid);
188STUB(kern_packet_set_trace_tag);
189STUB(kern_packet_get_trace_tag);
190STUB(kern_packet_get_tx_nexus_port_id);
191STUB(kern_packet_get_protocol_segment_size);
192STUB(kern_packet_get_priv);
193STUB(kern_packet_set_priv);
194STUB(kern_packet_set_segment_count);
195STUB(kern_packet_get_tso_flags);
196STUB(kern_pbufpool_alloc);
197STUB(kern_pbufpool_alloc_batch);
198STUB(kern_pbufpool_alloc_batch_callback);
199STUB(kern_pbufpool_alloc_nosleep);
200STUB(kern_pbufpool_alloc_batch_nosleep);
201STUB(kern_pbufpool_alloc_batch_nosleep_callback);
202STUB(kern_pbufpool_create);
203STUB(kern_pbufpool_destroy);
204STUB(kern_pbufpool_free);
205STUB(kern_pbufpool_free_batch);
206STUB(kern_pbufpool_free_chain);
207STUB(kern_pbufpool_get_context);
208STUB(kern_pbufpool_get_memory_info);
209STUB(kern_pbufpool_alloc_buffer);
210STUB(kern_pbufpool_alloc_buffer_nosleep);
211STUB(kern_pbufpool_free_buffer);
212STUB(kern_pbufpool_alloc_buflet);
213STUB(kern_pbufpool_alloc_buflet_nosleep);
214STUB(kern_segment_get_index);
215#if NETWORKING
216STUB(bpf_tap_packet_in);
217STUB(bpf_tap_packet_out);
218#endif
219#undef STUB
220#endif /* !SKYWALK */
221