Annotation of embedaddon/mtr/mtr.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:     mtr  --  a network diagnostic tool
                      3:     Copyright (C) 1997,1998  Matt Kimball
                      4:     Copyright (C) 2005 R.E.Wolff@BitWizard.nl
                      5: 
                      6:     This program is free software; you can redistribute it and/or modify
                      7:     it under the terms of the GNU General Public License version 2 as 
                      8:     published by the Free Software Foundation.
                      9: 
                     10:     This program is distributed in the hope that it will be useful,
                     11:     but WITHOUT ANY WARRANTY; without even the implied warranty of
                     12:     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     13:     GNU General Public License for more details.
                     14: 
                     15:     You should have received a copy of the GNU General Public License
                     16:     along with this program; if not, write to the Free Software
                     17:     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     18: */
                     19: 
                     20: /* Typedefs */
                     21: 
                     22: /*  Find the proper type for 8 bits  */
                     23: #if SIZEOF_UNSIGNED_CHAR == 1
                     24: typedef unsigned char uint8;
                     25: #else
                     26: #error No 8 bit type
                     27: #endif
                     28: 
                     29: /*  Find the proper type for 16 bits  */
                     30: #if SIZEOF_UNSIGNED_SHORT == 2
                     31: typedef unsigned short uint16;
                     32: #elif SIZEOF_UNSIGNED_INT == 2
                     33: typedef unsigned int uint16;
                     34: #elif SIZEOF_UNSIGNED_LONG == 2
                     35: typedef unsigned long uint16;
                     36: #else
                     37: #error No 16 bit type
                     38: #endif
                     39: 
                     40: /*  Find the proper type for 32 bits  */
                     41: #if SIZEOF_UNSIGNED_SHORT == 4
                     42: typedef unsigned short uint32;
                     43: #elif SIZEOF_UNSIGNED_INT == 4
                     44: typedef unsigned int uint32;
                     45: #elif SIZEOF_UNSIGNED_LONG == 4
                     46: typedef unsigned long uint32;
                     47: #else
                     48: #error No 32 bit type
                     49: #endif
                     50: 
                     51: typedef unsigned char byte;
                     52: typedef unsigned short word;
                     53: typedef unsigned long dword;
                     54: 
                     55: #ifdef ENABLE_IPV6
                     56: typedef struct in6_addr ip_t;
                     57: #else
                     58: typedef struct in_addr ip_t;
                     59: #endif
                     60: 
                     61: extern int enablempls;
                     62: extern int dns;
                     63: extern int show_ips;
                     64: extern int use_dns;
                     65: 
                     66: #ifdef __GNUC__
                     67: #define UNUSED __attribute__((__unused__))
                     68: #else
                     69: #define UNUSED
                     70: #endif
                     71: 
                     72: #ifndef HAVE_SOCKLEN_T
                     73: typedef int socklen_t; 
                     74: #endif
                     75: 
                     76: char *
                     77: trim(char * s);

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>