OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [bsd_tcpip/] [current/] [include/] [sys/] [param.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      include/sys/param.h
4
//
5
//==========================================================================
6
// ####BSDCOPYRIGHTBEGIN####                                    
7
// -------------------------------------------                  
8
// This file is part of eCos, the Embedded Configurable Operating System.
9
//
10
// Portions of this software may have been derived from FreeBSD 
11
// or other sources, and if so are covered by the appropriate copyright
12
// and license included herein.                                 
13
//
14
// Portions created by the Free Software Foundation are         
15
// Copyright (C) 2002, 2011 Free Software Foundation, Inc.            
16
// -------------------------------------------                  
17
// ####BSDCOPYRIGHTEND####                                      
18
//==========================================================================
19
 
20
#ifndef _SYS_PARAM_H_
21
#define _SYS_PARAM_H_
22
 
23
#ifndef __ECOS
24
#define __ECOS
25
#endif
26
 
27
#ifdef _KERNEL
28
// Namespace munging - this should keep the "kernel" namespace
29
// polution to a minimum
30
 
31
// TEXT symbols
32
#define MD5Final cyg_MD5Final
33
#define MD5Init cyg_MD5Init
34
#define MD5Pad cyg_MD5Pad
35
#define MD5Transform cyg_MD5Transform
36
#define MD5Update cyg_MD5Update
37
#define _ip_mcast_src cyg__ip_mcast_src
38
#define _ip_mforward cyg__ip_mforward
39
#define _ip_mrouter_done cyg__ip_mrouter_done
40
#define _ip_mrouter_get cyg__ip_mrouter_get
41
#define _ip_mrouter_set cyg__ip_mrouter_set
42
#define _mrt_ioctl cyg__mrt_ioctl
43
#define addrsel_policy_init cyg_addrsel_policy_init
44
#define arc4random cyg_arc4random
45
#define random cyg_arc4random
46
#define arp_ifinit cyg_arp_ifinit
47
#define arpresolve cyg_arpresolve
48
#define asr_default__15Cyg_SchedThreadUi cyg_asr_default__15Cyg_SchedThreadUi
49
#define callout_active cyg_callout_active
50
#define callout_deactivate cyg_callout_deactivate
51
#define callout_init cyg_callout_init
52
#define callout_pending cyg_callout_pending
53
#define callout_reset cyg_callout_reset
54
#define callout_stop cyg_callout_stop
55
#define copyin cyg_copyin
56
#define copyout cyg_copyout
57
#define defrouter_addreq cyg_defrouter_addreq
58
#define defrouter_lookup cyg_defrouter_lookup
59
#define defrouter_reset cyg_defrouter_reset
60
#define defrouter_select cyg_defrouter_select
61
#define defrtrlist_del cyg_defrtrlist_del
62
#define dest6_input cyg_dest6_input
63
#define dup_sockaddr cyg_dup_sockaddr
64
#define encap4_input cyg_encap4_input
65
#define encap6_ctlinput cyg_encap6_ctlinput
66
#define encap6_input cyg_encap6_input
67
#define encap_init cyg_encap_init
68
#define ether_demux cyg_ether_demux
69
#define ether_ifattach cyg_ether_ifattach
70
#define ether_input cyg_ether_input
71
#define ether_ioctl cyg_ether_ioctl
72
#define ether_output cyg_ether_output
73
#define ether_output_frame cyg_ether_output_frame
74
#define frag6_drain cyg_frag6_drain
75
#define frag6_init cyg_frag6_init
76
#define frag6_input cyg_frag6_input
77
#define frag6_slowtimo cyg_frag6_slowtimo
78
#define getmicrotime cyg_getmicrotime
79
#define getmicrouptime cyg_getmicrouptime
80
#define hashinit cyg_hashinit
81
#define icmp6_ctloutput cyg_icmp6_ctloutput
82
#define icmp6_error cyg_icmp6_error
83
#define icmp6_fasttimo cyg_icmp6_fasttimo
84
#define icmp6_init cyg_icmp6_init
85
#define icmp6_input cyg_icmp6_input
86
#define icmp6_mtudisc_update cyg_icmp6_mtudisc_update
87
#define icmp6_redirect_input cyg_icmp6_redirect_input
88
#define icmp6_redirect_output cyg_icmp6_redirect_output
89
#define icmp6_reflect cyg_icmp6_reflect
90
#define icmp_error cyg_icmp_error
91
#define icmp_input cyg_icmp_input
92
#define if_addmulti cyg_if_addmulti
93
#define if_allmulti cyg_if_allmulti
94
#define if_attach cyg_if_attach
95
#define if_clone_create cyg_if_clone_create
96
#define if_clone_destroy cyg_if_clone_destroy
97
#define if_clone_list cyg_if_clone_list
98
#define if_clone_lookup cyg_if_clone_lookup
99
#define if_delmulti cyg_if_delmulti
100
#define if_down cyg_if_down
101
#define if_route cyg_if_route
102
#define if_setlladdr cyg_if_setlladdr
103
#define if_simloop cyg_if_simloop
104
#define if_unroute cyg_if_unroute
105
#define if_up cyg_if_up
106
#define ifa_ifwithaddr cyg_ifa_ifwithaddr
107
#define ifa_ifwithdstaddr cyg_ifa_ifwithdstaddr
108
#define ifa_ifwithnet cyg_ifa_ifwithnet
109
#define ifa_ifwithroute cyg_ifa_ifwithroute
110
#define ifafree cyg_ifafree
111
#define ifaof_ifpforaddr cyg_ifaof_ifpforaddr
112
#define ifioctl cyg_ifioctl
113
#define ifunit cyg_ifunit
114
#define igmp_fasttimo cyg_igmp_fasttimo
115
#define igmp_init cyg_igmp_init
116
#define igmp_input cyg_igmp_input
117
#define igmp_joingroup cyg_igmp_joingroup
118
#define igmp_leavegroup cyg_igmp_leavegroup
119
#define igmp_slowtimo cyg_igmp_slowtimo
120
#define in6_addmulti cyg_in6_addmulti
121
#define in6_addr2zoneid cyg_in6_addr2zoneid
122
#define in6_addrscope cyg_in6_addrscope
123
#define in6_are_prefix_equal cyg_in6_are_prefix_equal
124
#define in6_cksum cyg_in6_cksum
125
#define in6_clearscope cyg_in6_clearscope
126
#define in6_control cyg_in6_control
127
#define in6_delmulti cyg_in6_delmulti
128
#define in6_embedscope cyg_in6_embedscope
129
#define in6_get_tmpifid cyg_in6_get_tmpifid
130
#define in6_if_up cyg_in6_if_up
131
#define in6_ifattach cyg_in6_ifattach
132
#define in6_ifawithifp cyg_in6_ifawithifp
133
#define in6_init_prefix_ltimes cyg_in6_init_prefix_ltimes
134
#define in6_inithead cyg_in6_inithead
135
#define in6_joingroup cyg_in6_joingroup
136
#define in6_leavegroup cyg_in6_leavegroup
137
#define in6_localaddr cyg_in6_localaddr
138
#define in6_losing cyg_in6_losing
139
#define in6_mapped_peeraddr cyg_in6_mapped_peeraddr
140
#define in6_mapped_sockaddr cyg_in6_mapped_sockaddr
141
#define in6_mask2len cyg_in6_mask2len
142
#define in6_matchlen cyg_in6_matchlen
143
#define in6_nigroup cyg_in6_nigroup
144
#define in6_pcbbind cyg_in6_pcbbind
145
#define in6_pcbconnect cyg_in6_pcbconnect
146
#define in6_pcbdetach cyg_in6_pcbdetach
147
#define in6_pcbdisconnect cyg_in6_pcbdisconnect
148
#define in6_pcbladdr cyg_in6_pcbladdr
149
#define in6_pcblookup_hash cyg_in6_pcblookup_hash
150
#define in6_pcblookup_local cyg_in6_pcblookup_local
151
#define in6_pcbnotify cyg_in6_pcbnotify
152
#define in6_pcbsetport cyg_in6_pcbsetport
153
#define in6_prefixlen2mask cyg_in6_prefixlen2mask
154
#define in6_purgeaddr cyg_in6_purgeaddr
155
#define in6_recoverscope cyg_in6_recoverscope
156
#define in6_rtchange cyg_in6_rtchange
157
#define in6_selecthlim cyg_in6_selecthlim
158
#define in6_selectroute cyg_in6_selectroute
159
#define in6_selectsrc cyg_in6_selectsrc
160
#define in6_setmaxmtu cyg_in6_setmaxmtu
161
#define in6_setpeeraddr cyg_in6_setpeeraddr
162
#define in6_setsockaddr cyg_in6_setsockaddr
163
#define in6_sin6_2_sin cyg_in6_sin6_2_sin
164
#define in6_sin6_2_sin_in_sock cyg_in6_sin6_2_sin_in_sock
165
#define in6_sin_2_v4mapsin6 cyg_in6_sin_2_v4mapsin6
166
#define in6_sin_2_v4mapsin6_in_sock cyg_in6_sin_2_v4mapsin6_in_sock
167
#define in6_src_ioctl cyg_in6_src_ioctl
168
#define in6_tmpaddrtimer cyg_in6_tmpaddrtimer
169
#define in6_tmpifadd cyg_in6_tmpifadd
170
#define in6_update_ifa cyg_in6_update_ifa
171
#define in6if_do_dad cyg_in6if_do_dad
172
#define in6ifa_ifpforlinklocal cyg_in6ifa_ifpforlinklocal
173
#define in6ifa_ifpwithaddr cyg_in6ifa_ifpwithaddr
174
#define in_addmulti cyg_in_addmulti
175
#define in_addword cyg_in_addword
176
#define in_broadcast cyg_in_broadcast
177
#define in_canforward cyg_in_canforward
178
#define in_cksum cyg_in_cksum
179
#define in_cksum_hdr cyg_in_cksum_hdr
180
#define in_cksum_skip cyg_in_cksum_skip
181
#define in_cksumdata cyg_in_cksumdata
182
#define in_control cyg_in_control
183
#define in_delayed_cksum cyg_in_delayed_cksum
184
#define in_delmulti cyg_in_delmulti
185
#define in_ifadown cyg_in_ifadown
186
#define in_ifscrub cyg_in_ifscrub
187
#define in_inithead cyg_in_inithead
188
#define in_localaddr cyg_in_localaddr
189
#define in_losing cyg_in_losing
190
#define in_pcballoc cyg_in_pcballoc
191
#define in_pcbbind cyg_in_pcbbind
192
#define in_pcbconnect cyg_in_pcbconnect
193
#define in_pcbdetach cyg_in_pcbdetach
194
#define in_pcbdisconnect cyg_in_pcbdisconnect
195
#define in_pcbinshash cyg_in_pcbinshash
196
#define in_pcbladdr cyg_in_pcbladdr
197
#define in_pcblookup_hash cyg_in_pcblookup_hash
198
#define in_pcblookup_local cyg_in_pcblookup_local
199
#define in_pcbnotifyall cyg_in_pcbnotifyall
200
#define in_pcbpurgeif0 cyg_in_pcbpurgeif0
201
#define in_pcbrehash cyg_in_pcbrehash
202
#define in_pcbremlists cyg_in_pcbremlists
203
#define in_pseudo cyg_in_pseudo
204
#define in_rtchange cyg_in_rtchange
205
#define in_rtqdrain cyg_in_rtqdrain
206
#define in_setpeeraddr cyg_in_setpeeraddr
207
#define in_setsockaddr cyg_in_setsockaddr
208
#define init_ip6pktopts cyg_init_ip6pktopts
209
#define init_loopback_interface cyg_init_loopback_interface
210
#define init_net cyg_init_net
211
#define init_net_IPv6 cyg_init_net_IPv6
212
#define init_sin6 cyg_init_sin6
213
#define ip6_addaux cyg_ip6_addaux
214
#define ip6_clearpktopts cyg_ip6_clearpktopts
215
#define ip6_copypktopts cyg_ip6_copypktopts
216
#define ip6_ctloutput cyg_ip6_ctloutput
217
#define ip6_delaux cyg_ip6_delaux
218
#define ip6_findaux cyg_ip6_findaux
219
#define ip6_forward cyg_ip6_forward
220
#define ip6_freemoptions cyg_ip6_freemoptions
221
#define ip6_freepcbopts cyg_ip6_freepcbopts
222
#define ip6_get_prevhdr cyg_ip6_get_prevhdr
223
#define ip6_getdstifaddr cyg_ip6_getdstifaddr
224
#define ip6_init cyg_ip6_init
225
#define ip6_init2 cyg_ip6_init2
226
#define ip6_input cyg_ip6_input
227
#define ip6_lasthdr cyg_ip6_lasthdr
228
#define ip6_mforward cyg_ip6_mforward
229
#define ip6_mloopback cyg_ip6_mloopback
230
#define ip6_mrouter_done cyg_ip6_mrouter_done
231
#define ip6_mrouter_get cyg_ip6_mrouter_get
232
#define ip6_mrouter_set cyg_ip6_mrouter_set
233
#define ip6_nexthdr cyg_ip6_nexthdr
234
#define ip6_notify_pmtu cyg_ip6_notify_pmtu
235
#define ip6_optlen cyg_ip6_optlen
236
#define ip6_output cyg_ip6_output
237
#define ip6_process_hopopts cyg_ip6_process_hopopts
238
#define ip6_raw_ctloutput cyg_ip6_raw_ctloutput
239
#define ip6_reset_rcvopt cyg_ip6_reset_rcvopt
240
#define ip6_savecontrol cyg_ip6_savecontrol
241
#define ip6_setpktoptions cyg_ip6_setpktoptions
242
#define ip6_sprintf cyg_ip6_sprintf
243
#define ip6_unknown_opt cyg_ip6_unknown_opt
244
#define ip6_update_recvpcbopt cyg_ip6_update_recvpcbopt
245
#define ip6intr cyg_ip6intr
246
#define ip_ctloutput cyg_ip_ctloutput
247
#define ip_drain cyg_ip_drain
248
#define ip_freemoptions cyg_ip_freemoptions
249
#define ip_init cyg_ip_init
250
#define ip_input cyg_ip_input
251
#define ip_optcopy cyg_ip_optcopy
252
#define ip_output cyg_ip_output
253
#define ip_rsvp_done cyg_ip_rsvp_done
254
#define ip_rsvp_force_done cyg_ip_rsvp_force_done
255
#define ip_rsvp_init cyg_ip_rsvp_init
256
#define ip_rsvp_vif_done cyg_ip_rsvp_vif_done
257
#define ip_rsvp_vif_init cyg_ip_rsvp_vif_init
258
#define ip_savecontrol cyg_ip_savecontrol
259
#define ip_slowtimo cyg_ip_slowtimo
260
#define ip_srcroute cyg_ip_srcroute
261
#define ip_stripoptions cyg_ip_stripoptions
262
#define ipflow_create cyg_ipflow_create
263
#define ipflow_fastforward cyg_ipflow_fastforward
264
#define ipflow_slowtimo cyg_ipflow_slowtimo
265
#define iptime cyg_iptime
266
#define loioctl cyg_loioctl
267
#define looutput cyg_looutput
268
#define m_adj cyg_m_adj
269
#define m_aux_add cyg_m_aux_add
270
#define m_aux_add2 cyg_m_aux_add2
271
#define m_aux_delete cyg_m_aux_delete
272
#define m_aux_find cyg_m_aux_find
273
#define m_aux_find2 cyg_m_aux_find2
274
#define m_cat cyg_m_cat
275
#define m_clalloc cyg_m_clalloc
276
#define m_clalloc_wait cyg_m_clalloc_wait
277
#define m_copyback cyg_m_copyback
278
#define m_copydata cyg_m_copydata
279
#define m_copym cyg_m_copym
280
#define m_free cyg_m_free
281
#define m_freem cyg_m_freem
282
#define m_get cyg_m_get
283
#define m_getclr cyg_m_getclr
284
#define m_gethdr cyg_m_gethdr
285
#define m_mballoc cyg_m_mballoc
286
#define m_mballoc_wait cyg_m_mballoc_wait
287
#define m_prepend cyg_m_prepend
288
#define m_pulldown cyg_m_pulldown
289
#define m_pullup cyg_m_pullup
290
#define m_retry cyg_m_retry
291
#define m_retryhdr cyg_m_retryhdr
292
#define m_split cyg_m_split
293
#define microtime cyg_microtime
294
#define mld6_fasttimeo cyg_mld6_fasttimeo
295
#define mld6_init cyg_mld6_init
296
#define mld6_input cyg_mld6_input
297
#define mld6_start_listening cyg_mld6_start_listening
298
#define mld6_stop_listening cyg_mld6_stop_listening
299
#define mrt6_ioctl cyg_mrt6_ioctl
300
#define nd6_cache_lladdr cyg_nd6_cache_lladdr
301
#define nd6_dad_duplicated cyg_nd6_dad_duplicated
302
#define nd6_dad_start cyg_nd6_dad_start
303
#define nd6_dad_stop cyg_nd6_dad_stop
304
#define nd6_ifattach cyg_nd6_ifattach
305
#define nd6_ifptomac cyg_nd6_ifptomac
306
#define nd6_init cyg_nd6_init
307
#define nd6_ioctl cyg_nd6_ioctl
308
#define nd6_is_addr_neighbor cyg_nd6_is_addr_neighbor
309
#define nd6_lookup cyg_nd6_lookup
310
#define nd6_na_input cyg_nd6_na_input
311
#define nd6_na_output cyg_nd6_na_output
312
#define nd6_need_cache cyg_nd6_need_cache
313
#define nd6_ns_input cyg_nd6_ns_input
314
#define nd6_ns_output cyg_nd6_ns_output
315
#define nd6_nud_hint cyg_nd6_nud_hint
316
#define nd6_option cyg_nd6_option
317
#define nd6_option_init cyg_nd6_option_init
318
#define nd6_options cyg_nd6_options
319
#define nd6_output cyg_nd6_output
320
#define nd6_prefix_lookup cyg_nd6_prefix_lookup
321
#define nd6_prefix_offlink cyg_nd6_prefix_offlink
322
#define nd6_prefix_onlink cyg_nd6_prefix_onlink
323
#define nd6_prelist_add cyg_nd6_prelist_add
324
#define nd6_ra_input cyg_nd6_ra_input
325
#define nd6_rs_input cyg_nd6_rs_input
326
#define nd6_rtrequest cyg_nd6_rtrequest
327
#define nd6_setdefaultiface cyg_nd6_setdefaultiface
328
#define nd6_setmtu cyg_nd6_setmtu
329
#define nd6_storelladdr cyg_nd6_storelladdr
330
#define nd6_timer cyg_nd6_timer
331
#define net_add_domain cyg_net_add_domain
332
#define ovbcopy cyg_ovbcopy
333
#define pfctlinput cyg_pfctlinput
334
#define pfctlinput2 cyg_pfctlinput2
335
#define pffindproto cyg_pffindproto
336
#define pffindtype cyg_pffindtype
337
#define pfxlist_onlink_check cyg_pfxlist_onlink_check
338
#define pim6_input cyg_pim6_input
339
#define prelist_remove cyg_prelist_remove
340
#define prelist_update cyg_prelist_update
341
#define pru_accept_notsupp cyg_pru_accept_notsupp
342
#define pru_connect2_notsupp cyg_pru_connect2_notsupp
343
#define pru_control_notsupp cyg_pru_control_notsupp
344
#define pru_listen_notsupp cyg_pru_listen_notsupp
345
#define pru_rcvd_notsupp cyg_pru_rcvd_notsupp
346
#define pru_rcvoob_notsupp cyg_pru_rcvoob_notsupp
347
#define pru_sense_null cyg_pru_sense_null
348
#define raw_attach cyg_raw_attach
349
#define raw_ctlinput cyg_raw_ctlinput
350
#define raw_detach cyg_raw_detach
351
#define raw_disconnect cyg_raw_disconnect
352
#define raw_init cyg_raw_init
353
#define raw_input cyg_raw_input
354
#define register_netisr cyg_register_netisr
355
#define rip6_ctlinput cyg_rip6_ctlinput
356
#define rip6_ctloutput cyg_rip6_ctloutput
357
#define rip6_input cyg_rip6_input
358
#define rip6_output cyg_rip6_output
359
#define rip_ctlinput cyg_rip_ctlinput
360
#define rip_ctloutput cyg_rip_ctloutput
361
#define rip_init cyg_rip_init
362
#define rip_input cyg_rip_input
363
#define rip_output cyg_rip_output
364
#define rn_addmask cyg_rn_addmask
365
#define rn_addroute cyg_rn_addroute
366
#define rn_delete cyg_rn_delete
367
#define rn_init cyg_rn_init
368
#define rn_inithead cyg_rn_inithead
369
#define rn_lookup cyg_rn_lookup
370
#define rn_match cyg_rn_match
371
#define rn_refines cyg_rn_refines
372
#define route6_input cyg_route6_input
373
#define route_init cyg_route_init
374
//#define route_reinit cyg_route_reinit
375
#define rsvp_input cyg_rsvp_input
376
#define rt6_flush cyg_rt6_flush
377
#define rt_ifmsg cyg_rt_ifmsg
378
#define rt_missmsg cyg_rt_missmsg
379
#define rt_newaddrmsg cyg_rt_newaddrmsg
380
#define rt_newmaddrmsg cyg_rt_newmaddrmsg
381
#define rt_setgate cyg_rt_setgate
382
#define rtalloc cyg_rtalloc
383
#define rtalloc1 cyg_rtalloc1
384
#define rtalloc_ign cyg_rtalloc_ign
385
#define rtfree cyg_rtfree
386
#define rtinit cyg_rtinit
387
#define rtioctl cyg_rtioctl
388
#define rtredirect cyg_rtredirect
389
#define rtrequest cyg_rtrequest
390
#define sb_lock cyg_sb_lock
391
#define sbappend cyg_sbappend
392
#define sbappendaddr cyg_sbappendaddr
393
#define sbappendcontrol cyg_sbappendcontrol
394
#define sbappendrecord cyg_sbappendrecord
395
#define sbcompress cyg_sbcompress
396
#define sbcreatecontrol cyg_sbcreatecontrol
397
#define sbdrop cyg_sbdrop
398
#define sbdroprecord cyg_sbdroprecord
399
#define sbflush cyg_sbflush
400
#define sbrelease cyg_sbrelease
401
#define sbreserve cyg_sbreserve
402
#define sbwait cyg_sbwait
403
#define scope6_addr2default cyg_scope6_addr2default
404
#define scope6_check_id cyg_scope6_check_id
405
#define scope6_get cyg_scope6_get
406
#define scope6_get_default cyg_scope6_get_default
407
#define scope6_ifattach cyg_scope6_ifattach
408
#define scope6_set cyg_scope6_set
409
#define scope6_setdefault cyg_scope6_setdefault
410
#define scope6_setzoneid cyg_scope6_setzoneid
411
#define selwakeup cyg_selwakeup
412
#define soabort cyg_soabort
413
#define soaccept cyg_soaccept
414
#define soalloc cyg_soalloc
415
#define sobind cyg_sobind
416
#define socantrcvmore cyg_socantrcvmore
417
#define socantsendmore cyg_socantsendmore
418
#define soclose cyg_soclose
419
#define soconnect cyg_soconnect
420
#define socreate cyg_socreate
421
#define sodealloc cyg_sodealloc
422
#define sodisconnect cyg_sodisconnect
423
#define sodropablereq cyg_sodropablereq
424
#define sofree cyg_sofree
425
#define sogetopt cyg_sogetopt
426
#define sohasoutofband cyg_sohasoutofband
427
#define soisconnected cyg_soisconnected
428
#define soisconnecting cyg_soisconnecting
429
#define soisdisconnected cyg_soisdisconnected
430
#define soisdisconnecting cyg_soisdisconnecting
431
#define solisten cyg_solisten
432
#define sonewconn cyg_sonewconn
433
#define sonewconn3 cyg_sonewconn3
434
#define soopt_getm cyg_soopt_getm
435
#define soopt_mcopyin cyg_soopt_mcopyin
436
#define soopt_mcopyout cyg_soopt_mcopyout
437
#define sooptcopyin cyg_sooptcopyin
438
#define sooptcopyout cyg_sooptcopyout
439
#define sopoll cyg_sopoll
440
#define soreceive cyg_soreceive
441
#define soreserve cyg_soreserve
442
#define sorflush cyg_sorflush
443
#define sosend cyg_sosend
444
#define sosetopt cyg_sosetopt
445
#define soshutdown cyg_soshutdown
446
#define sowakeup cyg_sowakeup
447
#define tcp6_ctlinput cyg_tcp6_ctlinput
448
#define tcp6_input cyg_tcp6_input
449
#define tcp_canceltimers cyg_tcp_canceltimers
450
#define tcp_close cyg_tcp_close
451
#define tcp_ctlinput cyg_tcp_ctlinput
452
#define tcp_ctloutput cyg_tcp_ctloutput
453
#define tcp_drain cyg_tcp_drain
454
#define tcp_drop cyg_tcp_drop
455
#define tcp_drop_syn_sent cyg_tcp_drop_syn_sent
456
#define tcp_fillheaders cyg_tcp_fillheaders
457
#define tcp_gettaocache cyg_tcp_gettaocache
458
#define tcp_init cyg_tcp_init
459
#define tcp_input cyg_tcp_input
460
#define tcp_maketemplate cyg_tcp_maketemplate
461
#define tcp_mss cyg_tcp_mss
462
#define tcp_mssopt cyg_tcp_mssopt
463
#define tcp_mtudisc cyg_tcp_mtudisc
464
#define tcp_new_isn cyg_tcp_new_isn
465
#define tcp_newtcpcb cyg_tcp_newtcpcb
466
#define tcp_output cyg_tcp_output
467
#define tcp_quench cyg_tcp_quench
468
#define tcp_respond cyg_tcp_respond
469
#define tcp_rtlookup cyg_tcp_rtlookup
470
#define tcp_rtlookup6 cyg_tcp_rtlookup6
471
#define tcp_setpersist cyg_tcp_setpersist
472
#define tcp_slowtimo cyg_tcp_slowtimo
473
#define tcp_timer_2msl cyg_tcp_timer_2msl
474
#define tcp_timer_delack cyg_tcp_timer_delack
475
#define tcp_timer_keep cyg_tcp_timer_keep
476
#define tcp_timer_persist cyg_tcp_timer_persist
477
#define tcp_timer_rexmt cyg_tcp_timer_rexmt
478
#define timeout cyg_timeout
479
#define tvtohz cyg_tvtohz
480
#define udp6_ctlinput cyg_udp6_ctlinput
481
#define udp6_input cyg_udp6_input
482
#define udp6_output cyg_udp6_output
483
#define udp_ctlinput cyg_udp_ctlinput
484
#define udp_init cyg_udp_init
485
#define udp_input cyg_udp_input
486
#define udp_notify cyg_udp_notify
487
#define udp_shutdown cyg_udp_shutdown
488
#define uiomove cyg_uiomove
489
 
490
// DATA symbols
491
#define arpintrq cyg_arpintrq
492
#define bsd_nste cyg_bsd_nste
493
#define bsd_sock_fileops cyg_bsd_sock_fileops
494
#define bsd_sockops cyg_bsd_sockops
495
#define encaptab cyg_encaptab
496
#define etherbroadcastaddr cyg_etherbroadcastaddr
497
#define fr_checkp cyg_fr_checkp
498
#define fw_enable cyg_fw_enable
499
#define hostname cyg_hostname
500
#define hz cyg_hz
501
#define icmp6_ifstat cyg_icmp6_ifstat
502
#define icmp6_ifstatmax cyg_icmp6_ifstatmax
503
#define icmp6_nodeinfo cyg_icmp6_nodeinfo
504
#define icmp6_rediraccept cyg_icmp6_rediraccept
505
#define icmp6errppslim cyg_icmp6errppslim
506
#define if_cloners cyg_if_cloners
507
#define if_index cyg_if_index
508
#define ifindex2ifnet cyg_ifindex2ifnet
509
#define ifqmaxlen cyg_ifqmaxlen
510
#define in6_ifstat cyg_in6_ifstat
511
#define in6_ifstatmax cyg_in6_ifstatmax
512
#define in6_maxmtu cyg_in6_maxmtu
513
#define inet6ctlerrmap cyg_inet6ctlerrmap
514
#define inet6domain cyg_inet6domain
515
#define inet6sw cyg_inet6sw
516
#define inetctlerrmap cyg_inetctlerrmap
517
#define inetdomain cyg_inetdomain
518
#define inetsw cyg_inetsw
519
#define ip6_accept_rtadv cyg_ip6_accept_rtadv
520
#define ip6_auto_flowlabel cyg_ip6_auto_flowlabel
521
#define ip6_auto_linklocal cyg_ip6_auto_linklocal
522
#define ip6_dad_count cyg_ip6_dad_count
523
#define ip6_defhlim cyg_ip6_defhlim
524
#define ip6_defmcasthlim cyg_ip6_defmcasthlim
525
#define ip6_forwarding cyg_ip6_forwarding
526
#define ip6_fw_enable cyg_ip6_fw_enable
527
#define ip6_hdrnestlimit cyg_ip6_hdrnestlimit
528
#define ip6_id cyg_ip6_id
529
#define ip6_log_interval cyg_ip6_log_interval
530
#define ip6_log_time cyg_ip6_log_time
531
#define ip6_mrouter cyg_ip6_mrouter
532
#define ip6_mrouter_ver cyg_ip6_mrouter_ver
533
#define ip6_prefer_tempaddr cyg_ip6_prefer_tempaddr
534
#define ip6_temp_preferred_lifetime cyg_ip6_temp_preferred_lifetime
535
#define ip6_temp_regen_advance cyg_ip6_temp_regen_advance
536
#define ip6_temp_valid_lifetime cyg_ip6_temp_valid_lifetime
537
#define ip6_use_defzone cyg_ip6_use_defzone
538
#define ip6_use_deprecated cyg_ip6_use_deprecated
539
#define ip6_use_tempaddr cyg_ip6_use_tempaddr
540
#define ip6_v6only cyg_ip6_v6only
541
#define ip_defttl cyg_ip_defttl
542
#define ip_mcast_src cyg_ip_mcast_src
543
#define ip_mforward cyg_ip_mforward
544
#define ip_mrouter cyg_ip_mrouter
545
#define ip_mrouter_done cyg_ip_mrouter_done
546
#define ip_mrouter_get cyg_ip_mrouter_get
547
#define ip_mrouter_set cyg_ip_mrouter_set
548
#define ipforwarding cyg_ipforwarding
549
#define ipport_firstauto cyg_ipport_firstauto
550
#define ipport_hifirstauto cyg_ipport_hifirstauto
551
#define ipport_hilastauto cyg_ipport_hilastauto
552
#define ipport_lastauto cyg_ipport_lastauto
553
#define ipport_lowfirstauto cyg_ipport_lowfirstauto
554
#define ipport_lowlastauto cyg_ipport_lowlastauto
555
#define legal_vif_num cyg_legal_vif_num
556
#define llinfo_nd6 cyg_llinfo_nd6
557
#define log_in_vain cyg_log_in_vain
558
#define m_clalloc_wid cyg_m_clalloc_wid
559
#define m_mballoc_wid cyg_m_mballoc_wid
560
#define maxsockets cyg_maxsockets
561
#define mbuf_wait cyg_mbuf_wait
562
#define mrt_ioctl cyg_mrt_ioctl
563
#define nd6_debug cyg_nd6_debug
564
#define nd6_delay cyg_nd6_delay
565
#define nd6_gctimer cyg_nd6_gctimer
566
#define nd6_maxndopt cyg_nd6_maxndopt
567
#define nd6_maxnudhint cyg_nd6_maxnudhint
568
#define nd6_mmaxtries cyg_nd6_mmaxtries
569
#define nd6_prune cyg_nd6_prune
570
#define nd6_recalc_reachtm_interval cyg_nd6_recalc_reachtm_interval
571
#define nd6_umaxtries cyg_nd6_umaxtries
572
#define nd6_useloopback cyg_nd6_useloopback
573
#define nd_ifinfo cyg_nd_ifinfo
574
#define nd_prefix cyg_nd_prefix
575
#define nmbclusters cyg_nmbclusters
576
#define proc0 cyg_proc0
577
#define raw_usrreqs cyg_raw_usrreqs
578
#define rip6_usrreqs cyg_rip6_usrreqs
579
#define rip_recvspace cyg_rip_recvspace
580
#define rip_sendspace cyg_rip_sendspace
581
#define rip_usrreqs cyg_rip_usrreqs
582
#define rsvp_on cyg_rsvp_on
583
#define rsvpdebug cyg_rsvpdebug
584
#define rtc_resolution cyg_rtc_resolution
585
#define sb_max cyg_sb_max
586
#define scope6_ids cyg_scope6_ids
587
#define ss_fltsz cyg_ss_fltsz
588
#define ss_fltsz_local cyg_ss_fltsz_local
589
#define tcp6_usrreqs cyg_tcp6_usrreqs
590
#define tcp_backoff cyg_tcp_backoff
591
#define tcp_delack_enabled cyg_tcp_delack_enabled
592
#define tcp_do_newreno cyg_tcp_do_newreno
593
#define tcp_lq_overflow cyg_tcp_lq_overflow
594
#define tcp_mssdflt cyg_tcp_mssdflt
595
#define tcp_recvspace cyg_tcp_recvspace
596
#define tcp_sendspace cyg_tcp_sendspace
597
#define tcp_syn_backoff cyg_tcp_syn_backoff
598
#define tcp_usrreqs cyg_tcp_usrreqs
599
#define tcp_v6mssdflt cyg_tcp_v6mssdflt
600
#define tick cyg_tick
601
#define udp6_usrreqs cyg_udp6_usrreqs
602
#define udp_in6 cyg_udp_in6
603
#define udp_recvspace cyg_udp_recvspace
604
#define udp_sendspace cyg_udp_sendspace
605
#define udp_usrreqs cyg_udp_usrreqs
606
#define udpcksum cyg_udpcksum
607
 
608
// BSS symbols
609
#define addrsel_policytab cyg_addrsel_policytab
610
#define defaultaddrpolicy cyg_defaultaddrpolicy
611
#define domains cyg_domains
612
#define frag6_doing_reass cyg_frag6_doing_reass
613
#define frag6_nfragpackets cyg_frag6_nfragpackets
614
#define icmp6stat cyg_icmp6stat
615
#define icmpstat cyg_icmpstat
616
#define if_cloners_count cyg_if_cloners_count
617
#define ifnet cyg_ifnet
618
#define ifnet_addrs cyg_ifnet_addrs
619
#define in6_ifaddr cyg_in6_ifaddr
620
#define in6_multihead cyg_in6_multihead
621
#define in6_tmpaddrtimer_ch cyg_in6_tmpaddrtimer_ch
622
#define in_ifaddrhead cyg_in_ifaddrhead
623
#define in_multihead cyg_in_multihead
624
#define ip6_desync_factor cyg_ip6_desync_factor
625
#define ip6_flow_seq cyg_ip6_flow_seq
626
#define ip6_forward_rt cyg_ip6_forward_rt
627
#define ip6_forward_srcrt cyg_ip6_forward_srcrt
628
#define ip6_fw_chk_ptr cyg_ip6_fw_chk_ptr
629
#define ip6_fw_ctl_ptr cyg_ip6_fw_ctl_ptr
630
#define ip6_maxfragpackets cyg_ip6_maxfragpackets
631
#define ip6_ours_check_algorithm cyg_ip6_ours_check_algorithm
632
#define ip6_protox cyg_ip6_protox
633
#define ip6_sourcecheck cyg_ip6_sourcecheck
634
#define ip6_sourcecheck_interval cyg_ip6_sourcecheck_interval
635
#define ip6intrq cyg_ip6intrq
636
#define ip6q cyg_ip6q
637
#define ip6stat cyg_ip6stat
638
#define ip_fw_chk_ptr cyg_ip_fw_chk_ptr
639
#define ip_fw_ctl_ptr cyg_ip_fw_ctl_ptr
640
#define ip_fw_fwd_addr cyg_ip_fw_fwd_addr
641
#define ip_id cyg_ip_id
642
#define ip_protox cyg_ip_protox
643
#define ip_rsvpd cyg_ip_rsvpd
644
#define ipintrq cyg_ipintrq
645
#define ipstat cyg_ipstat
646
#define isn_ctx cyg_isn_ctx
647
#define isn_last_reseed cyg_isn_last_reseed
648
#define isn_secret cyg_isn_secret
649
#define ktime cyg_ktime
650
#define loif cyg_loif
651
#define max_datalen cyg_max_datalen
652
#define max_hdr cyg_max_hdr
653
#define max_linkhdr cyg_max_linkhdr
654
#define max_protohdr cyg_max_protohdr
655
#define mbstat cyg_mbstat
656
#define mbtypes cyg_mbtypes
657
#define mbutl cyg_mbutl
658
#define mclfree cyg_mclfree
659
#define mclrefcnt cyg_mclrefcnt
660
#define mf6ctable cyg_mf6ctable
661
#define mmbfree cyg_mmbfree
662
#define mono_time cyg_mono_time
663
#define mrt6stat cyg_mrt6stat
664
#define mtab_lock cyg_mtab_lock
665
#define multicast_register_if cyg_multicast_register_if
666
#define n6expire cyg_n6expire
667
#define nd6_defifindex cyg_nd6_defifindex
668
#define nd6_slowtimo_ch cyg_nd6_slowtimo_ch
669
#define nd6_timer_ch cyg_nd6_timer_ch
670
#define nd_defrouter cyg_nd_defrouter
671
#define netint_flags cyg_netint_flags
672
#define ng_ether_attach_p cyg_ng_ether_attach_p
673
#define ng_ether_detach_p cyg_ng_ether_detach_p
674
#define ng_ether_input_orphan_p cyg_ng_ether_input_orphan_p
675
#define ng_ether_input_p cyg_ng_ether_input_p
676
#define ng_ether_output_p cyg_ng_ether_output_p
677
#define nstab_lock cyg_nstab_lock
678
#define rawcb_list cyg_rawcb_list
679
#define rip6stat cyg_rip6stat
680
#define ripcb cyg_ripcb
681
#define ripcbinfo cyg_ripcbinfo
682
#define route_cb cyg_route_cb
683
#define rt_tables cyg_rt_tables
684
#define sig_pending cyg_sig_pending
685
#define signal_mutex cyg_signal_mutex
686
#define signal_sigwait cyg_signal_sigwait
687
#define so_gencnt cyg_so_gencnt
688
#define socket_zone cyg_socket_zone
689
#define tcb cyg_tcb
690
#define tcbinfo cyg_tcbinfo
691
#define tcp_ccgen cyg_tcp_ccgen
692
#define tcp_delacktime cyg_tcp_delacktime
693
#define tcp_keepidle cyg_tcp_keepidle
694
#define tcp_keepinit cyg_tcp_keepinit
695
#define tcp_keepintvl cyg_tcp_keepintvl
696
#define tcp_maxidle cyg_tcp_maxidle
697
#define tcp_maxpersistidle cyg_tcp_maxpersistidle
698
#define tcp_msl cyg_tcp_msl
699
#define tcpstat cyg_tcpstat
700
#define udb cyg_udb
701
#define udbinfo cyg_udbinfo
702
#define udp_ip6 cyg_udp_ip6
703
#define udpstat cyg_udpstat
704
#endif
705
 
706
// Symbols from the BSD_CRYPTO package
707
 
708
// TEXT symbols
709
 
710
#define SHA256_Data cyg_SHA256_Data
711
#define SHA256_End cyg_SHA256_End
712
#define SHA256_Final cyg_SHA256_Final
713
#define SHA256_Init cyg_SHA256_Init
714
#define SHA256_Transform cyg_SHA256_Transform
715
#define SHA256_Update cyg_SHA256_Update
716
#define SHA384_Data cyg_SHA384_Data
717
#define SHA384_End cyg_SHA384_End
718
#define SHA384_Final cyg_SHA384_Final
719
#define SHA384_Init cyg_SHA384_Init
720
#define SHA384_Update cyg_SHA384_Update
721
#define SHA512_Data cyg_SHA512_Data
722
#define SHA512_End cyg_SHA512_End
723
#define SHA512_Final cyg_SHA512_Final
724
#define SHA512_Init cyg_SHA512_Init
725
#define SHA512_Last cyg_SHA512_Last
726
#define SHA512_Transform cyg_SHA512_Transform
727
#define SHA512_Update cyg_SHA512_Update
728
#define md5_init cyg_md5_init
729
#define md5_loop cyg_md5_loop
730
#define md5_pad cyg_md5_pad
731
#define md5_result cyg_md5_result
732
#define sha1_init cyg_sha1_init
733
#define sha1_loop cyg_sha1_loop
734
#define sha1_pad cyg_sha1_pad
735
#define sha1_result cyg_sha1_result
736
#define cast128_decrypt_round12 cyg_cast128_decrypt_round12
737
#define cast128_decrypt_round16 cyg_cast128_decrypt_round16
738
#define cast128_encrypt_round12 cyg_cast128_encrypt_round12
739
#define cast128_encrypt_round16 cyg_cast128_encrypt_round16
740
#define set_cast128_subkey cyg_set_cast128_subkey
741
#define twofish_TableOp cyg_twofish_TableOp
742
#define twofish_blockDecrypt cyg_twofish_blockDecrypt
743
#define twofish_blockEncrypt cyg_twofish_blockEncrypt
744
#define twofish_cipherInit cyg_twofish_cipherInit
745
#define twofish_makeKey cyg_twofish_makeKey
746
#define twofish_reKey cyg_twofish_reKey
747
#define rijndaelDecrypt cyg_rijndaelDecrypt
748
#define rijndaelEncrypt cyg_rijndaelEncrypt
749
#define rijndaelKeyEncToDec cyg_rijndaelKeyEncToDec
750
#define rijndaelKeySched cyg_rijndaelKeySched
751
#define rijndael_blockDecrypt cyg_rijndael_blockDecrypt
752
#define rijndael_blockEncrypt cyg_rijndael_blockEncrypt
753
#define rijndael_cipherInit cyg_rijndael_cipherInit
754
#define rijndael_makeKey cyg_rijndael_makeKey
755
#define rijndael_padDecrypt cyg_rijndael_padDecrypt
756
#define rijndael_padEncrypt cyg_rijndael_padEncrypt
757
 
758
// Data symbols
759
 
760
#define numRounds cyg_numRounds
761
 
762
// BSS symbols
763
 
764
 
765
#include <pkgconf/net.h>
766
#include <cyg/infra/cyg_type.h>  // Standard eCos types
767
 
768
#define __P(protos) protos
769
#if defined(__cplusplus)
770
#define __BEGIN_DECLS   extern "C" {
771
#define __END_DECLS     };
772
#else
773
#define __BEGIN_DECLS
774
#define __END_DECLS
775
#endif
776
 
777
#include <sys/types.h>
778
#include <sys/endian.h>
779
#include <errno.h>
780
#include <string.h>
781
 
782
#ifdef _KERNEL
783
// External [common] variables
784
extern int hz;
785
extern volatile struct timeval ktime;
786
#define time_second ktime.tv_sec
787
extern int tick;
788
extern struct proc * proc0;
789
#define curproc 0
790
extern void microtime(struct timeval *tp);
791
extern void getmicrotime(struct timeval *tp);
792
extern void getmicrouptime(struct timeval *tp);
793
extern int  tvtohz(struct timeval *tv);
794
extern int  arc4random(void);
795
 
796
// Function mappings
797
 
798
extern int  cyg_ticks(void);
799
#define ticks cyg_ticks()
800
extern int  cyg_tsleep(void *, int, char *, int);
801
extern void cyg_wakeup(void *);
802
#define tsleep(e,p,w,t) cyg_tsleep(e,0,w,t)
803
#define wakeup(e)       cyg_wakeup(e)
804
#define wakeup_one(e)   cyg_wakeup(e)
805
 
806
#ifdef CYGIMPL_TRACE_SPLX   
807
extern cyg_uint32  cyg_splimp(const char *file, const int line);
808
extern cyg_uint32  cyg_splnet(const char *file, const int line);
809
extern cyg_uint32  cyg_splclock(const char *file, const int line);
810
extern cyg_uint32  cyg_splsoftnet(const char *file, const int line);
811
extern void        cyg_splx(cyg_uint32, const char *file, const int line);
812
#define splimp()   cyg_splimp(__FUNCTION__, __LINE__)
813
#define splnet()   cyg_splnet(__FUNCTION__, __LINE__)
814
#define splclock() cyg_splclock(__FUNCTION__, __LINE__)
815
#define splsoftnet() cyg_splsoftnet(__FUNCTION__, __LINE__)
816
#define splx(x)    cyg_splx(x, __FUNCTION__, __LINE__)
817
#define cyg_scheduler_lock() _cyg_scheduler_lock(__FUNCTION__, __LINE__)
818
#define cyg_scheduler_safe_lock() _cyg_scheduler_safe_lock(__FUNCTION__, __LINE__)
819
#define cyg_scheduler_unlock() _cyg_scheduler_unlock(__FUNCTION__, __LINE__)
820
#else
821
extern cyg_uint32  cyg_splimp(void);
822
extern cyg_uint32  cyg_splnet(void);
823
extern cyg_uint32  cyg_splclock(void);
824
extern cyg_uint32  cyg_splsoftnet(void);
825
extern cyg_uint32  cyg_splhigh(void);
826
extern void        cyg_splx(cyg_uint32);
827
#define splimp     cyg_splimp
828
#define splnet     cyg_splnet
829
#define splclock   cyg_splclock
830
#define splsoftnet cyg_splsoftnet
831
#define splhigh    cyg_splhigh
832
#define splx       cyg_splx
833
#endif
834
 
835
extern void cyg_panic(const char *msg, ...);
836
#define panic cyg_panic
837
 
838
/*
839
 * Constants related to network buffer management.
840
 * MCLBYTES must be no larger than CLBYTES (the software page size), and,
841
 * on machines that exchange pages of input or output buffers with mbuf
842
 * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
843
 * of the hardware page size.
844
 */
845
#define MSIZE           128             /* size of an mbuf */
846
#define MCLSHIFT        11              /* convert bytes to m_buf clusters */
847
#define MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */
848
#define MCLOFSET        (MCLBYTES - 1)  /* offset within a m_buf cluster */
849
#define CLBYTES         4096            /* size of actual cluster */
850
#define PAGE_SIZE       CLBYTES
851
 
852
/*
853
 * Round p (pointer or byte index) up to a correctly-aligned value
854
 * for all data types (int, long, ...).   The result is u_int and
855
 * must be cast to any desired pointer type.
856
 */
857
#define ALIGNBYTES      (sizeof(int) - 1)
858
#define ALIGN(p)        (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
859
 
860
// These symbols are used in the IPV6 stuff
861
// (be more defensive about external setup)
862
#undef __linux__   
863
#undef __bsdi__    
864
#undef __FreeBSD__ 
865
#undef __OpenBSD__ 
866
#undef __NetBSD__  
867
 
868
#define __FreeBSD__       4
869
#define __FreeBSD_version 440000
870
 
871
// TEMP
872
 
873
#include <cyg/infra/diag.h>
874
#include <cyg/hal/hal_intr.h>
875
#include <cyg/kernel/kapi.h>
876
#include <cyg/io/file.h>
877
 
878
struct net_stats {
879
    int              count;
880
    cyg_uint32       min_time, max_time, total_time;
881
};
882
 
883
#ifdef CYGDBG_NET_TIMING_STATS
884
#define START_STATS()                                   \
885
    cyg_uint32 start_time, end_time, elapsed_time;      \
886
    HAL_CLOCK_READ(&start_time);
887
#define FINISH_STATS(stats)                                                             \
888
    HAL_CLOCK_READ(&end_time);                                                          \
889
    if (end_time < start_time) {                                                        \
890
        elapsed_time = (end_time+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) - start_time;       \
891
    } else {                                                                            \
892
        elapsed_time = end_time - start_time;                                           \
893
    }                                                                                   \
894
    if (stats.min_time == 0) {                                                          \
895
        stats.min_time = 0x7FFFFFFF;                                                    \
896
    }                                                                                   \
897
    if (elapsed_time < stats.min_time)                                                  \
898
        stats.min_time = elapsed_time;                                                  \
899
    if (elapsed_time > stats.max_time)                                                  \
900
        stats.max_time = elapsed_time;                                                  \
901
    stats.total_time += elapsed_time;                                                   \
902
    stats.count++;
903
#else
904
#define START_STATS() 
905
#define FINISH_STATS(X)
906
#endif
907
 
908
// TEMP
909
 
910
// timeout support
911
typedef void (timeout_fun)(void *);
912
typedef struct callout {
913
    struct callout *next, *prev;
914
    cyg_int32     delta;  // Number of "ticks" in the future for this timeout
915
    timeout_fun  *fun;    // Function to execute when it expires
916
    void         *arg;    // Argument to pass when it does
917
    int           flags;  // Info about this item
918
} timeout_entry;
919
#define CALLOUT_LOCAL    0x0001
920
#define CALLOUT_ACTIVE   0x0002
921
#define CALLOUT_PENDING  0x0004
922
extern cyg_uint32 timeout(timeout_fun *fun, void *arg, cyg_int32 delta);
923
extern void untimeout(timeout_fun *fun, void *arg);
924
 
925
extern void callout_init(struct callout *);
926
extern void callout_reset(struct callout *, int, timeout_fun *, void *);
927
extern void callout_stop(struct callout *);
928
extern int  callout_active(struct callout *);
929
extern void callout_deactivate(struct callout *);
930
extern int  callout_pending(struct callout *);
931
 
932
extern int uiomove(caddr_t cp, int n, struct uio *uio);
933
extern int copyout(const void *s, void *d, size_t len);
934
extern int copyin(const void *s, void *d, size_t len);
935
extern void ovbcopy(const void *s, void *d, size_t len);
936
extern void get_mono_time(void);
937
extern int arc4random(void);
938
extern void get_random_bytes(void *buf, size_t len);
939
extern void read_random(void *buf, size_t len);
940
extern int read_random_unlimited(void *buf, size_t len);
941
extern void *hashinit(int elements, void *type, u_long *hashmask);
942
 
943
// Initialization support - cross between RedBoot & FreeBSD
944
typedef void _init_fun(void *);
945
typedef _init_fun *_init_fun_ptr;
946
struct init_tab_entry {
947
    _init_fun_ptr fun;
948
    void *data;
949
    char *name;
950
} CYG_HAL_TABLE_TYPE;
951
#define _cat(a,b) a##b
952
#define __Net_init(_p1_,_p2_,_f_,_d_)                                    \
953
struct init_tab_entry _cat(_net_init_tab,_p1_##_p2_##_f_) \
954
  CYG_HAL_TABLE_QUALIFIED_ENTRY(_Net_inits,_p1_##_p2_##_f_) = { (_init_fun_ptr) _f_, _d_, #_f_ }; 
955
#define _Net_init(_p1_,_p2_,_f_,_d_)                                    \
956
        __Net_init(_p1_,_p2_,_f_,_d_)
957
 
958
#define SI_ORDER_FIRST  000000
959
#define SI_ORDER_SECOND 000001
960
#define SI_ORDER_THIRD  000002
961
#define SI_ORDER_MIDDLE 080000
962
#define SI_ORDER_ANY    FFFFFF
963
 
964
#define SI_SUB_MBUF         0x50
965
#define SI_SUB_DEVICES      0x60
966
#define SI_SUB_PSEUDO       0x70
967
#define SI_SUB_PROTO_IF     0x84
968
#define SI_SUB_PROTO_DOMAIN 0x88
969
 
970
#define SYSINIT(label, group, order, fun, ident) \
971
  _Net_init(_cat(group,order), label, fun, ident)
972
#define PSEUDO_SET(fun, sys) \
973
  SYSINIT(sys, SI_SUB_PSEUDO, SI_ORDER_FIRST, fun, NULL)
974
 
975
// VM zone stuff
976
#define ZONE_INTERRUPT  1
977
 
978
typedef struct _elem {
979
    struct _elem *next;
980
} elem;
981
 
982
typedef struct vm_zone {
983
    char *name;
984
    int   elem_size, free, total;
985
    int   alloc_tries, alloc_fails, alloc_frees;
986
    elem *pool;
987
    struct vm_zone *next;
988
} *vm_zone_t;
989
vm_zone_t zinit(char *name, int size, int nentries, int flags, int zalloc);
990
void *    zalloci(vm_zone_t z);
991
void      zfreei(vm_zone_t z, void *item);
992
 
993
// Function mapping
994
#define printf     diag_printf
995
#define sprintf    diag_sprintf
996
#define snprintf   diag_snprintf
997
 
998
// Missing standard functions
999
static __inline int imax(int a, int b) { return (a > b ? a : b); }
1000
static __inline int imin(int a, int b) { return (a < b ? a : b); }
1001
static __inline long lmax(long a, long b) { return (a > b ? a : b); }
1002
static __inline long lmin(long a, long b) { return (a < b ? a : b); }
1003
static __inline u_int max(u_int a, u_int b) { return (a > b ? a : b); }
1004
static __inline u_int min(u_int a, u_int b) { return (a < b ? a : b); }
1005
static __inline quad_t qmax(quad_t a, quad_t b) { return (a > b ? a : b); }
1006
static __inline quad_t qmin(quad_t a, quad_t b) { return (a < b ? a : b); }
1007
static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); }
1008
static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
1009
 
1010
// Align a value to a natural multiple (4)
1011
#define _ALIGN(n) (((n)+3)&~3)  // Is this right?
1012
// Round a number 'n' up to a multiple of 'm'
1013
#define roundup(n,m) ((((n)+((m)-1))/(m))*(m))
1014
 
1015
#define NEW_STRUCT_ROUTE
1016
extern char *hostname;
1017
 
1018
// Logging facilities
1019
#ifdef CYGPKG_NET_FREEBSD_LOGGING
1020
extern int cyg_net_log_mask;
1021
#define LOG_ERR      0x0001
1022
#define LOG_WARNING  0x0002
1023
#define LOG_NOTICE   0x0004
1024
#define LOG_INFO     0x0008
1025
#define LOG_DEBUG    0x0010
1026
#define LOG_MDEBUG   0x0020
1027
#define LOG_IOCTL    0x0040
1028
#define LOG_ADDR     0x0100
1029
#define LOG_FAIL     0x0200
1030
#define LOG_INIT     0x0080
1031
#define LOG_EMERG    0x4000
1032
#define LOG_CRIT     0x8000
1033
#define log(lvl, args...) \
1034
do { if (cyg_net_log_mask & lvl) diag_printf(args); } while (0)
1035
#define log_dump(lvl, buf, len) \
1036
do { if (cyg_net_log_mask & lvl) diag_dump_buf(buf, len); } while (0)
1037
#define log_(lvl) \
1038
if (cyg_net_log_mask & lvl)
1039
#else
1040
#define log(lvl, args...) 
1041
#define log_dump(lvl, buf, len)
1042
#define log_(lvl) if (0)
1043
#endif
1044
 
1045
#endif // _KERNEL
1046
extern int cyg_arc4random(void);
1047
#endif //_SYS_PARAM_H_

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.