00001 /* 00002 * Copyright (c) 2006, Technical University of Munich 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the Institute nor the names of its contributors 00014 * may be used to endorse or promote products derived from this software 00015 * without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 00018 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 00021 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00023 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00024 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00027 * SUCH DAMAGE. 00028 * 00029 * This file is part of the Contiki operating system. 00030 * 00031 * @(#)$$ 00032 */ 00033 00034 /** 00035 * \file 00036 * Configuration for RZRAVEN USB stick "jackdaw" 00037 * 00038 * \author 00039 * Simon Barner <barner@in.tum.de> 00040 * David Kopf <dak664@embarqmail.com> 00041 */ 00042 00043 #ifndef __CONTIKI_CONF_H__ 00044 #define __CONTIKI_CONF_H__ 00045 00046 /* ************************************************************************** */ 00047 //#pragma mark Basic Configuration 00048 /* ************************************************************************** */ 00049 00050 /* MCU and clock rate */ 00051 #define PLATFORM PLATFORM_AVR 00052 #define RAVEN_REVISION RAVENUSB_C 00053 #ifndef F_CPU 00054 #define F_CPU 8000000UL 00055 #endif 00056 00057 #include <stdbool.h> 00058 #include <stdint.h> 00059 #include <string.h> 00060 00061 typedef int32_t s32_t; 00062 typedef unsigned char u8_t; 00063 typedef unsigned short u16_t; 00064 typedef unsigned long u32_t; 00065 typedef unsigned short clock_time_t; 00066 typedef unsigned short uip_stats_t; 00067 typedef unsigned long off_t; 00068 00069 void clock_delay(unsigned int us2); 00070 void clock_wait(int ms10); 00071 void clock_set_seconds(unsigned long s); 00072 unsigned long clock_seconds(void); 00073 00074 /* Maximum timer interval for 16 bit clock_time_t */ 00075 #define INFINITE_TIME 0xffff 00076 00077 /* Clock ticks per second */ 00078 #define CLOCK_CONF_SECOND 125 00079 00080 /* Maximum tick interval is 0xffff/125 = 524 seconds */ 00081 #define RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_CONF_SECOND * 524UL /* Default uses 600UL */ 00082 #define COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_CONF_SECOND * 524UL /* Default uses 600UL */ 00083 00084 /* Use EEPROM settings manager, or hard-coded EEPROM reads? */ 00085 /* Generate random MAC address on first startup? */ 00086 /* Random number from radio clock skew or ADC noise? */ 00087 #define JACKDAW_CONF_USE_SETTINGS 0 00088 #define JACKDAW_CONF_RANDOM_MAC 0 00089 #define RNG_CONF_USE_RADIO_CLOCK 1 00090 //#define RNG_CONF_USE_ADC 1 00091 00092 /* COM port to be used for SLIP connection. Not tested on Jackdaw. */ 00093 #define SLIP_PORT RS232_PORT_0 00094 00095 /* Pre-allocated memory for loadable modules heap space (in bytes)*/ 00096 /* Default is 4096. Currently used only when elfloader is present. Not tested on Jackdaw */ 00097 //#define MMEM_CONF_SIZE 256 00098 00099 /* Starting address for code received via the codeprop facility. Not tested on Jackdaw */ 00100 //#define EEPROMFS_ADDR_CODEPROP 0x8000 00101 00102 /* Simple stack monitor. Status is displayed from the USB menu with 'm' command */ 00103 #define CONFIG_STACK_MONITOR 1 00104 00105 /* ************************************************************************** */ 00106 //#pragma mark USB Ethernet Hooks 00107 /* ************************************************************************** */ 00108 00109 #ifndef USB_ETH_HOOK_IS_READY_FOR_INBOUND_PACKET 00110 #if RF230BB 00111 #define USB_ETH_HOOK_IS_READY_FOR_INBOUND_PACKET() rf230_is_ready_to_send() 00112 #else 00113 static inline uint8_t radio_is_ready_to_send_() { 00114 switch(radio_get_trx_state()) { 00115 case BUSY_TX: 00116 case BUSY_TX_ARET: 00117 return 0; 00118 } 00119 return 1; 00120 } 00121 #define USB_ETH_HOOK_IS_READY_FOR_INBOUND_PACKET() radio_is_ready_to_send_() 00122 #endif 00123 #endif 00124 00125 #ifndef USB_ETH_HOOK_HANDLE_INBOUND_PACKET 00126 #define USB_ETH_HOOK_HANDLE_INBOUND_PACKET(buffer,len) do { uip_len = len ; mac_ethernetToLowpan(buffer); } while(0) 00127 #endif 00128 00129 #ifndef USB_ETH_HOOK_SET_PROMISCIOUS_MODE 00130 #if RF230BB 00131 #define USB_ETH_HOOK_SET_PROMISCIOUS_MODE(value) rf230_set_promiscuous_mode(value) 00132 #else 00133 #define USB_ETH_HOOK_SET_PROMISCIOUS_MODE(value) radio_set_trx_state(value?RX_ON:RX_AACK_ON) 00134 #endif 00135 #endif 00136 00137 #ifndef USB_ETH_HOOK_INIT 00138 #define USB_ETH_HOOK_INIT() mac_ethernetSetup() 00139 #endif 00140 00141 /* ************************************************************************** */ 00142 //#pragma mark RF230BB Hooks 00143 /* ************************************************************************** */ 00144 00145 //#define RF230BB_HOOK_RADIO_OFF() Led1_off() 00146 //#define RF230BB_HOOK_RADIO_ON() Led1_on() 00147 #define RF230BB_HOOK_TX_PACKET(buffer,total_len) mac_log_802_15_4_tx(buffer,total_len) 00148 #define RF230BB_HOOK_RX_PACKET(buffer,total_len) mac_log_802_15_4_rx(buffer,total_len) 00149 #define RF230BB_HOOK_IS_SEND_ENABLED() mac_is_send_enabled() 00150 extern bool mac_is_send_enabled(void); 00151 extern void mac_log_802_15_4_tx(const uint8_t* buffer, size_t total_len); 00152 extern void mac_log_802_15_4_rx(const uint8_t* buffer, size_t total_len); 00153 00154 00155 /* ************************************************************************** */ 00156 //#pragma mark USB CDC-ACM (UART) Hooks 00157 /* ************************************************************************** */ 00158 00159 #define USB_CDC_ACM_HOOK_TX_END(char) vcptx_end_led() 00160 #define USB_CDC_ACM_HOOK_CLS_CHANGED(state) vcptx_end_led() 00161 #define USB_CDC_ACM_HOOK_CONFIGURED() vcptx_end_led() 00162 00163 /* ************************************************************************** */ 00164 //#pragma mark Serial Port Settings 00165 /* ************************************************************************** */ 00166 /* Set USB_CONF_MACINTOSH to prefer CDC-ECM+DEBUG enumeration for Mac/Linux 00167 * Leave undefined to prefer RNDIS+DEBUG enumeration for Windows/Linux 00168 * TODO:Serial port would enumerate in all cases and prevent falling through to 00169 * the supported network interface if USB_CONF_MACINTOSH is used with Windows 00170 * or vice versa. The Mac configuration is set up to still enumerate as RNDIS-ONLY 00171 * on Windows (without the serial port). 00172 * At present the Windows configuration will not enumerate on the Mac at all, 00173 * since it wants a custom descriptor for USB composite devices. 00174 */ 00175 #define USB_CONF_MACINTOSH 0 00176 00177 /* Set USB_CONF_SERIAL to enable the USB serial port that allows control of the 00178 * run-time configuration (COMx on Windows, ttyACMx on Linux, tty.usbmodemx on Mac) 00179 * Debug printfs will go to this port unless USB_CONF_RS232 is set. 00180 */ 00181 #define USB_CONF_SERIAL 1 00182 00183 /* RS232 debugs have less effect on network timing and are less likely 00184 * to be dropped due to buffer overflow. Only tx is implemented at present. 00185 * The tx pad is the middle one behind the jackdaw leds. 00186 * RS232 output will work with or without enabling the USB serial port 00187 */ 00188 #define USB_CONF_RS232 1 00189 00190 /* Disable mass storage enumeration for more program space */ 00191 //#define USB_CONF_STORAGE 1 /* TODO: Mass storage is currently broken */ 00192 00193 /* ************************************************************************** */ 00194 //#pragma mark UIP Settings 00195 /* ************************************************************************** */ 00196 /* Network setup. The new NETSTACK interface requires RF230BB (as does ip4) */ 00197 /* These mostly have no effect when the Jackdaw is a repeater (CONTIKI_NO_NET=1 using fakeuip.c) */ 00198 00199 #if RF230BB 00200 #else 00201 #define PACKETBUF_CONF_HDR_SIZE 0 //RF230 combined driver/mac handles headers internally 00202 #endif /*RF230BB */ 00203 00204 #if UIP_CONF_IPV6 00205 #define RIMEADDR_CONF_SIZE 8 00206 #define UIP_CONF_ICMP6 1 00207 #define UIP_CONF_UDP 1 00208 #define UIP_CONF_TCP 0 00209 #define UIP_CONF_IPV6_RPL 0 00210 #define NETSTACK_CONF_NETWORK sicslowpan_driver 00211 #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06 00212 #else 00213 /* ip4 should build but is thoroughly untested */ 00214 #define RIMEADDR_CONF_SIZE 2 00215 #define NETSTACK_CONF_NETWORK rime_driver 00216 #endif /* UIP_CONF_IPV6 */ 00217 00218 /* See uip-ds6.h */ 00219 #define UIP_CONF_DS6_NBR_NBU 2 00220 #define UIP_CONF_DS6_DEFRT_NBU 2 00221 #define UIP_CONF_DS6_PREFIX_NBU 3 00222 #define UIP_CONF_DS6_ROUTE_NBU 2 00223 #define UIP_CONF_DS6_ADDR_NBU 3 00224 #define UIP_CONF_DS6_MADDR_NBU 0 00225 #define UIP_CONF_DS6_AADDR_NBU 0 00226 00227 #define UIP_CONF_LL_802154 1 00228 #define UIP_CONF_LLH_LEN 14 00229 #define UIP_CONF_BUFSIZE UIP_LINK_MTU + UIP_LLH_LEN + 4 /* +4 for vlan on macosx */ 00230 00231 /* 10 bytes per stateful address context - see sicslowpan.c */ 00232 /* Default is 1 context with prefix aaaa::/64 */ 00233 /* These must agree with all the other nodes or there will be a failure to communicate! */ 00234 #//define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 00235 #define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=0xaa;addr_contexts[0].prefix[1]=0xaa;} 00236 #define SICSLOWPAN_CONF_ADDR_CONTEXT_1 {addr_contexts[1].prefix[0]=0xbb;addr_contexts[1].prefix[1]=0xbb;} 00237 #define SICSLOWPAN_CONF_ADDR_CONTEXT_2 {addr_contexts[2].prefix[0]=0x20;addr_contexts[2].prefix[1]=0x01;addr_contexts[2].prefix[2]=0x49;addr_contexts[2].prefix[3]=0x78,addr_contexts[2].prefix[4]=0x1d;addr_contexts[2].prefix[5]=0xb1;} 00238 00239 /* 211 bytes per queue buffer */ 00240 #define QUEUEBUF_CONF_NUM 8 00241 00242 /* 54 bytes per queue ref buffer */ 00243 #define QUEUEBUF_CONF_REF_NUM 2 00244 00245 #define UIP_CONF_MAX_CONNECTIONS 1 00246 #define UIP_CONF_MAX_LISTENPORTS 1 00247 00248 #define UIP_CONF_IP_FORWARD 0 00249 #define UIP_CONF_FWCACHE_SIZE 0 00250 00251 #define UIP_CONF_IPV6_CHECKS 1 00252 #define UIP_CONF_IPV6_QUEUE_PKT 1 00253 #define UIP_CONF_IPV6_REASSEMBLY 0 00254 00255 #define UIP_CONF_UDP_CHECKSUMS 1 00256 #define UIP_CONF_TCP_SPLIT 0 00257 #define UIP_CONF_STATISTICS 1 00258 00259 /* Network setup */ 00260 #if 1 /* No radio cycling */ 00261 #define NETSTACK_CONF_MAC nullmac_driver 00262 #define NETSTACK_CONF_RDC sicslowmac_driver 00263 #define NETSTACK_CONF_FRAMER framer_802154 00264 #define NETSTACK_CONF_RADIO rf230_driver 00265 #define CHANNEL_802_15_4 26 00266 /* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */ 00267 #define RF230_CONF_AUTOACK 1 00268 /* Request 802.15.4 ACK on all packets sent by sicslowpan.c (else autoretry) */ 00269 /* Broadcasts will be duplicated by the retry count, since no one will ACK them! */ 00270 #define SICSLOWPAN_CONF_ACK_ALL 0 00271 /* Number of auto retry attempts 0-15 (0 implies don't use extended TX_ARET_ON mode with CCA) */ 00272 #define RF230_CONF_AUTORETRIES 1 00273 /* CCA theshold energy -91 to -61 dBm (default -77). Set this smaller than the expected minimum rssi to avoid packet collisions */ 00274 /* The Jackdaw menu 'm' command is helpful for determining the smallest ever received rssi */ 00275 #define RF230_CONF_CCA_THRES -85 00276 /* Allow sneeze command from jackdaw menu. Useful for testing CCA on other radios */ 00277 /* During sneezing, any access to an RF230 register will hang the MCU and cause a watchdog reset */ 00278 /* The host interface, jackdaw menu and rf230_send routines are temporarily disabled to prevent this */ 00279 /* But some calls from an internal uip stack might get through, e.g. from CCA or low power protocols, */ 00280 /* as temporarily disabling all the possible accesses would add considerable complication to the radio driver! */ 00281 #define RF230_CONF_SNEEZER 1 00282 /* Allow 6loWPAN fragmentation (more efficient for large payloads over a reliable channel) */ 00283 #define SICSLOWPAN_CONF_FRAG 1 00284 /* Timeout for fragment reassembly. A reissued browser GET will also cancel reassembly, typically in 2-3 seconds */ 00285 #define SICSLOWPAN_CONF_MAXAGE 3 00286 /* Allow sneeze command from jackdaw menu */ 00287 #define RF230_CONF_SNEEZE 1 00288 00289 #elif 0 /* Contiki-mac radio cycling */ 00290 #define NETSTACK_CONF_MAC nullmac_driver 00291 #define NETSTACK_CONF_RDC contikimac_driver 00292 #define NETSTACK_CONF_FRAMER framer_802154 00293 #define NETSTACK_CONF_RADIO rf230_driver 00294 #define CHANNEL_802_15_4 26 00295 #define RF230_CONF_AUTOACK 0 00296 #define RF230_CONF_AUTORETRIES 0 00297 #define SICSLOWPAN_CONF_FRAG 1 00298 #define SICSLOWPAN_CONF_MAXAGE 3 00299 00300 #elif 1 /* cx-mac radio cycling */ 00301 #define NETSTACK_CONF_MAC nullmac_driver 00302 //#define NETSTACK_CONF_MAC csma_driver 00303 #define NETSTACK_CONF_RDC cxmac_driver 00304 #define NETSTACK_CONF_FRAMER framer_802154 00305 #define NETSTACK_CONF_RADIO rf230_driver 00306 #define CHANNEL_802_15_4 26 00307 #define RF230_CONF_AUTOACK 1 00308 #define RF230_CONF_AUTORETRIES 1 00309 #define SICSLOWPAN_CONF_FRAG 1 00310 #define SICSLOWPAN_CONF_MAXAGE 3 00311 #define CXMAC_CONF_ANNOUNCEMENTS 0 00312 #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 00313 #undef QUEUEBUF_CONF_NUM 00314 #define QUEUEBUF_CONF_NUM 8 00315 #undef UIP_CONF_DS6_NBR_NBU 00316 #define UIP_CONF_DS6_NBR_NBU 5 00317 #undef UIP_CONF_DS6_ROUTE_NBU 00318 #define UIP_CONF_DS6_ROUTE_NBU 5 00319 00320 #else 00321 #error Network configuration not specified! 00322 #endif /* Network setup */ 00323 00324 00325 /* ************************************************************************** */ 00326 //#pragma mark RPL Settings 00327 /* ************************************************************************** */ 00328 00329 #if UIP_CONF_IPV6_RPL 00330 00331 /* Not completely working yet. Works on Ubuntu after $ifconfig usb0 -arp to drop the neighbor solitications */ 00332 /* Dropping the NS on other OSs is more complicated, see http://www.sics.se/~adam/wiki/index.php/Jackdaw_RNDIS_RPL_border_router */ 00333 00334 /* RPL requires the uip stack. Change #CONTIKI_NO_NET=1 to UIP_CONF_IPV6=1 in the examples makefile, 00335 or include the needed source files in /plaftorm/avr-ravenusb/Makefile.avr-ravenusb */ 00336 /* For the present the buffer_length calcs in rpl-icmp6.c will need adjustment by the length difference 00337 between 6lowpan (0) and ethernet (14) link-layer headers: 00338 // buffer_length = uip_len - uip_l2_l3_icmp_hdr_len; 00339 buffer_length = uip_len - uip_l2_l3_icmp_hdr_len + UIP_LLH_LEN; //Add jackdaw ethernet header 00340 */ 00341 00342 /* Define MAX_*X_POWER to reduce tx power and ignore weak rx packets for testing a miniature multihop network. 00343 * Leave undefined for full power and sensitivity. 00344 * tx=0 (3dbm, default) to 15 (-17.2dbm) 00345 * RF230_CONF_AUTOACK sets the extended mode using the energy-detect register with rx=0 (-91dBm) to 84 (-7dBm) 00346 * else the rssi register is used having range 0 (91dBm) to 28 (-10dBm) 00347 * For simplicity RF230_MIN_RX_POWER is based on the energy-detect value and divided by 3 when autoack is not set. 00348 * On the RF230 a reduced rx power threshold will not prevent autoack if enabled and requested. 00349 * These numbers applied to both Raven and Jackdaw give a maximum communication distance of about 15 cm 00350 * and a 10 meter range to a full-sensitivity RF230 sniffer. 00351 #define RF230_MAX_TX_POWER 15 00352 #define RF230_MIN_RX_POWER 30 00353 */ 00354 00355 #define UIP_CONF_ROUTER 1 00356 #define RPL_BORDER_ROUTER 1 00357 #define RPL_CONF_STATS 0 00358 #define UIP_CONF_BUFFER_SIZE 1300 00359 //#define UIP_CONF_DS6_NBR_NBU 12 00360 //#define UIP_CONF_DS6_ROUTE_NBU 12 00361 #undef UIP_FALLBACK_INTERFACE 00362 #define UIP_FALLBACK_INTERFACE rpl_interface 00363 #define UIP_CONF_ND6_SEND_RA 0 00364 #define UIP_CONF_ND6_REACHABLE_TIME 600000 00365 #define UIP_CONF_ND6_RETRANS_TIMER 10000 00366 00367 /* Save all the RAM we can */ 00368 #define PROCESS_CONF_NO_PROCESS_NAMES 1 00369 #undef QUEUEBUF_CONF_NUM 00370 #define QUEUEBUF_CONF_NUM 2 00371 #undef QUEUEBUF_CONF_REF_NUM 00372 #define QUEUEBUF_CONF_REF_NUM 1 00373 #undef UIP_CONF_TCP_SPLIT 00374 #define UIP_CONF_TCP_SPLIT 0 00375 #undef UIP_CONF_STATISTICS 00376 #define UIP_CONF_STATISTICS 0 00377 #undef UIP_CONF_IPV6_QUEUE_PKT 00378 #define UIP_CONF_IPV6_QUEUE_PKT 0 00379 #define UIP_CONF_PINGADDRCONF 0 00380 #define UIP_CONF_LOGGING 0 00381 #undef UIP_CONF_MAX_CONNECTIONS 00382 #define UIP_CONF_MAX_CONNECTIONS 2 00383 #undef UIP_CONF_MAX_LISTENPORTS 00384 #define UIP_CONF_MAX_LISTENPORTS 2 00385 #define UIP_CONF_UDP_CONNS 6 00386 00387 /* Optional, TCP needed to serve the RPL neighbor web page currently hard coded at bbbb::11 */ 00388 /* The RPL neighbors can also be viewed using the jack menu */ 00389 /* A small MSS is adequate for the internal jackdaw webserver and RAM is very limited*/ 00390 #define RPL_HTTPD_SERVER 0 00391 #if RPL_HTTPD_SERVER 00392 #undef UIP_CONF_TCP 00393 #define UIP_CONF_TCP 1 00394 #define UIP_CONF_TCP_MSS 48 00395 #define UIP_CONF_RECEIVE_WINDOW 48 00396 #undef UIP_CONF_DS6_NBR_NBU 00397 #define UIP_CONF_DS6_NBR_NBU 5 00398 #undef UIP_CONF_DS6_ROUTE_NBU 00399 #define UIP_CONF_DS6_ROUTE_NBU 5 00400 #undef UIP_CONF_MAX_CONNECTIONS 00401 #define UIP_CONF_MAX_CONNECTIONS 2 00402 #endif 00403 00404 #define UIP_CONF_ICMP_DEST_UNREACH 1 00405 #define UIP_CONF_DHCP_LIGHT 00406 #undef UIP_CONF_FWCACHE_SIZE 00407 #define UIP_CONF_FWCACHE_SIZE 30 00408 #define UIP_CONF_BROADCAST 1 00409 //#define UIP_ARCH_IPCHKSUM 1 00410 00411 /* Experimental option to pick up a prefix from host interface router advertisements */ 00412 /* Requires changes in uip6 and uip-nd6.c to pass link-local RA broadcasts */ 00413 /* If this is zero the prefix will be manually set in contiki-raven-main.c */ 00414 #define UIP_CONF_ROUTER_RECEIVE_RA 0 00415 00416 #endif /* UIP_CONF_IPV6_RPL */ 00417 00418 /* ************************************************************************** */ 00419 //#pragma mark Other Settings 00420 /* ************************************************************************** */ 00421 00422 /* Use Atmel 'Route Under MAC', currently just in RF230 sniffer mode! */ 00423 /* Route-Under-MAC uses 16-bit short addresses */ 00424 //#define UIP_CONF_USE_RUM 1 00425 #if UIP_CONF_USE_RUM 00426 #undef UIP_CONF_LL_802154 00427 #define UIP_DATA_RUM_OFFSET 5 00428 #endif /* UIP_CONF_USE_RUM */ 00429 00430 #define CCIF 00431 #define CLIF 00432 00433 #endif /* __CONTIKI_CONF_H__ */