📄 olsr_types.h
字号:
/* * The olsr.org Optimized Link-State Routing daemon(olsrd) * Copyright (c) 2004, Andreas T鴑nesen(andreto@olsr.org) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of olsr.org, olsrd nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * Visit http://www.olsr.org for more information. * * If you find this software useful feel free to make a donation * to the project. For more information see the website or contact * the copyright holders. * * $Id: olsr_types.h,v 1.9 2007/09/05 16:11:11 bernd67 Exp $ *//* *Values and packet formats as proposed in RFC3626 and misc. values and *data structures used by the olsr.org OLSR daemon. */#ifndef _OLSR_TYPES_H#define _OLSR_TYPES_H/* types */#include <sys/types.h>typedef enum { OLSR_FALSE = 0, OLSR_TRUE} olsr_bool;#if defined linux || defined __MacOSX__typedef u_int8_t olsr_u8_t;typedef u_int16_t olsr_u16_t;typedef u_int32_t olsr_u32_t;typedef int8_t olsr_8_t;typedef int16_t olsr_16_t;typedef int32_t olsr_32_t;#elif defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__typedef uint8_t olsr_u8_t;typedef uint16_t olsr_u16_t;typedef uint32_t olsr_u32_t;typedef int8_t olsr_8_t;typedef int16_t olsr_16_t;typedef int32_t olsr_32_t;#elif defined WIN32typedef unsigned char olsr_u8_t;typedef unsigned short olsr_u16_t;typedef unsigned int olsr_u32_t;typedef char olsr_8_t;typedef short olsr_16_t;typedef int olsr_32_t;#else# error "Unsupported system"#endif/* IPv6 address format in6_addr */#include <netinet/in.h>union olsr_ip_addr{ /* struct in_addr v4; */ olsr_u32_t v4; struct in6_addr v6;};struct olsr_ip_prefix{ union olsr_ip_addr prefix; olsr_u8_t prefix_len;};union hna_netmask{ olsr_u32_t v4; olsr_u16_t v6;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -