📄 rsvp_types.h
字号:
/* * If your machine is not running 4.4BSD, look below under * CHECK HERE FOR MACHINE TYPE SIZES * and make sure that the correct values are defined for your machine. * * $Id: rsvp_types.h,v 1.1.1.1 2000/05/08 22:51:24 wenqing Exp $ *//* * Copyright 1994, 1995 Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby * granted, provided that both the above copyright notice and this * permission notice appear in all copies, that both the above * copyright notice and this permission notice appear in all * supporting documentation, and that the name of M.I.T. not be used * in advertising or publicity pertaining to distribution of the * software without specific, written prior permission. M.I.T. makes * no representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT * SHALL M.I.T. 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. */#ifndef _RSVP_TYPES_H_#define _RSVP_TYPES_H_ 1/* * This header file exists solely to emulate the 4.4 BSD case on machines * which aren't running 4.4 or a 4.4-derived system. The header files * bsdcdefs.h and bsdendian.h are also a part of this mechanism. */#include <sys/param.h>#include <sys/types.h>#ifndef __P#if defined(__STDC__) || defined(__cplusplus)#define __P(protos) protos /* full-blown ANSI C */#else /* !(__STDC__ || __cplusplus) */#define __P(protos) () /* traditional C preprocessor */#endif /* !(__STDC__ || __cplusplus) */#endif /* __P */#ifdef suntypedef char int8_t;typedef short int16_t;typedef int int32_t;typedef unsigned char u_int8_t;typedef unsigned short u_int16_t;typedef unsigned int u_int32_t;#endif /* sun */#define ntoh16(x) ((u_int16_t)ntohs((u_int16_t)(x)))#define NTOH16(x) ((x) = ntoh16(x))#define ntoh32(x) ((u_int32_t)ntohl((u_int32_t)(x)))#define NTOH32(x) ((x) = ntoh32(x))#define hton16(x) ((u_int16_t)htons((u_int16_t)(x)))#define HTON16(x) ((x) = hton16(x))#define hton32(x) ((u_int32_t)htonl((u_int32_t)(x)))#define HTON32(x) ((x) = hton32(x))#define ntohf32(x) ntoh32(*((u_int32_t *) &(x)))#define NTOHF32(x) (*((u_int32_t *) &(x)) = ntohf32(x))#define htonf32(x) hton32(*((u_int32_t *) &(x)))#define HTONF32(x) (*((u_int32_t *) &(x)) = htonf32(x))#include <stdlib.h>#ifndef RAND_MAX#include <limits.h>#define RAND_MAX INT_MAX#endif /* RAND_MAX */#endif /* _RSVP_TYPES_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -