pax_global_header00006660000000000000000000000064132373111140014506gustar00rootroot0000000000000052 comment=81592a8a44ce986dd2a68e92782e0ab9f856e3e4 netdiag-1.2/000077500000000000000000000000001323731111400127635ustar00rootroot00000000000000netdiag-1.2/netload-1.2.2/000077500000000000000000000000001323731111400150475ustar00rootroot00000000000000netdiag-1.2/netload-1.2.2/Changelog000066400000000000000000000020711323731111400166610ustar00rootroot00000000000000v 1.2.2 July 11 2007 * Add NULL terminator ( Michael Meskes ) * Change output from REC to RECV ( Michael Meskes ) * Got rid of debugging information when raising "device not found" * Added man page v 1.2.1 July 2007 * Make it compatible with kernel 2.6 * Minor display changes v 1.0.1 Jan 2001 Many... * Accept any number of interfaces * Replacement of "defaults.h" to a rc file ($HOME/.netloadrc) is a much more powerful way to setup or customize your settings. No need to recompile the code for change of settings. * Better screen refresh * Larger meter : from 48 to 60 chars * Changed from Packets to Bytes in the monitor * Size of variable holders related to load changed to 8 Bytes * Introduced Alarms for High load - sound - email v 0.92 - December 1996 fixed minor terminal resetting bug when device of file returned err. v 0.91 - November 1996 fixed memory allocation bug reduced the screen flickering show the number of seconds interval reset terminal emulation on SIGINT netdiag-1.2/netload-1.2.2/INSTALL000066400000000000000000000006361323731111400161050ustar00rootroot00000000000000Read the README file for more information. The installation is pretty simple - Type "make" to build the binary. - Type "make install" to install the binary (default /usr/local/bin) and man page If you decide to get rid of it, type "make clean" and it will remove the binary system-wide. Requirements: ------------- * ncurses libraries * sendmail ( under /usr/lib/sendmail ) That's it, enjoy. Luis Falcon netdiag-1.2/netload-1.2.2/LICENSE000066400000000000000000000430761323731111400160660ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. netdiag-1.2/netload-1.2.2/Makefile000066400000000000000000000004251323731111400165100ustar00rootroot00000000000000CC= gcc CLIBS= -lncurses TARGET= "/usr/local/bin/" MANTARGET= "/usr/share/man/man1" all : $(CC) netload.c -o netload $(CLIBS) install: install -m 755 netload $(TARGET) install -m 755 checkint $(TARGET) install -m 644 netload.1 $(MANTARGET) clean: rm -f ./netload netdiag-1.2/netload-1.2.2/README000066400000000000000000000110721323731111400157300ustar00rootroot00000000000000(C) 1996 - 2007 Luis Falcon (lfalcon@thymbra.com) ( GPL. Please read LICENSE for more information ). ***************************************************************************** "netload" displays and monitor the network load for different devices. It uses ncurses to display the information, and a "meter" to show the network load. It shows the absolute load, relative load, and other statistics, as well as the maximum load on the system so far. It can send email messages to administrators in case of unusual load in the interface. You can run multiple sessions in different terminal to check simultaneously several interfaces. Compiling / Installing ----------------------- Please read the INSTALL file Running Netload ---------------- Netload file $HOME/.netloadrc allows you to add any number of network interfaces, modify the alarm settings and your email preferences. Invoking netload: netload device [-t secs] where the device is the name of your NIC, ppp, irda,etc.. as shown in ifconfig. You can find what interfaces are active by running the script "checkint". The first time that netload is run it generates $HOME/.netloadrc, which should be changed to fit your preferences. This is a sample : ----------------------- ## Configuration file for netload ## (c) 1996-2007 Luis Falcon lfalcon@thymbra.com ## Activate (1) or deactivate (0) the high-load alarm alarm:1 ## Notify (1) or disable (0) high-load sound notification sound:0 ## Notify (1) or disable (0) high-load email/SMS notification email:1 ## Period ( in minutes ) high-load email notification period:30 ## Insert and/or your interfaces here, followed by colon and the scale factor. ## one mark is equivalent to x Bytes/sec. There are 60 marks in the meter ppp0:170 lo:30000 eth0:30000 ## Email notification stuff...don't get rid or modify "From,To and Subject" headers, or sendmail won't work properly From: admin@foo.bar To: hi@laspalmas.buenosaires.net Subject: High load in your Network It seems that there is a high load in one of your interfaces. In the next lines there's a more detailed description of the event. ------------------------------------------ Don't tell your life in this message :) The actual valuable information will be appended to it automatically. ** The maximum .netloadrc file is 9KB... ** **Alarm parameter: If the alarm parameter is set to 0, no alarm ( sound or email ) will run. * sound parameter If set to 1, depending on the terminal emulation, it will beep or flash ( is beep is not supported, as in the case of some x terminals ). * email parameter: If set to 1, it will sent an email with the data fed beginning at the header "From" until the end of the file Notes on parameter "period". ----------------------------- The "period" parameter specifies the duration between sending emails when the load is high. I have placed this param as a precautionary measure against flooding your recipient's email. It's safe not to make it smaller that 15 minutes.... ---------- Bailing out : Just press control+c . ABOUT THE SCALE FACTOR OF THE DEVICES ------------------------------------- "High load" it a pretty subjective concept. It depends on the speed itself of the interface, the "average" load of the network, etc... To make this concept useful, .netloadrc allows you to create and modify the scale factor of your devices to fit your preferences. The scale factor is calculated in the following way. For each device, think what could be "a very high load": That "very high load" represents the end of the meter. The meter has 60 marks Example : doing a ping -f to a host using eth0, it gave me an average of 2 Mbytes per second. To calculate the scale factor ( that is, a single mark on the meter ) I divided 2 Mbytes / 60 marks and got approximately 30 Kbytes per mark. In the case of the interface ppp, I had in mind a regular 56Kbps modem and a Internet connection. I hardly got more than 6-7Kbytes per second, so I decided to make an upper limit of 10KB. Applying the formula, it gives me a scale of 170Bytes per mark. Again, these are very generic settings that most users will have to change them to make netload useful. The lever is divided into low, medium and high load : Low (white) : marks <= 20 Medium ( green ): 20 < marks <= 40 High ( red ) : marks > 40 ------------------------ Last but not least.... expect bugs :) .... this - like every - program needs to be tested among many people. Your suggestions and fixes are the best way of making open source better. OK, that's about it. Hope you find it useful ! Please send comments, suggestions and bugs to lfalcon@thymbra.com Luis. netdiag-1.2/netload-1.2.2/VERSION000066400000000000000000000000061323731111400161130ustar00rootroot000000000000001.2.2 netdiag-1.2/netload-1.2.2/checkint000077500000000000000000000001561323731111400165670ustar00rootroot00000000000000#!/bin/bash echo "Active interfaces" echo "-----------------" /sbin/ifconfig | egrep "^[a-z]" | cut -d' ' -f1 netdiag-1.2/netload-1.2.2/netload.1000066400000000000000000000024261323731111400165630ustar00rootroot00000000000000.TH netload 1 "November 1996" "USER COMMANDS" .SH NAME netload \- Network device load monitor .SH SYNOPSIS .B netload device [\-t ] .SH DESCRIPTION netload displays the load on an interface without using the interface. netload simply accesses kernel statistics. netload uses ncurses to display the information, and the use of a gauge to show the network load. It shows the absolute load, relative load, and other statistics, as well as the maximum load on the system so far. .PP Interface is the name of your NIC, ppp, etc.. as shown in ifconfig. Typical names are "ppp0" "eth0" or "lo" (the latter is for localhost). .B CONFIGURATION Netload file $HOME/.netloadrc allows you to add any number of network interfaces, modify the alarm settings and your email preferences. The first time that netload is run it generates .B $HOME/.netloadrc , which should be changed to fit your preferences. .SH OPTIONS .TP .B \-t refresh-interval The -t flag reprensents the refresh rate of the application. The default is 1 second .SH EXAMPLES .B netload eth0 .SH FILES ~/.netloadrc Per user configuration file .SH LICENSE You may redistribute copies of it under the terms of the GNU General Public License .SH AUTHOR Luis Falcon (lfalcon@thymbra.com) netdiag-1.2/netload-1.2.2/netload.c000066400000000000000000000305431323731111400166460ustar00rootroot00000000000000/* Copyright (C) 1996-2007 Luis Falcon (lfalcon@thymbra.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #define CMD_LINE fprintf (stderr,"usage : netload device [-t secs] \n\tnetload -setup\n") #define MAILER "/usr/lib/sendmail -t " #define PROC_DEV_SIZE 10000 WINDOW *panel; WINDOW *lever; WINDOW *credit; WINDOW *INFO; int INIT = 0; long long int old_rec=0; long long int old_trans=0; long long temp_load=0; long long max_sofar=0; int alarm=0; /* High-load alarm */ int salarm=0; /* sound alarm */ int ealarm=0; /* email notification */ int aperiod; /* period for re-activating the email alarm */ int aflag=1; int countdown; char *netrc; char *current_time; int check_netloadrc (); int mail_notify (int, long long int, long long int, long long int, long long int, long long int, char *device); int check_arguments (int c, char *v[]); int setup_netload (); void show_load (char *line, int scale,int dormant); void reset (int); char *update_watch (); /* Function main () ******************************************************************************************************************************/ main (int argc, char *argv[]) { FILE *source; char *line; char content [PROC_DEV_SIZE]; double filesize; int dormant; int scale; int argument_length; char mask [6]; initscr (); nonl(); intrflush(stdscr, FALSE); keypad(stdscr, TRUE); noecho (); start_color (); check_arguments (argc, argv); scale = check_netloadrc (argv[1]); /* check status of .netloadrc, plus getting the alarm and scale factor settings of the device */ signal (SIGINT,reset); if (argc > 2) dormant = atoi (argv [3]); else dormant = 1; if (strncmp (argv[1],"-setup",6) == 0) setup_netload (); line = malloc (100*sizeof (char)); init_pair (COLOR_CYAN,COLOR_CYAN, COLOR_BLACK); init_pair (COLOR_RED, COLOR_RED, COLOR_BLACK ); init_pair (COLOR_GREEN, COLOR_GREEN, COLOR_BLACK); init_pair (COLOR_BLUE, COLOR_BLUE,COLOR_BLACK); strcpy (mask,argv[1]); argument_length = strlen (argv[1]); mask [argument_length]=':'; panel = newwin (15,60,7,10); lever = newwin (1,60,18,10); credit = newwin (1,60,23,10); INFO = newwin (5,60,1,10); while (1) { if ((source=fopen ("/proc/net/dev","r")) == NULL) { fprintf (stderr, "Couldn't open source file\n"); endwin (); } fread (content,1,PROC_DEV_SIZE,source); content[PROC_DEV_SIZE-1] = 0; /* Add null terminator */ if ((line = strstr (content,mask)) == NULL) { fprintf (stderr,"Device \"%s\" not found\n",argv[1]); endwin (); exit (1); } show_load (line,scale,dormant); lseek (source,0,SEEK_SET); fclose (source); sleep (dormant); } } /* Function show_load () *****************************************************************************************************************/ void show_load (char *line,int scale,int dormant) { char device [5]; long long int rbytes, rec_load, trans_load, total_load, sbytes=0; long long int rcompressed, colls, compressed, multicast,packets,rpackets; long long int errors,drop,fifo,frame; long long int rerrors,rdrop,rfifo,rframe,carrier; int marks; int load_level; sscanf (line,"%[^:]: %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld %Ld\n",&device,&rbytes,&rpackets,&rerrors,&rdrop,&rfifo,&rframe,&rcompressed,&multicast, &sbytes, &packets,&errors,&drop,&fifo,&colls,&carrier,&compressed); wmove (INFO,1,1); wprintw (INFO,"\tBYTES"); wmove (INFO,1,25); wprintw (INFO,"ERRORS\t DROP\tFIFO"); wmove (INFO,3,1); wprintw (INFO,"RECV\t%Ld",rbytes); wmove (INFO,3,27); wprintw (INFO,"%Ld\t %Ld\t %Ld",rerrors,rdrop,rfifo); wmove (INFO,4,1); wprintw (INFO,"TRANS\t%Ld",sbytes); wmove (INFO,4,27); wprintw (INFO,"%Ld\t %Ld\t %Ld",errors,drop,fifo); rec_load = rbytes - old_rec; old_rec = rbytes; trans_load = sbytes - old_trans; old_trans = sbytes; total_load = (rec_load + trans_load)/dormant; /* Average in Bytes/sec in the last x seconds */ /* wattrset (credit,COLOR_PAIR(COLOR_BLUE)); COLOR_PAIR (COLOR_BLUE); wprintw (credit,"Comments or bugs to Luis Falcon (lfalcon@thymbra.com)"); wmove (credit,0,0); COLOR_PAIR (COLOR_CYAN); */ if ( (countdown= countdown - dormant) <=0 ) {aflag = 1; countdown = aperiod; } if (INIT == 0) current_time = update_watch (); if (INIT != 0) { if (total_load > max_sofar) { max_sofar = total_load; current_time = update_watch (); } werase (panel); werase (lever); wmove (panel,1,5); wprintw (panel,"Maximum device load %Ld (%s)",max_sofar,current_time); wmove (panel,2,1); whline (panel,0,58); wmove (panel,4,14); wattrset (panel,A_BOLD); wprintw (panel, "Relative Load in %d sec(s) step",dormant); wmove (panel,6,15); wattrset (panel,COLOR_PAIR (COLOR_CYAN)); wprintw (panel, "Received \t %Ld",rec_load); wmove (panel,7,15); wprintw (panel, "Transmitted\t %Ld",trans_load); wmove (panel,8,15); wprintw (panel, "Total load\t %Ld",rec_load + trans_load); wmove (panel,13,22); wprintw (panel, "device %s",device); wattrset (panel,0); wrefresh (panel); load_level = total_load/scale; if (load_level > 60) load_level = 60; if (total_load > 0) { if (load_level <=20) wattrset (lever, A_BOLD); if (load_level >20 && load_level < 40) { wattrset (lever,COLOR_PAIR (COLOR_GREEN)); COLOR_PAIR (COLOR_GREEN); } if (load_level > 40) { if ( alarm==1) { if (salarm == 1) beep (); if (ealarm == 1 && aflag == 1) mail_notify (dormant, rbytes,sbytes,rec_load, trans_load, total_load, device); } wattrset (lever,COLOR_PAIR (COLOR_RED)); COLOR_PAIR (COLOR_RED); } for (marks=0;marks < load_level+1;marks++) wechochar (lever,ACS_BLOCK); } } wattrset (lever,0); wrefresh (lever); wrefresh (credit); wrefresh (INFO); INIT =1; } char *update_watch () { time_t reloj; char *time_holder; time (&reloj); time_holder = ctime (&reloj); time_holder [24] =0; return (time_holder); } /* Function reset () ********************************************************************************************************************/ void reset (int signal) { endwin (); printf ("Later...\n"); exit (0); } /* Function setup_netload () ********************************************************************************************************************/ int setup_netload () { printf ("\nNot implemented...yet. \nFor now, edit your $HOME/.netloadrc to fit your requirements.\n\n"); exit (0); } /* Function check_arguments ***********************************************************************************************************************/ int check_arguments (int c,char *v[]) { if (c < 2 || c > 4 || c == 3) { endwin (); CMD_LINE; exit (1); } if (c==4 && strcmp (v[2],"-t") != 0) { CMD_LINE; exit (1); } if (c==4 && strcmp (v[2],"-t") == 0 && atoi (v[3]) == 0) { fprintf (stderr, " Time must be >= 1 sec\n"); exit (1); } return (0); } /* Function check_netloadrc () ********************************************************************************************************************/ int check_netloadrc (char *device) { FILE *source; char *line; char *period; char content [10000]; char mask [6]; int argument_length; int filesize=0; int counter=1; int sfactor=0; endwin (); netrc= malloc ( 100*sizeof (char)); netrc = getenv ("HOME"); netrc = strcat ( netrc,"/.netloadrc"); strcpy (mask,device); argument_length = strlen (device); mask [argument_length]=':'; line = malloc (10000*sizeof (char)); period = malloc (10000*sizeof (char)); if ((source=fopen (netrc,"r")) == NULL) { endwin (); fprintf (stderr, "\nCouldn't open %s !\n Setting up defaults ...\n",netrc); fprintf (stderr, "\nNow edit %s to your personal settings\n", netrc); if ((source=fopen (netrc,"w+")) == NULL ) { fprintf (stderr, "\nCouldn't write to %s !\n", netrc); exit (1); } fprintf (source,"## Configuration file for netload\n"); fprintf (source,"## (c) 1996-2007 Luis Falcon lfalcon@thymbra.com \n\n\n"); fprintf (source,"## Activate (1) or deactivate (0) the high-load alarm\n"); fprintf (source,"alarm:1\n"); fprintf (source,"## Notify (1) or disable (0) high-load sound notification\n"); fprintf (source,"sound:1\n"); fprintf (source,"## Notify (1) or disable (0) high-load email/SMS notification\n"); fprintf (source,"email:0\n"); fprintf (source,"## Period ( in minutes ) high-load email notification\n"); fprintf (source,"period:60\n\n"); fprintf (source,"## Insert and/or your interfaces here, followed by colon and the scale factor.\n"); fprintf (source,"## one mark is equivalent to x Bytes/sec. There are 60 marks in the meter\n"); fprintf (source,"ppp0:170\n"); fprintf (source,"lo:30000\n"); fprintf (source,"eth0:30000\n\n"); fprintf (source,"## Email notification stuff...don't get rid or modify \"From,To and Subject\" headers, or sendmail won't work properly\n\n"); fprintf (source,"From: your@email.xxx\n"); fprintf (source,"To: your@recipient.xxx\n"); fprintf (source,"Subject: High-load\n"); fprintf (source,"Enter your text here....\n"); fclose (source); exit (1); } /* Check for the device,its scale factor and alarm settings */ fseek (source,0,SEEK_END); filesize = ftell ( source ); fseek (source,0,SEEK_SET); fread (content,filesize,1,source); line = strstr (content,mask); if ( strstr ( content,"alarm:1" )) alarm=1; if ( strstr ( content,"sound:1" )) salarm=1; if ( strstr ( content,"email:1" )) ealarm=1; if ( period = strstr ( content,"period:")) { period = strchr (period,':'); while (period[counter] != (char) 10) counter++; period [counter]= (char) 0; period++; /* get rid of ':' */ aperiod = atoi (period) * 60; countdown=aperiod; } if (line == NULL) { fprintf (stderr,"Your device \"%s\" was not found in .netloadrc ... \nSetting default scale 30Kb per unit of time\n",device); fprintf (stderr,"Chances are, this is not the scale you want... so add it to .netloadrc\n"); sfactor=30000; fclose (source); sleep (2); return (sfactor); } line = strchr (line,':'); while (line[counter] != (char) 10) counter++; line [counter]= (char) 0; line++; sfactor = atoi (line); fclose (source); return ( sfactor ); } int mail_notify (int dormant, long long int rbytes,long long int sbytes,long long int rec_load,long long int trans_load,long long int total_load, char *device) { FILE *mail; FILE *source; char *message; char *conf; long filesize; message = malloc ( 10000* sizeof ( char)); mail = popen (MAILER, "w"); if (!mail) { endwin (); perror ("Error :"); exit (1); } source = fopen (netrc,"r"); fseek (source,0,SEEK_END); filesize = ftell ( source ); fseek (source,0,SEEK_SET); fread (message,filesize,1,source); message = strstr (message,"From:"); fprintf(mail,"%s\n", message); fprintf (mail, "\n\nSnapshot of device %s ( All the values are in Bytes )\n\n", device); fprintf (mail, "Time of High-load : %s\n", current_time); fprintf (mail, "Time for next email check: %d minutes\n\n", aperiod/60); fprintf (mail, "Total Received:\t\t %Ld\n", rbytes); fprintf (mail, "Total Sent:\t\t %Ld\n\n", sbytes); fprintf (mail, "Rec. in the last %d seconds:\t\t%Ld\n",dormant, rec_load); fprintf (mail, "Sent in the last %d seconds:\t\t%Ld\n",dormant, trans_load); fprintf (mail, "Total in the last %d seconds:\t\t%Ld\n\n\n",dormant, rec_load+trans_load); fprintf (mail, "Average # Bytes per second: %Ld\n", total_load); pclose(mail); aflag=0; } netdiag-1.2/netload-1.2.2/netload.lsm000066400000000000000000000007021323731111400172110ustar00rootroot00000000000000Begin4 Title: netload Version: 1.2.2 Entered-date: 07/11/2007 Description: network interface monitoring system with email alarm notification Keywords: network, security, network load, ncurses, system administration, sendmail Author: lfalcon@thymbra.com (Luis Falcon) Maintained-by: lfalcon@thymbra.com (Luis Falcon) Primary-site: http://www.thymbra.com/downloads/netload Alternate-site: Original-site: Platforms: Linux i386 Copying-policy: GPL End netdiag-1.2/netwatch-1.3.1-2/000077500000000000000000000000001323731111400153755ustar00rootroot00000000000000netdiag-1.2/netwatch-1.3.1-2/BUGS000066400000000000000000000003341323731111400160600ustar00rootroot00000000000000 Oct. 17th , 1998 The XTERM screen sizing is not working dynamically correctly. It will start in the correct manner but it will not adjust when the program is running. (Something for the next release or not... hmmm). netdiag-1.2/netwatch-1.3.1-2/CHANGES000066400000000000000000000221161323731111400163720ustar00rootroot00000000000000Oct. 2, 2015 Cleaned up performance to minimize broken curses displays (not perfect but much better) Works on larger displays now... again not perfect... if you choose a VERY large window there are still issues Jan. 2, 2009 Added -k option to allow SSH connections to easily see what is happenning without SSH communication obscuring the display... and causing more net traffic.. Eliminated "fishingboat" file references... (Commented out) Fixed "make install" script Oct. 22, 2007 Fixed config bug that brought in wrong header files Adjusted Makefiles for improved version handling Oct. 16, 2007 Multi-threaded with semaphores...(BIG CHANGE) Updated to compile with new libraries... Mar. 31, 2001 Revamped the simulation code to allow mode switching. Added *some* docs. Feb. 15, 2001 Logging and Netwatch Simulation added... Allows command line specified hosts to log... config file specified hosts to log... all all remote all local individual tracking of ALL hosts Allows playback of ANY log file (indiv. hosts etc... either in REAL TIME or packet by packet) Feb. 9, 2001 Fixed Bugs in Scan host option ( was missing some chars for display and was not working with PGUP and PGDN properly) Fixed compile problem for RH7.0 and other glibc2.2 brethren Updated the IANA settings for display. Changed the tmpnam() call to a specific file... in /root directory Mar. 31, 2000 Added -b for TRANSPARENT bridge... (ignores every other packet) Added kbits per sec... display on hosts screen Added -i to FAKE the INET address (used with MASK to monitor class C net) Added all the new command line options to configuration file options Mar. 6, 2000 Fixed FTP/HTTP scanning code for possible seg. fault Added -n for no name resolution Added -m mask for forcing netmask on a router/bridge Reworked the read for new kernels so "obsolete" packet read is removed... (will now work on ANY kernel compiles... not just SOCK_PACKET type compiles) Fixed the interface selection code for working with a specific I/F instead of all I/F cards (causing duplicate counts on bridges and erroneous info on routers) June 30th, 1999 Bug fix on signal handling in "netresolv"... ie. don't do a kill with SIGUSR2 or SIGUSR1 with PID=0.... oops June 22nd, 1999 Added routing stats array and plot ( "w" "r" "s" ... watch route summary) and the "d" command active to summarize via 60/30/15/1 min intervals CHILD termination fixes June 15th, 1999 Revamped the passage of messages to Netresolv and through Netresolv to make this MUCH less likely to fail (hopefully never!!). Put a switch in Netwatch to turn off NAME checking in CONFIG file AND automatically if Netresolv turns off Added STATUS line support with the 's' command (when NOT in the WATCH mode (i.e. select host in that mode). 12 different status lines are available... 's' cycles through them and 5s will move 5 status lines ahead... etc.. (repeat the command)... June 5th, 1999 OK... this core dump business is moving into the stats process so I have protected it (I think) June 1st, 1999 OK, another more serious "netresolv" generated core dump was handled (it was feeding data after an "n" command destroyed the list...) May 30th, 1999 Fixed "annoying" core dump... lockout check for reload May 25th, 1999 Added "ppp" device support ( use -e ppp0 or any other #) Fixed display in freeze exit... to show help or routing screen properly Added a lockout of keyins during reload time... (hope this helps) Burst stats disabled after return from freeze May 20th, 1999 Adding (by request) a display freeze for remote screen access (allowing bandwidth conservation) Adding a periodic Logging for netwatch configurable via a configuration entry.... reload 60 (means reload & LOG every 60 minutes) May 18th, 1999 For 0.8g release Bug fix release... hopefully the config file works NOW!!!! May 16th, 1999 For 0.8f release Bug fix for Netwatch Configuration File... it will read it NOW!!! Time Fix for Display of Statistics March 15th, 1999 For 0.8e release SMALLER package due to removal of IANA data from subdirectory... (used in production of code... but obtained directly from the net by developer www.iana.org ) IANA update for newest port names and ICMP numbers Fix to pesky screen problem on exit.... Added config file option for making some configurations customizable via a file... easier... "fishstring" for spotting special packets with strings to HIGHLIGHT!!! Actually mails packet (HEX) to the customizable user B.O. and NetWatch attack spot checks (Note: don't get to self-assured... this isn't the end-of-the-road for these attacks) Jan. 17th, 1999 64-bit patches courtesy of Paul Slootman Repeat of commands allowed by preceding commands by a number (i.e. 5 repeats 5 times) Symbolic link security problem fixed... home directory of root used Extra keyboard functionality for keyboards without good access > right < left ^ up v down - previous_page + next_page Nov. 14th, 1998 Internal 0.8b use Added config file support for E-mail of suspicious packets re- B.O. and NETBUS attacks - Oct. 17th, 1998 For 0.8a release BETA TESTING TOP mode provides the dynamic list effect of seeing the high performers on a 30 second interval (normal functions in the display mode) (See the 't' key) REMOTE OR LOCAL List Cleaning via 'N' command If you are ON the LOCAL list... N will clear it to nothing If you are ON the REMOTE list... N clears it New improved Host Packet Examination with a 400 packet buffer. (PGUP and PGDN in the Watch (S) mode allow browsing back into the buffer) NOTE: This is still a SMALL buffer... but were are building capability May 30th, 1998 For 0.7e Release Better performance... Some new features... MAC Address/IP Spoofing monitor/HTTP Server watch TELNET appears in PURPLE (CLIENT only) XTERM fexible settings for BIG screens (although only set at START of run) PORT NUMBERS now from IANA specification (which may include names that your system does not recognize as the IANA service but... it could be to another system ./configure added to ease the installation process across dissimilar linux systems.... For 0.7 Release... Added a SERVICE process fed by pipes and primed by signals to resolve NAMES from ADDRESSES (which has been a HUGE factor in the Netwatch slowdown in processing). Process is called "netresolv" and is started via "netwatch" itself... should also be killed via "netwatch" on exit.... Mar. 15th, 1997 OK... non-blocking "select" call (because Linux seems to MISS certain packets to get through "select"... causing blocking) Mar. 14th, 1997 Multitude of Speed Fixes Removing STATNET specific code Non-blocking socket usage!!! (Why? Wait at select call... don't wait at recvfrom() Mar. 12th, 1997 Oops..BUG FIX.. SEGV.. fixed bad array lengths in gh.c.... Mar. 12th, 1997 Added Host tracing with FULL screen mode ('z' command while in 's' mode) Removed -O2 compile option to fix performance problem (??? WHY ???) Changed old 's' command to be 'l' for logging to file Feb. 24th, 1997 Changed keyboard handler to be invoked via select call rather than a polling method... Added HOST selection for monitoring the last 10 packets of a specific site Added 's' command for saving (appending to a log file) Uses /proc/net/route to pick up configuration info... if there Calls home for simple network registration... packet info restricted to very generic info... not even user name Feb. 15th, 1997 For 0.5c release Added support for REMOTE/LOCAL packet/byte monitoring Added command for eliminating DOMAIN service remote sites (Display only) 'd' command Added command to eliminate the OLD (i.e. BLUE) sites (local & remote) (Display only) 'b' command Sept. 27th, 1996 For 0.5b release Fixed missing in the NEW Linux distributions... MUST #define OLDLINUX to have the old version support... see netwatch.h and uncomment that line... (if you need ncurses.h) Aug. 27th, 1996 For 0.5a release Fixed REDRAW bug... so display is cleaner without refresh problem Added ^L to allow screen redraw if someone writes to the display during program execution Added reliable signal handler to a) use "sigaction" b) handle INTR and HUP signals gracefully Vt100 and other B/W ttys should work now... For 0.5 Release 1.0 Made workaround for NCURSES bug which caused "hang" at a "getch()" even though there is a NODELAY option in effect. 2.0 Added HELP feature - displaying HELP pages on request (H or F1 key) 3.0 Added Watch Facility - to display router stats including maximum burst rates (on a second interval in BITS/SEC) Ability to Clear Burst info ('c' key) 4.0 Added command line argument handling to a) set another config file other than /etc/rc.d/rc.inet1 b) handle eth1 or another eth device (No way to verify it here!) Aug. 23rd , 1996 For 0.4 Release... 1.0 Revamped the "processrcinet.c" routine to PARSE the "ifconfig" line and be smarter about GLOBAL variables in use as opposed to hard coded addresses. NOTE: As global variables, it still assumes IPADDR and NETMASK as the names of info that it picks up. 2.0 New Statistics - router throughput (updated per minute -- roughly ) - new option for actual BYTE counts received and transmitted netdiag-1.2/netwatch-1.3.1-2/COPYING000066400000000000000000000434221323731111400164350ustar00rootroot00000000000000Copyright (C) 1995 Alain Knaff. You may use, distribute and copy this program according to the terms of the GNU General Public License version 2 or later. Alain Knaff ---------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. netdiag-1.2/netwatch-1.3.1-2/Make.common.in000066400000000000000000000016701323731111400200750ustar00rootroot00000000000000VERSION=1.3.1 RELEASE=2 CVERSION="$(VERSION)" CRELEASE="$(RELEASE)" SHELL = /bin/sh prefix = @prefix@ exec_prefix = $(prefix) binprefix = manprefix = bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib/mc suppbindir = $(libdir)/bin tidir = $(libdir)/term extfsdir = $(libdir)/extfs icondir = $(libdir)/icons mandir = $(prefix)/man/man1 manext = 1 man8dir = $(prefix)/man/man8 man8ext = 8 xv_bindir = @xv_bindir@ # Tools & program stuff SEDCMD = @SEDCMD@ SEDCMD2 = @SEDCMD2@ STRIP = @STRIP@ MAKE = @SET_MAKE@ CC = @CC@ CPP = @CPP@ AR = ar RANLIB = @RANLIB@ RMF = rm -f LN_S = @LN_S@ AWK = @AWK@ # Flags & libs # No way, to make make happy (except GNU), we cannot use := to append # something to these, so that's why there is a leading _ XCFLAGS = @CFLAGS@ XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC) XLDFLAGS = @LDFLAGS@ XDEFS = @DEFS@ XLIBS = @LIBS@ # End of Make.common netdiag-1.2/netwatch-1.3.1-2/Makefile.in000066400000000000000000000033141323731111400174430ustar00rootroot00000000000000include ./Make.common EXEC= netwatch netresolv # You might need to say where the ncurses include files are. #CFLAGS=-O2 -I/usr/include/ncurses # -O2 flag caused some performance problems... unclear right now why.. #CFLAGS=-I/usr/include/ncurses #CFLAGS=-O2 # Comment out the following line if you have a requirement for "ncurses.h" #OLDLINUX=-DOLDLINUX #OLDLINUX= # CFLAGS= DEFS= curs.h netwatch.h OBJECTS= curs.o dispdata.o services.o netwatch.o processinetrc.o gh.o warning.o semaphore.o INSTALLDIR=$(bindir) all: $(EXEC) netresolv: netresolv.o netresolv.h $(CC) -o netresolv $(XCFLAGS) netresolv.o netwatch: $(OBJECTS) $(DEFS) $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(OBJECTS) $(XLIBS) install: $(EXEC) install --owner=root --group=root --mode=0755 -d $(INSTALLDIR) install --owner=root --group=root --mode=0755 -d $(mandir)/man1 install --owner=root --group=root --mode=0700 netwatch $(INSTALLDIR) install --owner=root --group=root --mode=0700 netresolv $(INSTALLDIR) bzip2 netwatch.1 install -D netwatch.1.bz2 $(mandir)/man1 bunzip2 netwatch.1.bz2 tar: tar -C .. -czf ../netwatch-$(VERSION)-$(RELEASE).tgz netwatch-$(VERSION) clean: rm -f *~ *.o $(EXEC) config.h config.cache config.log config.status .c.o: $(CC) $(XCFLAGS) -c $(OLDLINUX) $< curs.o: curs.c curs.h config.h dispdata.o: dispdata.c curs.h netwatch.h config.h services.o: services.c netwatch.h $(CC) -g -c services.c netwatch.o: netwatch.c netwatch.h curs.h config.h $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' $(XCFLAGS) -c netwatch.c processinetrc.o: processinetrc.c semaphore.o: semaphore.c gh.o: gh.c config.h netresolv.o: netresolv.c netresolv.h config.h warning.o: warning.c netwatch.h netdiag-1.2/netwatch-1.3.1-2/NetwatchKeyCommands.html000066400000000000000000000144221323731111400221760ustar00rootroot00000000000000 Netwatch Key Commands Netwatch Controls (Keyboard)

General Mode

b or B
Blue Display Toggle (Hosts inactive)
c or C
Clear counters
c - clears remote and local counters
C - clears the current side counters (remote or local)
d
Ignore domain tranmissions (toggle)
f
Freeze display (toggle)
j or J
Clear modes
j - clears Watch mode and display options
J - Adds clearing Host Monitoring mode and Local/Remote
l or L
Log statistics - either appends to a global stats file which is specified in the config file OR separate files are used with a datetime extension
n or N
New Entries (Delete all old entries)
n - deletes ALL host entries in list
N - deletes the current side entries (remote or local)
p or P
Print Special Log
q or Q
Quit
t or T
Top Mode (toggle) - sorted lists using activity
w or W
Enter WATCH mode


Watch Mode
s
Go to Host Monitoring Mode
r
Go to Router Statistics Mode
<ESC> Return to Normal General Command mode

Host Monitoring Mode
l or L
Start logging the selected host (to a file with standard base)
NOTE: Selected host colour will turn to light blue
o or O
Display selected host communication details (inc. HEX, Smart IP display and ASCII display)
d or D
Stops the logging of selected host
Note: Selected host returns to default netwatch colour
<TAB>
Switches from remote to local (or vice versa)























netdiag-1.2/netwatch-1.3.1-2/README000066400000000000000000000153571323731111400162700ustar00rootroot00000000000000 Version 1.3.1-2 (NETWATCH) NETWATCH is VERY loosely based on the code from Statnet... thanks out to Jeroen and Scot... NETWATCH allows a user (superuser) to monitor an ETHERNET and examine activity on the network. Hostnames are highlighted in colours (for those supporting them) to indicate activity on the bus network based on time ( less than 1 minute RED, less than 5 minutes YELLOW, less than 30 minutes GREEN and otherwise BLUE). The monitor includes statistics on a) Transmitted and received packets b) Transmitted and received bytes c) Protocol of LAST packet (TX or RC) d) LAST Communication partner (IP address) e) Logging entire stats to ASCII file (large...) The number of hosts capable of support is a function of memory. They are stored in 2 doubly-linked lists (local and remote). Screen updates take place based on changes since we have a series of threads that allow updates dynamically. Keyboard usage is admittedly limited. TAB Switches between LOCAL and REMOTE sections of screen Go forward to next display option Go backward to previous display option Go back to previous page (back 20 lines on most consoles) (working on the selected REMOTE OR LOCAL section) Go forward to next page (forward 20 lines on most consoles) (working on the selected REMOTE OR LOCAL section) c Clear counters for fresh counting n Clear linked lists for new start d Toggle between allowing remote DOMAIN service hosts and not b Toggle between showing the OLD (blue) hosts and not There is rudimentary logging capability, using the 'l' command. This saves the current statistics (all) to a file called "/etc/netwatch.stats". WARNING: This file may get VERY large. Statistics for the local machines are dumped THEN the remote machines. This info is APPENDED to the file. LOGGING is improving.. stay tuned RELOAD option in the config file allows the user to set a start time for RELOADing as well as an offset time (to indicate when the next RELOAD will occur). Stats are saved on a reload and the netwatch stats are cleared. It is a simple program to execute for ETHERNET under LINUX. As of version 0.6a, the program will search for information from the "/proc" file system. If it is not there, it assumes that there is a "/etc/rc.d/rc.inet1" file for network configuration. If so, it checks for an "eth0" ifconfig and picks up the netmask from the file. For those with multiple "eth" interfaces, I am sorry it doesn't support both simultaneously. For "eth1" support, use the command line netwatch -e eth1 As of version 0.6a, this program calls home with a simple packet of info including the domain and machine name which is running. It is not used for anything except registering netwatch use on the Internet. It creates a file in your home directory called ~/.netwatch.. If the file is already there, it does not call home. This means that it will call home only once for the program. It is not a true registration in the sense of obtaining a license (or anything like that). Info transmitted is very limited. The "ppp" interface is NOW supported (as of 0.9b). Simply specify netwatch -e ppp0 (or whatever ppp device you desire) Status Line is configurable via the "s" command... which cycles through the various status lines (13 in all) Status Line #1: Standard Netwatch Status line Status Line #2: NetBus Attack Warning Status Line #3: B.O. Attack Warning Status Line #4: Bad Mac Address display Status Line #5: Netresolv stats -> IP address to name conversion Status Line #6: Number of Hosts in List (Local and Remote) Status Line #7: RELOAD status (option via config file) Status Line #8: Base filename for stats logging (for reload and "l") Status Line #9: Netwatch Config filename Status Line #10: Log filename (for "p" command) Status Line #11: Device/Netmask/Local IP Status Line #12: Mail warning destination for Netbus & B.O. attacks Status Line #13: Debug line... unused in release The multiple command works with "s" so 10s repeats the s command 10 times NOTE: This repeat works with normal movement commands as well to go down in a list quickly etc... The ROUTER WATCH has been extended to include a character graphics router summary for the previous DAY (only a DAY worth stored). To obtain the graph... "w" for watch mode "r" for router stats "s" for router stats summary (a toggle..."s" again returns to normal stats) while in summary mode... there is a time option where stats are summarized (default is 60 min). To cycle through the legitimate times use the "d" command. The time should be updated to 60/30/15/1 minutes... The graph indicates the router throughput average over the summary time. The graph is automatically scaled using the maximum burst throughput as the maximum for the display. LEFT ARROW will allow you to move to the left in the graph to see previous values RIGHT ARROW will allow you to return to right in the graph. Arrow commands may be used with Numbers as well i.e. 10 will move to the left by 10 units Units in the graph are dependent on your time option. One unit in the 60 min. mode is 60 min. AUTHOR: G. MacKay E-MAIL: mackay@uno.slctech.org INSTALLATION of SOURCE based package: 1.0 Unpack the ARCHIVE (which you have probably already done to read this) Try: tar -xzf netwatch-1.3.0.tgz cd netwatch (move to the new directory with source) 2.0 Run the shell script ./configure This should generate a Makefile..... 3.0 Compile the program make netwatch (actually "make" by itself works) 4.0 If there are no errors, you can install the program make install (Warning... you must be root to install AND due to the nature of the program it is NO LONGER SET-UID root... you must have privileges to run it) NOTE: INSTALL DIRECTORY is /usr/local/bin Edit Makefile to change for your preference. (copying netwatch and netresolv to a directory in your SEARCH PATH will also work) INSTALLATION of BINARY based package: 1.0 Unpack the ARCHIVE (which you have probably already done to read this) Try: tar -xzf netwatch-1.3.0.bin.tgz cd netwatch (move to the new directory with source) 2.0 Install the software make install (Warning... you must be root to install AND due to the nature of the program it is NO LONGER SET-UID root... you must have privileges to run it) NOTE: INSTALL DIRECTORY is /usr/local/bin Edit Makefile to change for your preference. (copying netwatch and netresolv to a directory in your SEARCH PATH will also work) Good luck... Gord. NOTE: A sample configuration file is available "netwatch.conf.eg" Place this in /root/.netwatch.conf and set as you will netdiag-1.2/netwatch-1.3.1-2/README.performance000066400000000000000000000014001323731111400205500ustar00rootroot00000000000000 Netwatch Performance Issues 1.0 When NETWATCH starts, it will be slightly slower than when it gets rolling, since each host involves a NAME SERVER lookup to resolve addresses. NOTE: Version 0.7 has attempted to address this by making a service process (netresolv) take care of this lookup. It appears to be much more efficient. 2.0 On slow machines, you may find it sluggish due to the linked list requirement of insertions and updating. Each host is looked up linearly within the list. (Yes... this is an issue which needs to be addressed... but not right now) 3.0 As of Version 0.8a, NETWATCH will take the time to sort for High usage hosts on 30 sec. intervals. It works fine for me but it has the potential to be a bottleneck for slower systems. netdiag-1.2/netwatch-1.3.1-2/TODO000066400000000000000000000010271323731111400160650ustar00rootroot00000000000000 TASKS to COMPLETE 1.0 Alarm Monitoring 2.0 Better logging... 3.0 Setting for default run via a CONFIG file 4.0 Yes... and X version with a GUI interface... (Time :() FIXES - Remote Watch problem... no update - Config file settings for a variety of preferences - general cleanup of header files and configure For 8f - fix RH5.2 compile error... hmm with OLD kernel - multiple IF change for simultaneous viewing... - allow setting for TRUE remote test... for stats to router... (multi-homed host fix) Looking at a QT rewrite... netdiag-1.2/netwatch-1.3.1-2/TRY000066400000000000000000000010541323731111400157760ustar00rootroot00000000000000Things to try.... Implement a thread interface for netwatch.... To service global variable changes from a remote process... Read via a PIPE (FIFO?) in order to pick up commands.... PIPE is 700 owned by root for security /root/.netwatch.pipe (Created by X process BEFORE running netwatch normally...) Netwatch will check for the PIPE and monitor it ONLY if it is there... PIPE INFO is as follows PIPE MARKER BYTE MESSAGE TYPE BYTE MESSAGE LENGTH INTEGER . .DATA . PIPE ENDMARK BYTE Types of Messages 01 KEYBOARD INPUT more coming... netdiag-1.2/netwatch-1.3.1-2/bump000077500000000000000000000110601323731111400162640ustar00rootroot00000000000000ELF\„4Ð4 (44€4€  ÔÔ€Ô€€€••˜˜–˜–Ä|ÔÔ–Ô–ˆˆ/lib/ld-linux.so.2     Ô–ñÿ#¬–ñÿ9p†1 ?ÀƒhE„W,„>^<„àcüƒ'j „$qL„»x\—!\—‹\—!“\„ šh†ñÿ¡\—ñÿ¨\—ñÿ´˜ñÿ__gmon_start__libc.so.6_DYNAMIC_GLOBAL_OFFSET_TABLE__fini_init__libc_init_firstatexitexitstrcpyprintfstrlen_environ__environenviron_start_etext_edata__bss_start_endЖ\— ¸– ¼– À–Ä–È–Ì– U‰åSè[Ã・$tè"|û÷‰öèS‹]ü‰ì]Ãÿ5°–ÿ%´–ÿ%¸–héàÿÿÿÿ%¼–héÐÿÿÿÿ%À–héÀÿÿÿÿ%Ä–hé°ÿÿÿÿ%È–h é ÿÿÿÿ%Ì–h(éÿÿÿ1í…ÒtRèÄÿÿÿXè®ÿÿÿ^D´£\—‰âƒäøPPRVè:ÿÿÿhp†èœÿÿÿXè:Pè ÿÿÿôU‰åS»¨–ƒ=¨–t‰ö‹ÿЃÃƒ;uô‹]üÉÃvU‰åÉÃU‰åƒìÇEôÇEðƒ}hŒ†èÿÿÿƒÄjè>ÿÿÿƒÄvƒ}~‹E ƒÀ‹€:nuÇEðƒ}~‹E ƒÀ‹€:ruÇEô‹E ƒÀ‹Rh`—è±þÿÿƒÄh`—èôþÿÿƒÄ‰ÀƒøwhŒ†è þÿÿƒÄjèÆþÿÿƒÄvh`—èÆþÿÿƒÄ‰ÀHÿ‰Mø‹Eø`—ŠˆUÿ‹Eø_—ŠˆUþ‹Eø]—ŠˆUýƒ}ðuƒ}ôu€}ÿy‹Eø`—þëF‰öƒ}ôu€}þ8‹Eø`—Æa‹Eø_—þë!‹Eø`—Æa‹Eø_—Æ0‹Eø]—þh`—h‘†èáýÿÿƒÄ1Àë‰öÉÃU‰åS»œ–ƒ=œ–ÿt‰ö‹ÿЃÃüƒ;ÿuô‹]üÉÃvU‰åÉÃU‰åSè[Ã3èþÿÿ‹]ü‰ì]Ã0.0a%s ÿÿÿÿÿÿÿÿÔ–„„"„2„B„R„ Àƒ p†è€Ä‚„ ¹ ¬–0ƒ€ƒGCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.3GCC: (GNU) 2.7.2.301.0101.0101.0101.0101.01.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.got.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.comment.noteÔ€Ô#è€èœ) „„@1ĂĹ9 €ƒ€B ˆƒˆK ƒ0 TÀƒÀ,Zìƒìp_\„\ ep†pkŒ†Œ s˜–˜yœ–œ€¤–¤‡¬–¬(ŒÔ–Ôˆ•\—\¸š\d£dÀd$© - °€Ô€è€„Ä‚€ƒˆƒƒÀƒìƒ \„ p† Œ† ˜– œ–¤–¬–Ô–\—dñÿ  „ ñÿ 8† &8† < –I`† Tœ– b¨–ñÿ h† ñÿ  „ o „ …¤–“È„ Tœ– žœ–¬ñÿ Є ³`—´½üƒ'Ä „$ËÔ–ñÿÔh†ñÿÛ\—!ä\—îÀƒhô\„ û„ \—ñÿЄf ˜– )p†1 /,„>6\—ñÿ=¬–ñÿS˜ñÿX<„à]L„»d˜– q initfini.cgcc2_compiled.crtstuff.c__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END____do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__bump.cversion.2strcpyprintf_DYNAMIC_etext_environ__environ_init_start__libc_init_first__bss_startmaindata_start_finiatexit_edata_GLOBAL_OFFSET_TABLE__endexitstrlen__data_start__gmon_start__netdiag-1.2/netwatch-1.3.1-2/bump.c000066400000000000000000000020721323731111400165050ustar00rootroot00000000000000#include /* bump version as bump version whatever your version... do letter increment bump version n whatever your version... upgrade sub num.... 0.6d -> 0.7 bump version r whatever your version... upgrade prime num.... 0.6d -> 1.0a */ int main( int argc, char *argv[]) { char lastkey; char subnum; char primnum; static char version[180]; int lastspot; int bumpprim = 0; int bumpsub = 0; if (argc<2) { printf("0.0a"); exit(1); } if (argc>2 && argv[2][0]=='n') bumpsub = 1; if (argc>2 && argv[2][0]=='r') bumpprim = 1; strcpy(version,argv[1]); if (strlen(version)<4) { printf("0.0a"); exit(2); } lastspot = strlen(version) -1; lastkey = version[lastspot]; subnum = version[lastspot-1]; primnum = version[lastspot-3]; if (!bumpsub && !bumpprim && lastkey<'z') version[lastspot]++; else { if (!bumpprim && subnum<'9') { version[lastspot]='a'; version[lastspot-1]++; } else { version[lastspot]='a'; version[lastspot-1]='0'; version[lastspot-3]++; } } printf("%s\n",version); return(0); } netdiag-1.2/netwatch-1.3.1-2/bump.sh000077500000000000000000000012301323731111400166730ustar00rootroot00000000000000#!/bin/bash VER=`cat version` NEWVER=`./bump $VER` echo $NEWVER > version mv netwatch.${VER}.lsm netwatch.${NEWVER}.lsm sed "s/$VER/$NEWVER/g" Makefile.in > ttt /bin/rm Makefile.in mv ttt Makefile.in sed "/= \"${VER}\"/s//= \"${NEWVER}\"/" netwatch.c > ttt /bin/rm netwatch.c mv ttt netwatch.c cd .. mv netwatch.$VER netwatch.$NEWVER cd netwatch.$NEWVER ./configure make clean make tar ./configure sed "s/Src/Bin/g" gh.c > ttt /bin/rm gh.c mv ttt gh.c make cp ../Makefile.netwatch.bin Makefile sed "s/XXXX/$NEWVER/g" Makefile > ttt /bin/rm Makefile mv ttt Makefile /bin/rm *.in conf* *.o *.c *.awk *.gen *.ports *.h Mak*common /bin/rm -r IANA make tar cp *.lsm .. netdiag-1.2/netwatch-1.3.1-2/bumpmaj.sh000077500000000000000000000012321323731111400173650ustar00rootroot00000000000000#!/bin/bash VER=`cat version` NEWVER=`./bump $VER r` echo $NEWVER > version mv netwatch.${VER}.lsm netwatch.${NEWVER}.lsm sed "s/$VER/$NEWVER/g" Makefile.in > ttt /bin/rm Makefile.in mv ttt Makefile.in sed "/= \"${VER}\"/s//= \"${NEWVER}\"/" netwatch.c > ttt /bin/rm netwatch.c mv ttt netwatch.c cd .. mv netwatch-$VER netwatch-$NEWVER cd netwatch-$NEWVER ./configure make clean make tar ./configure sed "s/Src/Bin/g" gh.c > ttt /bin/rm gh.c mv ttt gh.c make cp ../Makefile.netwatch.bin Makefile sed "s/XXXX/$NEWVER/g" Makefile > ttt /bin/rm Makefile mv ttt Makefile /bin/rm *.in conf* *.o *.c *.awk *.gen *.ports *.h Mak*common /bin/rm -r IANA make tar cp *.lsm .. netdiag-1.2/netwatch-1.3.1-2/config.h.in000066400000000000000000000013571323731111400174260ustar00rootroot00000000000000#undef USE_NCURSES #undef USE_PTHREAD #undef SYS_IF_PACKET_H #undef LINUX_IF_PACKET_H #undef NET_IF_PACKET_H #undef NEWCURSES_SUPP #undef NEWCURSESROOT_SUPP #undef REGULARCURSES_SUPP #undef HAVE_UNISTD_H #undef NETINET_SUPP_ip #undef LINUXINET_SUPP_ip #undef NETINET_SUPP_tcp #undef NETINET_SUPP_ip_tcp #undef LINUXINET_SUPP_tcp #undef NETINET_SUPP_udp #undef NETINET_SUPP_ip_udp #undef LINUXINET_SUPP_udp #undef NETINET_SUPP_icmp #undef LINUXINET_SUPP_icmp #undef NETINET_SUPP_socket #undef LINUXINET_SUPP_socket #undef NETINET_SUPP_in #undef LINUXINET_SUPP_in #undef NETINET_SUPP_if #undef LINUXINET_SUPP_if #undef NETINET_SUPP_if_ppp #undef LINUXINET_SUPP_if_ppp #undef NETINET_SUPP_if_ether #undef LINUXINET_SUPP_if_ether #undef LINUX_IP_OPTIONS netdiag-1.2/netwatch-1.3.1-2/configure000077500000000000000000002527721323731111400173230ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=curs.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:529: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:559: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:610: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 653 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:689: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:717: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi cat >> confdefs.h <<\EOF #define _GORD_LIBS 1 EOF echo $ac_n "checking for mvchgat in -lncurses""... $ac_c" 1>&6 echo "configure:753: checking for mvchgat in -lncurses" >&5 ac_lib_var=`echo ncurses'_'mvchgat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 echo "configure:800: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:848: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:928: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 echo "configure:1032: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifndef WEXITSTATUS #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main() { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF if { (eval echo configure:1053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_sys_wait_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 if test $ac_cv_header_sys_wait_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_SYS_WAIT_H 1 EOF fi for ac_hdr in fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1077: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/ip_icmp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1117: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/ip.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1157: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/tcp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1197: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/ip_tcp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1237: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/udp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1277: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/ip_udp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1317: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/if_ether.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1357: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/in.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1397: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/socket.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1437: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1477: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in net/if_ppp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1517: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in netinet/if_ether.h netinet/in.h ncurses.h ncurses/curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1557: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1597: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in pthread.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1637: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in ncurses/curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1677: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1717: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in sys/if_packet.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1757: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in linux/if_packet.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1797: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in net/if_packet.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1837: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_sys_if_packet_h = xyes; then cat >> confdefs.h <<\EOF #define SYS_IF_PACKET_H 1 EOF else if test x$ac_cv_header_linux_if_packet_h = xyes; then cat >> confdefs.h <<\EOF #define LINUX_IF_PACKET_H 1 EOF else if test x$ac_cv_header_net_if_packet_h = xyes; then cat >> confdefs.h <<\EOF #define NET_IF_PACKET_H 1 EOF fi fi fi if test x$ac_cv_header_ncurses_curses_h = xyes; then cat >> confdefs.h <<\EOF #define NEWCURSES_SUPP 1 EOF else if test x$ac_cv_header_ncurses_h = xyes; then cat >> confdefs.h <<\EOF #define NEWCURSESROOT_SUPP 1 EOF else if test x$ac_cv_header_curses_h = xyes; then cat >> confdefs.h <<\EOF #define REGULARCURSES_SUPP 1 EOF else { echo "configure: error: There is no support for ncurses.h" 1>&2; exit 1; } fi fi fi if test x$ac_cv_header_netinet_ip_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_ip 1 EOF cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep ""ip_options"" >/dev/null 2>&1; then rm -rf conftest* is_opt=1 else rm -rf conftest* is_opt=0 fi rm -f conftest* if test $is_opt = 1; then cat >> confdefs.h <<\EOF #define LINUX_IP_OPTIONS 1 EOF fi else for ac_hdr in linux/ip.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1949: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_ip_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_ip 1 EOF cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep ""ip_options"" >/dev/null 2>&1; then rm -rf conftest* is_opt=1 else rm -rf conftest* is_opt=0 fi rm -f conftest* if test $is_opt = 1; then cat >> confdefs.h <<\EOF #define LINUX_IP_OPTIONS 1 EOF fi else { echo "configure: error: There is no support in standard NETINET/LINUX for ip.h" 1>&2; exit 1; } fi fi if test x$ac_cv_header_netinet_ip_tcp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_ip_tcp 1 EOF else if test x$ac_cv_header_netinet_tcp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_tcp 1 EOF else for ac_hdr in linux/tcp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2033: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_tcp_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_tcp 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for tcp.h" 1>&2; exit 1; } fi fi fi if test x$ac_cv_header_netinet_ip_udp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_ip_udp 1 EOF else if test x$ac_cv_header_netinet_udp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_udp 1 EOF else for ac_hdr in linux/udp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2095: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_udp_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_udp 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for udp.h" 1>&2; exit 1; } fi fi fi if test x$ac_cv_header_netinet_ip_icmp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_icmp 1 EOF else for ac_hdr in linux/icmp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2151: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_icmp_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_icmp 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for icmp.h" 1>&2; exit 1; } fi fi if test x$ac_cv_header_netinet_if_ether_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_if_ether 1 EOF else for ac_hdr in linux/if_ether.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2208: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_if_ether_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_if_ether 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for if_ether.h" 1>&2; exit 1; } fi fi if test x$ac_cv_header_netinet_in_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_in 1 EOF else for ac_hdr in linux/in.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2266: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_in_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_in 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for in.h" 1>&2; exit 1; } fi fi if test x$ac_cv_header_net_if_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_if 1 EOF else for ac_hdr in linux/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2323: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_if_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_if 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for if.h" 1>&2; exit 1; } fi fi if test x$ac_cv_header_net_if_ppp_h = xyes; then cat >> confdefs.h <<\EOF #define NETINET_SUPP_if_ppp 1 EOF else for ac_hdr in linux/if_ppp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2380: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test x$ac_cv_header_linux_if_ppp_h = xyes; then cat >> confdefs.h <<\EOF #define LINUXINET_SUPP_if_ppp 1 EOF else { echo "configure: error: There is no support in standard NETINET/LINUX for if_ppp.h" 1>&2; exit 1; } fi fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo "configure:2428: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else rm -rf conftest* ac_cv_type_pid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_pid_t" 1>&6 if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF #define pid_t int EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:2461: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 echo "configure:2498: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes else rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 echo "configure:2544: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_memcmp_clean=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:2580: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:2602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:2623: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir trap 'rm -fr `echo "Makefile Make.common config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 netdiag-1.2/netwatch-1.3.1-2/configure.in000066400000000000000000000114711323731111400177120ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(curs.c) AC_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC AC_DEFINE(_GORD_LIBS) dnl Checks for libraries. dnl Replace `main' with a function in -lncurses: AC_CHECK_LIB(ncurses, mvchgat) AC_CHECK_LIB(pthread, pthread_create) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h) AC_CHECK_HEADERS(netinet/ip_icmp.h) AC_CHECK_HEADERS(netinet/ip.h) AC_CHECK_HEADERS(netinet/tcp.h) AC_CHECK_HEADERS(netinet/ip_tcp.h) AC_CHECK_HEADERS(netinet/udp.h) AC_CHECK_HEADERS(netinet/ip_udp.h) AC_CHECK_HEADERS(netinet/if_ether.h) AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(netinet/socket.h) AC_CHECK_HEADERS(net/if.h) AC_CHECK_HEADERS(net/if_ppp.h) AC_CHECK_HEADERS(netinet/if_ether.h netinet/in.h ncurses.h ncurses/curses.h) AC_CHECK_HEADERS(ncurses.h) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(ncurses/curses.h) AC_CHECK_HEADERS(curses.h) AC_CHECK_HEADERS(sys/if_packet.h) AC_CHECK_HEADERS(linux/if_packet.h) AC_CHECK_HEADERS(net/if_packet.h) if test x$ac_cv_header_sys_if_packet_h = xyes; then AC_DEFINE(SYS_IF_PACKET_H) else if test x$ac_cv_header_linux_if_packet_h = xyes; then AC_DEFINE(LINUX_IF_PACKET_H) else if test x$ac_cv_header_net_if_packet_h = xyes; then AC_DEFINE(NET_IF_PACKET_H) fi fi fi if test x$ac_cv_header_ncurses_curses_h = xyes; then AC_DEFINE(NEWCURSES_SUPP) else if test x$ac_cv_header_ncurses_h = xyes; then AC_DEFINE(NEWCURSESROOT_SUPP) else if test x$ac_cv_header_curses_h = xyes; then AC_DEFINE(REGULARCURSES_SUPP) else AC_MSG_ERROR([There is no support for ncurses.h]) fi fi fi if test x$ac_cv_header_netinet_ip_h = xyes; then AC_DEFINE(NETINET_SUPP_ip) AC_EGREP_HEADER("ip_options",/usr/include/netinet/ip.h,is_opt=1,is_opt=0) if test $is_opt = 1; then AC_DEFINE(LINUX_IP_OPTIONS) fi else AC_CHECK_HEADERS(linux/ip.h) if test x$ac_cv_header_linux_ip_h = xyes; then AC_DEFINE(LINUXINET_SUPP_ip) AC_EGREP_HEADER("ip_options",/usr/include/linux/ip.h,is_opt=1,is_opt=0) if test $is_opt = 1; then AC_DEFINE(LINUX_IP_OPTIONS) fi else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for ip.h]) fi fi if test x$ac_cv_header_netinet_ip_tcp_h = xyes; then AC_DEFINE(NETINET_SUPP_ip_tcp) else if test x$ac_cv_header_netinet_tcp_h = xyes; then AC_DEFINE(NETINET_SUPP_tcp) else AC_CHECK_HEADERS(linux/tcp.h) if test x$ac_cv_header_linux_tcp_h = xyes; then AC_DEFINE(LINUXINET_SUPP_tcp) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for tcp.h]) fi fi fi if test x$ac_cv_header_netinet_ip_udp_h = xyes; then AC_DEFINE(NETINET_SUPP_ip_udp) else if test x$ac_cv_header_netinet_udp_h = xyes; then AC_DEFINE(NETINET_SUPP_udp) else AC_CHECK_HEADERS(linux/udp.h) if test x$ac_cv_header_linux_udp_h = xyes; then AC_DEFINE(LINUXINET_SUPP_udp) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for udp.h]) fi fi fi if test x$ac_cv_header_netinet_ip_icmp_h = xyes; then AC_DEFINE(NETINET_SUPP_icmp) else AC_CHECK_HEADERS(linux/icmp.h) if test x$ac_cv_header_linux_icmp_h = xyes; then AC_DEFINE(LINUXINET_SUPP_icmp) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for icmp.h]) fi fi if test x$ac_cv_header_netinet_if_ether_h = xyes; then AC_DEFINE(NETINET_SUPP_if_ether) else AC_CHECK_HEADERS(linux/if_ether.h) if test x$ac_cv_header_linux_if_ether_h = xyes; then AC_DEFINE(LINUXINET_SUPP_if_ether) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for if_ether.h]) fi fi if test x$ac_cv_header_netinet_in_h = xyes; then AC_DEFINE(NETINET_SUPP_in) else AC_CHECK_HEADERS(linux/in.h) if test x$ac_cv_header_linux_in_h = xyes; then AC_DEFINE(LINUXINET_SUPP_in) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for in.h]) fi fi if test x$ac_cv_header_net_if_h = xyes; then AC_DEFINE(NETINET_SUPP_if) else AC_CHECK_HEADERS(linux/if.h) if test x$ac_cv_header_linux_if_h = xyes; then AC_DEFINE(LINUXINET_SUPP_if) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for if.h]) fi fi if test x$ac_cv_header_net_if_ppp_h = xyes; then AC_DEFINE(NETINET_SUPP_if_ppp) else AC_CHECK_HEADERS(linux/if_ppp.h) if test x$ac_cv_header_linux_if_ppp_h = xyes; then AC_DEFINE(LINUXINET_SUPP_if_ppp) else AC_MSG_ERROR([There is no support in standard NETINET/LINUX for if_ppp.h]) fi fi dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T AC_HEADER_TIME dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_TYPE_SIGNAL AC_CHECK_FUNCS(select socket strstr uname) AC_OUTPUT(Makefile Make.common) netdiag-1.2/netwatch-1.3.1-2/core.h000066400000000000000000000000301323731111400164670ustar00rootroot00000000000000#define RESOLVE_MAX 256 netdiag-1.2/netwatch-1.3.1-2/curs.c000066400000000000000000000020431323731111400165140ustar00rootroot00000000000000/* curs.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ #include "config.h" #ifdef NEWCURSES_SUPP #include #else #ifdef NEWCURSESROOT_SUPP #include #else #include #endif #endif #include #include #include "curs.h" #include "netwatch.h" extern int colour; void init_curses () { initscr (); // nodelay (stdscr, TRUE); cbreak (); noecho (); } void cleanup_curses () { echo(); // nodelay(stdscr,FALSE); nocbreak(); endwin (); } void clrportion (int y1, int x1, int y2, int x2) { int i, j; j = x2 - x1; if (j<=0) return; if (y1>y2) return; for (i = y1; i < y2; i++) mvprintw (i, x1, "%*c", j, ' '); return; } void clrscr () { int i; // clear (); attrset (col4); /* for (i = 0; i < MLINES; i++) mvchgat (i, 0, MCOLS, col4, 0, NULL); */ bkgdset(col4); clear(); /* color_set(col4,NULL); */ border (0, 0, 0, 0, 0, 0, 0, 0); refresh (); } netdiag-1.2/netwatch-1.3.1-2/curs.h000066400000000000000000000003471323731111400165260ustar00rootroot00000000000000/* curs.h is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ void init_curses(void); void cleanup_curses(void); void clrscr(void); netdiag-1.2/netwatch-1.3.1-2/dispdata.c000066400000000000000000001257021323731111400173410ustar00rootroot00000000000000/* * itstime.c is part of Statnet NOW dispdata.c for NETWATCH */ /* * Statnet is protected under the GNU Public License (GPL2). * Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) * 27DEC95: Scot E. Wilcoxon (sewilco@fieldday.mn.org) * DISPDATA.C is part of NETWATCH which like Statnet is under GPL2 */ #include "config.h" #include "netwatch.h" #include "curs.h" #include #ifdef NEWCURSES_SUPP #include #else #ifdef NEWCURSESROOT_SUPP #include #else #include #endif #endif #if NETINET_SUPP_icmp #include #else #include #endif #ifdef NETINET_SUPP_in #include #else #include #endif #include #include #include #include #include "semaphore.h" void setupauxscr (int *xoff, int bigscreen); void setupwatch (int bigscreen); extern int show_help; extern int show_watch; extern int destroy_program; extern Semaphore masterdo; EXT_CREATE_LOCK(indisp); EXT_CREATE_LOCK(inrlist); EXT_CREATE_LOCK(inllist); EXT_CREATE_LOCK(resolvechange); void clearnetresolv (); void startnetresolv (); char *inet_ntoa (); #define MAXREFRESH 85 #define ROUTERSTATSMAX 160 #define TOPUPDATE 30 extern long int timezone; extern time_t wakeup_reload; extern int wakeup_state; extern time_t reload_timer_start; extern int reload_timer_sec; extern int reload_active; extern int freezedisplay; extern int lastfreeze; extern int rel_hours, rel_mins; extern int bpsflag; #define MAXDAYROUTE 1440 extern float dayroute[MAXDAYROUTE]; extern int cur_dayroute; extern int routersummary; extern int rdelta; extern int router_offset; extern int autostatus; extern char specconfigfile[]; extern char statsfile[]; extern char mylog[]; extern char ethdevname[]; /* * printf("NETMASK=%u.%u.%u.%u LOCALADDR=%u.%u.%u.%u\n", * netmask[0],netmask[1],netmask[2],netmask[3], * localaddr[0],localaddr[1],localaddr[2],localaddr[3]); getchar(); */ extern unsigned char netmask[]; extern unsigned char localaddr[]; extern int dupcount; extern int isbridge; extern int localcount; extern int remotecount; #define MAXSTATUS 14 #define STATUSSIZE 512 extern char status_lines[MAXSTATUS][STATUSSIZE]; extern int cur_status_line; extern int sentclear; extern int recresolv; extern int timeresolv; extern int sendresolv; extern int errread; extern int errioctl; int internal_loop_count = 0; extern FILE *fpspeclog; extern int speclog; extern int printtospeclog; extern char speclogfile[]; extern int speclogext; extern int curskeyspot; extern int curskeyval; extern int cursllockout; extern int cursrlockout; extern int curslines; extern int curshosttrim; extern int cursproto; extern int cursdest; extern int scrmid; struct itimerval oldtm, newtm; extern int selecthost; extern int numselect; extern int selectside; extern int selectchange; extern int selectside; extern char progtitle[60]; extern int ignoredomain; extern int bluedie; extern int selprob; extern int selcode; extern int sREDTIME, sYELLOWTIME, sGREENTIME; extern long int ethcnt; extern int keycnt; extern int probcnt; extern int intrcnt; extern int nokeys; extern int topflag; extern HOSTINFO *toplocal; extern HOSTINFO *topremote; extern HOSTINFO tldummy, trdummy; #define MAGNABUFSIZE 2048 struct magrec { int len; char dir; unsigned char buf[MAGNABUFSIZE]; }; #define MAGNAMAX 800 #define MAGNAOFFS 40 extern struct magrec magna[MAGNAMAX]; extern int magnacnt; extern int magnaoffs; extern char magnamatch[RESOLVE_MAX]; extern HOSTINFO *magnaspot; extern u_int32_t magnakey; extern int magnaphys; extern int magnafirst; extern int magnafull; extern HOSTINFO *magnacomhost; extern u_int32_t magnacomkey; extern int simchange; extern int simfwdir; extern int simarr[8]; char *simfmt; extern int iseth; extern int nw_logall; extern char nw_allname[256]; extern FILE *nw_fpall; extern int nw_logremote; extern char nw_remname[256]; extern FILE *nw_fprem; extern int nw_loglocal; extern char nw_locname[256]; extern FILE *nw_fploc; extern int nw_logindiv; extern char nw_indivmain[256]; extern int nw_logselect; extern int nw_simulate; extern char nw_simfile[256]; enum { SIMSEC, SIMKEY }; extern int nw_simrate; extern int simkeyrate; extern FILE *simfp; extern int plogselect; extern int plogdeselect; extern int buf_detail; enum { B_ASCII, B_HEADER, B_RAW }; extern int using_fifo; extern int fifoval; extern int movemagnakeyloc; extern int movemagnakeyrem; extern u_int32_t searchaddr; unsigned char *ttp; char *servicenm (char *s, int port) { static char sn[80]; if (s) return (s); sprintf (sn, "UNK %d", port); return (sn); } void makeaddr (char naddr[], char ascii[]); void cleancol (int col, int strow, int finrow) { int i; for (i = strow; i <= finrow; i++) mvaddch (i, col, ' '); } int bad = 0; /* Number of BAD chars... */ void myaddstr (char *s, int size) { int i = 0; while (*s) { if ((*s) != '\\') { addch (*s); i++; if (i == size) break; } else { s++; switch ((*s)) { case '1': attron (col1); break; case '2': attron (col2); break; case '3': attron (col3); break; case '4': attron (col4); break; case '5': attron (col5); break; case '6': attron (col6); break; default: bad++; } } s++; } attron (col4); refresh (); } void print_tcp (unsigned char *dp, unsigned short len, char *s) { struct tcphdr *p = (struct tcphdr *) dp; sprintf (s, "\\3 TCP DPORT:\\2%-5d\\3 SPORT:\\2%-5d\\3 SEQ:\\2%-5d\\3 ACK:\\2%-5d\\3 WINDOW:\\2%-5d\\3 URG \\2%d", ntohs (p->dest), ntohs (p->source), ntohl (p->seq), ntohl (p->ack_seq), ntohs (p->window), ntohs (p->urg_ptr)); } void print_udp (unsigned char *dp, unsigned short len, char *s) { struct udphdr *p = (struct udphdr *) dp; sprintf (s, "\\3UDP DPORT:\\2%5d\\3 SPORT:\\2%5d", ntohs (p->dest), ntohs (p->source)); } void print_icmp (unsigned char *dp, unsigned short len, char *s) { struct icmphdr *p = (struct icmphdr *) dp; sprintf (s, "\\3 ICMP TYPE:\\2%-3d\\3 CODE:\\2%-3d\\3 ID:\\2%-5d\\3 SEQ:\\2%-5d\\3 GATEWAY:\\2%-15s \\3FRAGMTU:\\2%d ", p->type, p->code, ntohs (p->un.echo.id), ntohs (p->un.echo.sequence), inet_ntoa (p->un.gateway), ntohs (p->un.frag.mtu)); } void header_to_scr (char *db, int size, struct magrec *b, int offs) { char *sp = (char *) b->buf; static char darr[20]; char *w; static char sarr[20]; struct iphdr *p; struct in_addr *pa; unsigned char *dp; int i; unsigned int left; int whole; int realfudge; /* if (iseth) Oh... I store only IP packets in magna rec.. sp += ETH_HLEN; */ p = (struct iphdr *) sp; pa = (void *) &p->daddr; w = inet_ntoa (*pa); strncpy (darr, w, 16); pa = (void *) &p->saddr; w = inet_ntoa (*pa); strncpy (sarr, w, 16); sprintf (db, " \\1IP DEST:\\2%-15s\\1 SRC:\\2%-15s\\1 PROTO:\\2%-2d\\1 TTL:\\2%-3d\\1 TOS:\\2%-5d\\1 IHL:\\2%-2d\\1 TOT_LEN:\\2%-5d\\4", darr, sarr, p->protocol, p->ttl, p->tos, p->ihl, ntohs (p->tot_len)); dp = (unsigned char *) p + /*p->ihl */ +sizeof (struct iphdr); left = size /* - p->ihl */ - sizeof (struct iphdr); switch (p->protocol) { case 6: /* TCP */ print_tcp (dp, left, &db[strlen (db)]); break; case 17: /* TCP */ print_udp (dp, left, &db[strlen (db)]); break; case 1: /* TCP */ print_icmp (dp, left, &db[strlen (db)]); break; } whole = strlen (db); if (whole < offs) myaddstr (" ", size); else { /* find out how many '\\' to the left of offs This is THE fudge... */ for (realfudge = 0, i = 0; db[i] && i < offs; i++) { if (db[i] == '\\') realfudge++; } realfudge <<= 1; realfudge = offs - realfudge; if (offs + size >= 1024) db[1023] = 0; myaddstr (&db[realfudge], size); } } void raw_to_scr (char *db, int size, struct magrec *b, int offs) { int i; attron (col2); for (i = 0; i < size; i++) printw ("%02X ", b->buf[offs + i]); attron (col4); } /* Display option controlled by Global Variable... buf_detail = 0 == ASCII or . 1 == TCP/UDP/ICMP Header info 2 == RAW HEX DATA */ void displaybuf (struct magrec *b, int y, int x, int recnum) { static char bform[1024]; int i, len; int scrmid = (MCOLS >> 1) - 8; char *p; char *pfin; int sz; if (magnafull) { scrmid = MCOLS - 8; x = 3; } if (b->len < 0) { move (y, x); printw ("%03d:%05d", recnum, 0); printw (" <** EMPTY **>"); return; } len = b->len - magnaoffs + 1; p = &b->buf[magnaoffs]; move (y, x); printw ("%03d:%05d", recnum, b->len); if (b->len > 0) { if (b->dir) { attron (col1); addch ('>'); attron (col4); } else { attron (col2); addch ('<'); attron (col4); } } switch (buf_detail) { case B_ASCII: if (len > 0) { pfin = p + len; for (i = 9; p < pfin && i < scrmid; i++, p++) { if (isprint (*p)) addch (*p); else addch ('.'); } } break; case B_HEADER: sz = scrmid - 10; header_to_scr (bform, sz, b, magnaoffs); break; case B_RAW: sz = (scrmid - 10) / 3; raw_to_scr (bform, sz, b, magnaoffs); break; } } void dostatus (int sline) { int i; char *s; mvhline (MLINES - 1, 1, ACS_HLINE, MCOLS - 2); move (MLINES - 1, 0); for (s = status_lines[sline], i = 0; *s && i < MCOLS; i++, s++) { if (*s == '~') move (MLINES - 1, i + 1); /* move right */ else addch (*s); } } void addtlist (HOSTINFO * rec, HOSTINFO * start) { HOSTINFO *current, *previous; previous = start; current = start->tflink; while (current != start && current->timelastbytes > rec->timebytes) { previous = current; current = current->tflink; } previous->tflink = rec; rec->tflink = current; } void dispdata (int errnum) { int xleft = 1; /* * Offset for Local Info */ int xright; int y; static char tmbuf[80]; static char tmpbuf[512]; static int refreshscr = 0; static int routerstats = 0; extern double maxburst; extern double absmaxburst; static time_t bursttime; static char burst[512]; static time_t routertime; static unsigned long int oldrouteruse = 0; static unsigned long int oldrouterto = 0; static unsigned long int oldrouterfrom = 0; unsigned long int tfuse; unsigned long int ttuse; unsigned long int ttotal; static unsigned long int minfuse; static unsigned long int mintuse; static unsigned long int sec; static unsigned long int use; double fuse; extern unsigned long int routeruse; int lcnt = 0; int rcnt = 0; static char ttt[512]; static char thost[256]; static int statsonce = FALSE; static int disableburst = FALSE; int yact; unsigned char *pc; extern int help; extern int watch; extern int llockout; extern int rlockout; extern int lydisp; extern int rydisp; extern int localkey; extern int localupdate; extern int remoteupdate; extern int refreshloc; extern int refreshrem; extern int poschange; extern int disprouterstats; extern unsigned long routerto; extern unsigned long routerfrom; extern unsigned long routeruse; static unsigned long orouterto = 0; static unsigned long orouterfrom = 0; int localbypass = FALSE; int remotebypass = FALSE; time_t mnew; static time_t oldmnew = 0L; time_t rs; extern time_t starttime; extern int dispopt; /* * TXRC IPPROTO OTHER */ int updaterest = 0; int xoff; int ii, ij; int dispsize, stmag; struct tm *ptm; extern time_t actstart; time_t colred, colyel, colgreen, testt; extern HOSTINFO *lfirst; extern HOSTINFO *rfirst; HOSTINFO *current; HOSTINFO *pwork; char *tmpservice; static char emptystr[] = ""; static char simstr[20]; static time_t toptime = 0L; int dotop = 0; int topupdate = FALSE; int oldk; int yh, ybase, maxlines, num_rsum, ic; static float rsum[40]; static int laststatsonce = -1; int nspot; int step5; int width; long int ntop=0; int val; do { LOCK(indisp); if (nw_simulate) mnew = actstart; else mnew = time (0); if (mnew > toptime) { topupdate = TRUE; ntop++; toptime = mnew + TOPUPDATE; oldmnew = mnew; if (topflag) dotop = TRUE; } rs = mnew - oldmnew; if (printtospeclog && speclog) { strcpy (tmpbuf, ctime (&mnew)); fprintf (fpspeclog, "\nStatistics\tfrom %s\t\t to %s\n\n", ctime (&starttime), tmpbuf); } if (show_watch) { setupwatch(magnafull); show_watch = FALSE; } if (show_help) { setuphelp(); show_help = FALSE; } localbypass = (!localkey && (watch || help)); remotebypass = (localkey && (watch || help)); colred = mnew - sREDTIME; /* * 1 min */ colyel = mnew - sYELLOWTIME; /* * 5 min */ colgreen = mnew - sGREENTIME; /* * 30 min */ scrmid = MCOLS >> 1; xright = scrmid + 1; /* mvprintw(0,12,"REC=%d TM=%d IO=%d RD=%d SND=%d",recresolv,timeresolv, errioctl, errread, sendresolv); */ if (!llockout && !rlockout && wakeup_state && wakeup_reload < mnew) { wakeup_state = FALSE; reload_active = TRUE; } if (reload_active) { if (!llockout && !rlockout && mnew >= reload_timer_start + reload_timer_sec) { reload_timer_start = mnew; reload_active++; /* mvprintw(24,5,"RELOAD=%03d SENTCLEAR=%d",reload_active,sentclear); refresh(); */ nokeys = TRUE; //mvprintw (0, 60, "NO KEYS"); //refresh (); clearnetresolv (); dokeyin ('l'); dokeyin ('c'); oldk = localkey; localkey = FALSE; dokeyin ('n'); /* mvprintw(0,12,"REC=%d TM=%d IO=%d RD=%d SND=%d",recresolv,timeresolv, errioctl, errread, sendresolv); */ recresolv = timeresolv = errioctl = errread = sendresolv = 0; ethcnt = 0; /* MASTER COUNT IS ZEROED!!!! */ startnetresolv (); nokeys = FALSE; mvprintw (0, 60, " KEYS"); refresh (); localkey = oldk; } } /* mvprintw(24,5,"RELOAD=%03d SENTCLEAR=%d",reload_active,sentclear); refresh(); */ //signal (SIGALRM, dispdata); // newtm.it_value.tv_sec = 1; // newtm.it_value.tv_usec = 0; // setitimer (ITIMER_REAL, &newtm, &oldtm); /* * first screen update in * 1 sec (exact) */ if (poschange) lcnt = 0; if (!routerstats) routertime = mnew; routerstats++; //if (routerstats == ROUTERSTATSMAX) //ROUTER STATS..... if (topupdate) // Align stats with 30 sec top flag.... { if (ntop & 1) { statsonce++; //sec = mnew - routertime; sec = TOPUPDATE << 1; // Once a minute.... use = routeruse - oldrouteruse; mintuse = routerto - oldrouterto; minfuse = routerfrom - oldrouterfrom; routertime = mnew; oldrouteruse = routeruse; oldrouterto = routerto; oldrouterfrom = routerfrom; /* * CALC STATS for ROUTER use = # of bytes thru router in "sec" * seconds */ fuse = (double) (use >> 2) / sec; dayroute[cur_dayroute++] = (float) fuse; if (cur_dayroute >= MAXDAYROUTE) cur_dayroute = 0; if (!freezedisplay) sprintf (&status_lines[0][scrmid - 12], " ROUTER %13.3g kbits/sec ", fuse); routerstats = 0; } } xoff = 1; tfuse = routerfrom - orouterfrom; ttuse = routerto - orouterto; ttotal = tfuse + ttuse; fuse = (double) (ttotal >> 7); if (!lastfreeze && !disableburst && fuse > absmaxburst) absmaxburst = fuse; if (!lastfreeze && !disableburst && fuse > maxburst) { maxburst = fuse; bursttime = mnew; strcpy (burst, ctime (&bursttime)); burst[strlen (burst) - 1] = 0; } if (disableburst) disableburst = FALSE; if (freezedisplay) { lastfreeze = TRUE; UNLOCK(indisp); while (semaphore_down(&masterdo)>0); uthread_wait(1000); continue; } lastfreeze = FALSE; // mvprintw (2, (xright + 5), "LOOP COUNTER=%07d",internal_loop_count); // refresh(); if (rewrite_labels || (printtospeclog && speclog)) { /* * if * rewrite_labels */ clrportion (1, 1, 4, MCOLS - 1); mvprintw (0, 12, "%s", progtitle); mvprintw (1, MCOLS - (MCOLS) / 3, "REMOTE NETWORK"); mvprintw (1, (MCOLS - 22) / 4, "LOCAL NETWORK"); switch (dispopt) { case DISP_TX_RC: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS - 21), "(PKTS) X R"); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid - 21), "(PKTS) X R"); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST (PKTS) X R\n\n"); break; case DISP_IPPROTO: case DISP_IPPROTON: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " IP SERVICE"); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " IP SERVICE"); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST IP SERVICE\n\n"); break; case DISP_DEST2: case DISP_DEST1: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " TALKING TO "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " TALKING TO "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST TALKING TO\n\n"); break; case DISP_ACCT: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-24), "(BYTES) X R"); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-24), "(BYTES) X R"); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST (BYTES) X R\n\n"); break; case DISP_INTTXRCP: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-22), "LOCAL PKTS X R"); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-22), "LOCAL PKTS X R"); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST LOCAL PKTS X R\n\n"); break; case DISP_EXTTXRCP: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), "REM. PKTS X R"); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), "REM. PKTS X R"); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST REM. PKTS X R\n\n"); break; case DISP_INTTXRC: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-28), "LOCAL BYTES X R "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-28), "LOCAL BYTES X R "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST LOCAL BYTES X R\n\n"); break; case DISP_EXTTXRC: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-28), "REM. BYTES X R "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-28), "REM. BYTES X R "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST REM. BYTES X R\n\n"); break; case DISP_MAC: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " MAC ADDRESS "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " MAC ADDRESS "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST MAC ADDRESS \n\n"); break; case DISP_BADMAC: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-22), "BAD MAC ADDRESS "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-22), "BAD MAC ADDRESS "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST MAC ADDRESS \n\n"); break; case DISP_SERVER: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " HTTP SERVER "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " HTTP SERVER "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST HTTP SERVER\n\n"); break; case DISP_FTPSERVER: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " FTP SERVER "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " FTP SERVER "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST FTP SERVER\n\n"); break; case DISP_LASTINTERVAL: if (bpsflag) { mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " INTERVAL kbps "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21)," INTERVAL kbps "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST INTERVAL kbps \n\n"); } else { mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " INTERVAL BYTES "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21)," INTERVAL BYTES "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST INTERVAL BYTES\n\n"); } break; case DISP_LASTLIVEINT: if (bpsflag) { mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " LIVE INT. kbps "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21)," LIVE INT. kbps "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST LIVE INT. kbps \n\n"); } else { mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21)," LIVE INT. BYTES "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21)," LIVE INT. BYTES "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST LIVE INT. BYTES\n\n"); } break; case DISP_LASTGET: mvprintw (2, (xright + 5), "HOST"); mvprintw (2, (MCOLS-21), " LAST GET "); mvprintw (2, (xleft + 5), "HOST"); mvprintw (2, (scrmid-21), " LAST GET "); if (printtospeclog && speclog) fprintf (fpspeclog, "HOST LAST GET\n\n"); break; } refresh (); rewrite_labels = 0; } switch (cur_status_line) { case 0: sprintf (&status_lines[0][MCOLS - 15], " Eth:%8ld ", ethcnt); status_lines[0][strlen (status_lines[0])] = '~'; break; case 1: break; case 2: break; case 3: break; case 4: sprintf (&status_lines[4][3], " NETRESOLV Stats Sent=%5d Received=%5d NoName=%5d", sendresolv, recresolv, timeresolv); break; case 5: sprintf (&status_lines[5][3], " NUMBER of HOSTS --> Local Hosts: %5d Remote Hosts: %5d ", localcount, remotecount); break; case 6: if (reload_active) { sprintf (&status_lines[6][3], " Reloading ACTIVE at %02d:%02d INTERVAL %3d minutes Reload Count = %5d %d ", rel_hours, rel_mins, reload_timer_sec / 60, reload_active, sentclear); } else if (wakeup_state) { sprintf (&status_lines[6][3], " Reloading WAKEUP at %02d:%02d INTERVAL %3d minutes Reload Count = %5d ", rel_hours, rel_mins, reload_timer_sec / 60, reload_active); } else sprintf (&status_lines[6][3], " < NO RELOADING INITIALIZED >"); break; case 7: sprintf (&status_lines[7][3], " Stats Base File (Reload & L Command): %s ", statsfile); break; case 8: sprintf (&status_lines[8][3], " NETWATCH Configuration File: %s ", specconfigfile); break; case 9: sprintf (&status_lines[9][3], " Log file (" "P" " Command): %s ", mylog); break; case 10: sprintf (&status_lines[10][3], " Watch %8s with NETMASK=%u.%u.%u.%u HOST=%u.%u.%u.%u ", ethdevname, netmask[0], netmask[1], netmask[2], netmask[3], localaddr[0], localaddr[1], localaddr[2], localaddr[3]); break; case 11: break; case 12: if (isbridge) sprintf (&status_lines[12][3], "REPEATS=%d", dupcount); else sprintf (&status_lines[12][3], "USING FIFO=%d FIFOVAL=%d", using_fifo, fifoval); break; default: cur_status_line = 0; } dostatus (cur_status_line); if (localkey) { attron (col2); mvprintw (1, 1, "KEY"); attron (col4); mvprintw (1, curskeyval, " "); } else { attron (col4); mvprintw (1, 1, " "); attron (col2); mvprintw (1, curskeyval, "KEY"); attron (col4); } ptm = localtime (&mnew); strftime (tmbuf, 30, "%c", ptm); mvprintw (0, curslines - 25, "%s", tmbuf); mvprintw (0, curslines, "LINE %3d ", rydisp); mvprintw (0, 2, "LINE %3d ", lydisp); if (simchange) { move (0, scrmid - 3); sprintf (simstr, simfmt, simarr[0], simarr[1], simarr[2], simarr[3], ACS_BLOCK, simarr[4], simarr[5], simarr[6]); myaddstr (simstr, 7); simchange = FALSE; } if (watch) { if (disprouterstats) { if (localkey) xoff = scrmid + 1; width = MCOLS - scrmid - 7; if (routersummary) { mvprintw (6, xoff + 2, "( %2d min. summary Offset: %4d)", rdelta, router_offset); if (laststatsonce != statsonce || (localkey && refreshrem) || (!localkey && refreshloc)) { mvprintw (5, xoff + 10, "ROUTER SUMMARY CHART"); clrportion (7, xoff + 2, MLINES - 4, xoff + width + 2); /* RDELTA defaults to 60 minute summaries */ num_rsum = 0; rsum[num_rsum] = 0.0; ii = cur_dayroute - 1 - router_offset; if (ii < 0) ii -= MAXDAYROUTE; for (ic = 0; ii != cur_dayroute; ii--) { if (ii < 0) ii = MAXDAYROUTE - 1; if (dayroute[ii] >= 0.0) { rsum[num_rsum] += dayroute[ii]; ic++; if (ic >= rdelta) { ic = 0; num_rsum++; rsum[num_rsum] = 0.0; } } else break; } mvprintw (7, xoff + 12, "TOP: %4d kbps", (int) absmaxburst); attron (col2); ybase = MLINES - 4; maxlines = MLINES - 11; for (ii = 0; ii < num_rsum && ii < width; ii++) { yh = (int) (rsum[ii] / rdelta / absmaxburst * maxlines) + 1; if ((ii % 10) < 5) attron (col2); else attron (col3); nspot = xoff + width - ii + 1; mvvline (ybase - yh, nspot, ACS_VLINE, yh); mvprintw (ybase, nspot, "%d", ii % 10); } attron (col4); step5 = (int) (absmaxburst / maxlines * 4.0 + 0.5); for (ii = 5, ic = step5; ii < maxlines; ii += 5, ic += step5) { mvprintw (ybase - ii, xoff + 2, "%d", ic); } } } else { mvprintw (6, xoff + 10, "ROUTER STATS BYTES"); mvprintw (8, xoff + 3, "Over 1 second period:"); mvprintw (13, xoff + 3, "Over 1 minute period:"); mvprintw (9, xoff + 3, " Incoming: %8lu", tfuse); mvprintw (10, xoff + 3, " Outgoing: %8lu", ttuse); mvprintw (11, xoff + 3, " Total: %8lu", ttotal); mvprintw (11, xoff + 22, "(%5.1f kbps)", fuse); if (statsonce) { mvprintw (14, xoff + 3, " Incoming: %8lu", minfuse); mvprintw (15, xoff + 3, " Outgoing: %8lu", mintuse); mvprintw (16, xoff + 3, " Total: %8lu", use); } else mvprintw (15, xoff + 3, " N/A"); if (maxburst > 1.0) { mvprintw (18, xoff + 3, " MAX. BURST: %5.1f kbps", maxburst); mvprintw (19, xoff + 3, " at %s", burst); } } } else if (selecthost) { if (magnafull) { xoff = 1; clrportion (6, xoff + 3, MLINES - 4, MCOLS - 3); } else { if (localkey) { xoff = scrmid + 1; clrportion (6, xoff + 3, MLINES - 4, MCOLS - 3); } else { xoff = 1; clrportion (6, xoff + 3, MLINES - 4, scrmid - 3); } } mvprintw (6, xoff + 4, "TRACE %s", magnamatch); mvprintw (7, xoff + 10, "Offset = %3d", magnaoffs); if (magnafull) { if (magnacomhost == NULL) { pc = (unsigned char *) magnaspot->othaddr; mvprintw (7, MCOLS - 50, "Communicating with %u.%u.%u.%u", pc[0], pc[1], pc[2], pc[3]); } else { LOCK(resolvechange); mvprintw (7, MCOLS - 50, "Communicating with %s", magnacomhost->name); UNLOCK(resolvechange); /* mvprintw (6, MCOLS - 40, "SERVICES LOC %s REM %s", servicenm (magnaspot->servicename, magnaspot->port), */ /* servicenm (magnacomhost->servicename, magnacomhost->port)); */ } mvprintw (6, MCOLS - 40, "SERVICES LOC %s REM %s", servicenm (magnaspot->servicename, magnaspot->port), servicenm (magnaspot->oth_sn, magnaspot->oth_port)); } dispsize = MLINES - 13; if (dispsize > 0) { stmag = magnaphys - dispsize; if (stmag < 0) stmag += MAGNAMAX; for (ii = 0, ij = stmag; ii < dispsize; ii++) { displaybuf (&magna[ij], 9 + ii, xoff + 2, ij); ij++; if (ij == MAGNAMAX) ij = 0; } } } } laststatsonce = statsonce; orouterfrom = routerfrom; orouterto = routerto; refreshscr++; if (refreshscr > MAXREFRESH) { poschange = 1; refreshscr = 0; } if (printtospeclog) { if (localkey) { refreshloc = TRUE; refreshrem = FALSE; } else { refreshrem = TRUE; refreshloc = FALSE; } } if (poschange) { refreshloc = refreshrem = TRUE; } if (bluedie == 1) { refreshloc = refreshrem = TRUE; bluedie += 2; } if (ignoredomain == 1) { refreshrem = TRUE; ignoredomain += 2; } if (magnafull) { localbypass = remotebypass = TRUE; } if (refreshloc && !localbypass) clrportion (4, 1, MLINES - 1, scrmid); if (refreshrem && !remotebypass) clrportion (4, scrmid + 1, MLINES - 1, MCOLS - 1); if (!magnafull && (selectchange || refreshloc || refreshrem)) { cleancol (xright - 1, 4, MLINES - 2); if (selectside) mvaddch (numselect + 4, xright - 1, ACS_LARROW); else mvaddch (numselect + 4, xright - 1, ACS_RARROW); } /* Construct the List of HEAVY HITTERS for 2 minute periods */ if (dotop || topupdate) { dotop = FALSE; LOCK(inllist); toplocal = &tldummy; toplocal->tflink = toplocal; current = lfirst->flink; while (current != lfirst) { if (current->tstamp > colred) addtlist (current, toplocal); current->timelastbytes = current->timebytes; current->timebytes = 0; current = current->flink; } UNLOCK(inllist); LOCK(inrlist); topremote = &trdummy; topremote->tflink = topremote; current = rfirst->flink; while (current != rfirst) { if (current->tstamp > colred) addtlist (current, topremote); current->timelastbytes = current->timebytes; current->timebytes = 0; current = current->flink; } topupdate = FALSE; UNLOCK(inrlist); } if (!localbypass && !llockout && (localupdate || refreshloc)) { mvaddch (3, 0, ACS_VLINE); lcnt = 0; LOCK(inllist); current = lfirst->flink; pwork = lfirst; if (topflag) { current = toplocal->tflink; pwork = toplocal; } if (magnaspot == NULL) magnaspot = current; while (current != pwork) { y = lcnt; if (movemagnakeyloc) { if (*(u_int32_t *) current->addr == htonl (searchaddr)) { lydisp = y; movemagnakeyloc = FALSE; } else { lcnt++; if (topflag) current = current->tflink; else current = current->flink; continue; } } if ((!current->pktcntsend && !current->pktcntrec) || (current->tstamp < colgreen && bluedie)) { if (topflag) current = current->tflink; else current = current->flink; continue; } lcnt++; yact = y - lydisp; if (yact >= 0 && yact < MLINES - 5 || printtospeclog) { if (!printtospeclog) yact += 4; if (refreshloc || updaterest || current->update) { LOCK(resolvechange); strncpy (thost, current->name, curshosttrim); UNLOCK(resolvechange); if (selecthost && magnakey && magnakey == *((u_int32_t *) current->addr)) { if (plogselect) { current->plogactive++; current->plogactive &= 1; plogselect = 0; } if (plogdeselect) { current->plogactive = FALSE; plogdeselect = 0; } } if (selectchange && selecthost && numselect + 4 == yact) { magnakey = *((u_int32_t *) current->addr); LOCK(resolvechange); strncpy (magnamatch, current->name, RESOLVE_MAX); UNLOCK(resolvechange); magnaspot = current; magnacomhost = NULL; magnacomkey = *((u_int32_t *) current->othaddr); magnafirst = TRUE; selectchange = FALSE; } thost[curshosttrim] = 0; testt = current->tstamp; if (testt > colred) { attron (col1); if (current->telnet_in) attron (col5); if (current->update == 3) { ttp = current->badmac; sprintf (ttt, "IP %s with BAD MAC = %02x:%02x:%02x:%02x:%02x:%02x", thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); sprintf (&status_lines[3][3], "%s", ttt); if (autostatus) cur_status_line = 3; attron (col5); } } else { current->telnet_in = 0; if (testt > colyel) attron (col2); else if (testt > colgreen) { if (current->plog > 0) close (current->plog); attron (col3); } else attron (col4); } if (current->plogactive) attron (col6); switch (dispopt) { case DISP_TX_RC: sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->pktcntsend, current->pktcntrec); break; case DISP_INTTXRCP: sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->intpktcntsend, current->intpktcntrec); break; case DISP_EXTTXRCP: sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->extpktcntsend, current->extpktcntrec); break; case DISP_IPPROTO: thost[cursproto] = 0; sprintf (ttt, "%*s %8s %10s ", -cursproto, thost, current->ip_pr, servicenm (current->servicename, current->port)); break; case DISP_IPPROTON: thost[cursdest] = 0; sprintf (ttt, "%*s %8s %5d ", -cursdest, thost, current->ip_pr, current->port); break; case DISP_DEST1: pc = (unsigned char *) current->othaddr; thost[cursdest] = 0; sprintf (ttt, "%*s %u.%u.%u.%u ", -cursdest, thost, pc[0], pc[1], pc[2], pc[3]); break; case DISP_DEST2: pc = (unsigned char *) current->othaddr; makeaddr (current->addr, thost); thost[cursdest] = 0; sprintf (ttt, "%*s %u.%u.%u.%u ", -cursdest, thost, pc[0], pc[1], pc[2], pc[3]); break; case DISP_ACCT: thost[cursproto] = 0; sprintf (ttt, "%*s %10lu %10lu", -cursproto, thost, current->sendbytes, current->recbytes); break; case DISP_EXTTXRC: thost[cursproto] = 0; sprintf (ttt, "%*s %10lu %10lu", -cursproto, thost, current->extsendbytes, current->extrecbytes); break; case DISP_INTTXRC: thost[cursproto] = 0; sprintf (ttt, "%*s %10lu %10lu", -cursproto, thost, current->intsendbytes, current->intrecbytes); break; case DISP_MAC: thost[cursproto] = 0; ttp = current->mac; sprintf (ttt, "%*s %02x:%02x:%02x:%02x:%02x:%02x", -cursproto, thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); break; case DISP_BADMAC: thost[cursproto] = 0; ttp = current->badmac; sprintf (ttt, "%*s %02x:%02x:%02x:%02x:%02x:%02x", -cursproto, thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); break; case DISP_SERVER: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->server); break; case DISP_FTPSERVER: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->ftpserver); break; case DISP_LASTINTERVAL: thost[cursdest] = 0; if (bpsflag) { sprintf (ttt, "%*s %15.2lf", -cursdest, thost, current->timelastbytes / (double) TOPUPDATE * 0.008); } else { sprintf (ttt, "%*s %15lu", -cursdest, thost, current->timelastbytes); } break; case DISP_LASTLIVEINT: thost[cursdest] = 0; if (bpsflag) { sprintf (ttt, "%*s %15.2lf", -cursdest, thost, current->timebytes / (double) rs * 0.008); } else { sprintf (ttt, "%*s %15lu", -cursdest, thost, current->timebytes); } break; case DISP_LASTGET: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->lastget); break; } ttt[scrmid - 2] = 0; if (printtospeclog && speclog) fprintf (fpspeclog, "%s\n", ttt); else //!!mvprintw (yact, xleft, "%s",ttt); mvprintw (yact, xleft, ttt); attron (col4); if (current->update) { if (current->update == 1) updaterest = 1; current->update = 0; } } } else { if (yact < 0) mvaddch (3, 0, ACS_UARROW); else mvaddch (3, 0, ACS_DARROW); } if (topflag) current = current->tflink; else current = current->flink; } localupdate = 0; UNLOCK(inllist); } if (!remotebypass && !rlockout && (remoteupdate || refreshrem)) { mvaddch (3, MCOLS - 1, ACS_VLINE); rcnt = 0; LOCK(inrlist); current = rfirst->flink; pwork = rfirst; if (topflag) { current = topremote->tflink; pwork = topremote; } if (magnaspot == NULL) magnaspot = current; while (current != pwork) { y = rcnt; tmpservice = current->servicename; if (!tmpservice) tmpservice = emptystr; if (movemagnakeyrem) { if (*(u_int32_t *) current->addr == htonl (searchaddr)) { rydisp = y; movemagnakeyrem = FALSE; } else { rcnt++; if (topflag) current = current->tflink; else current = current->flink; continue; } } if ((!current->pktcntsend && !current->pktcntrec) || (current->tstamp < colgreen && bluedie) || (ignoredomain && !strcmp (tmpservice, "domain"))) { if (topflag) current = current->tflink; else current = current->flink; continue; } rcnt++; yact = y - rydisp; if ((yact >= 0 && yact < MLINES - 5) || printtospeclog) { if (!printtospeclog) yact += 4; if (refreshrem || updaterest || current->update) { LOCK(resolvechange); strncpy (thost, current->name, curshosttrim); UNLOCK(resolvechange); if (selecthost && magnakey && magnakey == *((u_int32_t *) current->addr)) { if (plogselect) { current->plogactive = TRUE; plogselect = 0; } if (plogdeselect) { current->plogactive = FALSE; plogdeselect = 0; } } if (selectchange && selecthost && numselect + 4 == yact) { magnakey = *((u_int32_t *) current->addr); LOCK(resolvechange); strncpy (magnamatch, current->name, RESOLVE_MAX); UNLOCK(resolvechange); magnaspot = current; magnacomhost = NULL; magnacomkey = *((u_int32_t *) current->othaddr); magnafirst = TRUE; selectchange = FALSE; } thost[curshosttrim] = 0; testt = current->tstamp; if (testt > colred) { attron (col1); if (current->telnet_in) attron (col5); if (current->update == 3) { ttp = current->badmac; sprintf (ttt, "IP %s with BAD MAC = %02x:%02x:%02x:%02x:%02x:%02x", thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); if (printtospeclog && speclog) fprintf (fpspeclog, "%s\n", ttt); else mvprintw (MLINES - 1, 2, "%s",ttt); attron (col5); } } else { current->telnet_in = 0; if (testt > colyel) attron (col2); else if (testt > colgreen) { if (current->plog > 0) close (current->plog); attron (col3); } else attron (col4); } if (current->plogactive) attron (col6); switch (dispopt) { case DISP_TX_RC: case DISP_INTTXRCP: case DISP_EXTTXRCP: sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->pktcntsend, current->pktcntrec); break; case DISP_IPPROTO: thost[cursproto] = 0; sprintf (ttt, "%*s %8s %10s ", -cursproto, thost, current->ip_pr, servicenm (current->servicename, current->port)); break; case DISP_IPPROTON: thost[cursdest] = 0; sprintf (ttt, "%*s %8s %5d ", -cursdest, thost, current->ip_pr, current->port); break; case DISP_DEST1: pc = (unsigned char *) current->othaddr; thost[cursdest] = 0; sprintf (ttt, "%*s %u.%u.%u.%u ", -cursdest, thost, pc[0], pc[1], pc[2], pc[3]); break; case DISP_DEST2: pc = (unsigned char *) current->othaddr; makeaddr (current->addr, thost); thost[cursdest] = 0; sprintf (ttt, "%*s %u.%u.%u.%u ", -cursdest, thost, pc[0], pc[1], pc[2], pc[3]); break; case DISP_ACCT: case DISP_EXTTXRC: case DISP_INTTXRC: thost[cursproto] = 0; sprintf (ttt, "%*s %10lu %10lu", -cursproto, thost, current->sendbytes, current->recbytes); break; case DISP_MAC: thost[cursproto] = 0; ttp = current->mac; sprintf (ttt, "%*s %02x:%02x:%02x:%02x:%02x:%02x", -cursproto, thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); break; case DISP_BADMAC: thost[cursproto] = 0; ttp = current->badmac; sprintf (ttt, "%*s %02x:%02x:%02x:%02x:%02x:%02x", -cursproto, thost, ttp[0], ttp[1], ttp[2], ttp[3], ttp[4], ttp[5]); break; case DISP_SERVER: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->server); break; case DISP_FTPSERVER: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->ftpserver); break; case DISP_LASTINTERVAL: thost[cursdest] = 0; if (bpsflag) { sprintf (ttt, "%*s %15.2lf", -cursdest, thost, current->timelastbytes / (double) TOPUPDATE * 0.008); } else { sprintf (ttt, "%*s %15lu", -cursdest, thost, current->timelastbytes); } break; case DISP_LASTLIVEINT: thost[cursdest] = 0; if (bpsflag && rs) { sprintf (ttt, "%*s %15.2lf", -cursdest, thost, current->timebytes / (double) rs * 0.008); } else { sprintf (ttt, "%*s %15lu", -cursdest, thost, current->timebytes); } break; case DISP_LASTGET: thost[cursproto] = 0; sprintf (ttt, "%*s %-25s", -cursproto, thost, current->lastget); break; } ttt[scrmid - 2] = 0; if (printtospeclog) fprintf (fpspeclog, "%s\n", ttt); else //!!mvprintw (yact, xright,"%s", ttt); mvprintw (yact, xright, ttt); attron (col4); if (current->update) { if (current->update == 1) updaterest = 1; current->update = 0; } } } else { if (yact < 0) mvaddch (3, MCOLS - 1, ACS_UARROW); else mvaddch (3, MCOLS - 1, ACS_DARROW); } if (topflag) current = current->tflink; else current = current->flink; } remoteupdate = 0; UNLOCK(inrlist); } poschange = 0; refresh (); if (printtospeclog && speclog && !llockout && !rlockout) { printtospeclog = FALSE; fclose (fpspeclog); speclogext++; sprintf (ttt, "%s.%03d", speclogfile, speclogext); fpspeclog = fopen (ttt, "w"); } UNLOCK(indisp); while (semaphore_down(&masterdo)>0); // semaphore_down (&masterdo); uthread_wait(1000); internal_loop_count++; } while (!destroy_program); clrscr(); } netdiag-1.2/netwatch-1.3.1-2/gh.c000066400000000000000000000053721323731111400161460ustar00rootroot00000000000000/* Call Home... only if the user has not run the software before... ~/.netwatch indicates the user has run the software before... Only info returned home is DNSname / address / machine type (i386 etc..) and Netwatch version... This is a UDP send... no block... Just to give an indication of popularity ( or lack of ) */ #include "config.h" #include #include #include #ifdef NETINET_SUPP_in #include #else #include #endif #include #include #include #include #include #define MAGIC_PORT 20200 static char hc[] = {72, 1,214,4}; static int x = 0; static char s[256]; static struct utsname utsbf; static char d[] = {'s', 't', 'h', 'e'}; static char home[256]; static char testname[128]; static char lhostname[80]; extern char *version; extern unsigned char localaddr[4]; int gh (int opt) { FILE *fp; static int nouse = 0; static int callcount = 0; int sock; FILE *pp; int i; struct sockaddr_in name; struct hostent *mh; char maddr[40]; char saddr[256]; char *hostp; char *homep; callcount++; if ((hostp = getenv ("HOSTNAME")) == NULL) strcpy (lhostname, "LOCAL"); else strncpy (lhostname, hostp, 79); if (!nouse) { if ((homep = getenv ("HOME")) == NULL) strcpy (home, "/"); else strncpy (home, homep, 256); strcpy (testname, home); strcat (testname, "/.netwatch."); strcat (testname, version); if ((fp = fopen (testname, "r")) != NULL) { fclose (fp); nouse++; if (callcount == 1) return (0); } else { fp = fopen (testname, "w"); fclose (fp); } } else return (0); mh = gethostent (); if (mh == 0) return (2); bcopy (mh->h_addr, maddr, mh->h_length); sock = socket (AF_INET, SOCK_DGRAM, 0); if (sock < 0) { perror ("GH"); return (1); } for (i = 0; i < 4; i++) hc[i] ^= x; bcopy (hc, &name.sin_addr, 4); name.sin_family = AF_INET; name.sin_port = htons (MAGIC_PORT); s[0] = d[opt]; s[1] = ' '; pp = popen("hostname --fqdn","r"); if (pp!=NULL) { fgets(saddr,256,pp); sprintf(&s[2],"Rpm:%s %s",version,saddr); pclose(pp); } else { if (uname(&utsbf)<0) { sprintf (saddr, "%u.%u.%u.%u Ver Rpm:%s with %s", maddr[0], maddr[1], maddr[2], maddr[3], version, lhostname); } else #ifdef __USE_GNU sprintf(saddr,"%s.%s %s",utsbf.nodename,utsbf.domainname,utsbf.machine); #else sprintf(saddr,"%s.%s %s",utsbf.nodename,utsbf.__domainname,utsbf.machine); #endif sprintf (&s[2], "%s <%s> Host:%s \n", mh->h_name, saddr, lhostname); } sendto (sock, s, strlen (s), 0, (struct sockaddr *) &name, sizeof (name)); close (sock); return (0); } netdiag-1.2/netwatch-1.3.1-2/header_patch000066400000000000000000000010011323731111400177170ustar00rootroot00000000000000*** /hda6/home/mackay/NET/netwatch-1.0c/netwatch.h 2001-02-20 20:07:21.000000000 -0500 --- netwatch.h 2007-10-22 09:01:31.000000000 -0400 *************** *** 36,45 **** --- 36,46 ---- #define SN_PROT_SLIP 162 /* Pseudo protocol for SLIP */ #define SN_PROT_PPP 163 /* Pseudo protocol for PPP */ #define SN_PROT_LOOP 164 /* Pseudo protocol for Loopback */ #include + #include "config.h" /* #ifdef NETINET_SUPP_socket #include #else #include netdiag-1.2/netwatch-1.3.1-2/hm000066400000000000000000000000201323731111400157140ustar00rootroot00000000000000%setup -q -a 1 netdiag-1.2/netwatch-1.3.1-2/icmp.awk000066400000000000000000000007551323731111400170400ustar00rootroot00000000000000$2 ~ /----------------/ { start = 1 } $1 ~ /41-255/{ exit } $1=="#" { com++; } start==1 { fstart = 2; if ($1 == "#") next comment = $fstart for (i=fstart+1;i<=NF;i++) { if (substr($i,1,1)!= "[") comment = comment "-" $i else break } if (comment == "Unassigned") comment = "UNK " $1 if ($1 > maxport) maxport = $1 printf "strncpy(icmp_types[%d],\"%s\",SN_PORT_TYPE_LEN);\n",$1,comment > "icmp.gen" } END{ print "#define ICMPMAX " maxport > "icmpdefs.gen" } netdiag-1.2/netwatch-1.3.1-2/icmp.gen000066400000000000000000000037411323731111400170250ustar00rootroot00000000000000strncpy(icmp_types[0],"-----------------------------------",SN_PORT_TYPE_LEN); strncpy(icmp_types[0],"Echo-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[1],"UNK 1",SN_PORT_TYPE_LEN); strncpy(icmp_types[2],"UNK 2",SN_PORT_TYPE_LEN); strncpy(icmp_types[3],"Destination-Unreachable",SN_PORT_TYPE_LEN); strncpy(icmp_types[4],"Source-Quench",SN_PORT_TYPE_LEN); strncpy(icmp_types[5],"Redirect",SN_PORT_TYPE_LEN); strncpy(icmp_types[6],"Alternate-Host-Address",SN_PORT_TYPE_LEN); strncpy(icmp_types[7],"UNK 7",SN_PORT_TYPE_LEN); strncpy(icmp_types[8],"Echo",SN_PORT_TYPE_LEN); strncpy(icmp_types[9],"Router-Advertisement",SN_PORT_TYPE_LEN); strncpy(icmp_types[10],"Router-Solicitation",SN_PORT_TYPE_LEN); strncpy(icmp_types[11],"Time-Exceeded",SN_PORT_TYPE_LEN); strncpy(icmp_types[12],"Parameter-Problem",SN_PORT_TYPE_LEN); strncpy(icmp_types[13],"Timestamp",SN_PORT_TYPE_LEN); strncpy(icmp_types[14],"Timestamp-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[15],"Information-Request",SN_PORT_TYPE_LEN); strncpy(icmp_types[16],"Information-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[17],"Address-Mask-Request",SN_PORT_TYPE_LEN); strncpy(icmp_types[18],"Address-Mask-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[19],"Reserved-(for-Security)",SN_PORT_TYPE_LEN); strncpy(icmp_types[20],"Reserved-(for-Robustness-Experiment)",SN_PORT_TYPE_LEN); strncpy(icmp_types[30],"Traceroute",SN_PORT_TYPE_LEN); strncpy(icmp_types[31],"Datagram-Conversion-Error",SN_PORT_TYPE_LEN); strncpy(icmp_types[32],"Mobile-Host-Redirect",SN_PORT_TYPE_LEN); strncpy(icmp_types[33],"IPv6-Where-Are-You",SN_PORT_TYPE_LEN); strncpy(icmp_types[34],"IPv6-I-Am-Here",SN_PORT_TYPE_LEN); strncpy(icmp_types[35],"Mobile-Registration-Request",SN_PORT_TYPE_LEN); strncpy(icmp_types[36],"Mobile-Registration-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[37],"Domain-Name-Request",SN_PORT_TYPE_LEN); strncpy(icmp_types[38],"Domain-Name-Reply",SN_PORT_TYPE_LEN); strncpy(icmp_types[39],"SKIP",SN_PORT_TYPE_LEN); strncpy(icmp_types[40],"Photuris",SN_PORT_TYPE_LEN); netdiag-1.2/netwatch-1.3.1-2/icmpdefs.gen000066400000000000000000000000231323731111400176550ustar00rootroot00000000000000#define ICMPMAX 40 netdiag-1.2/netwatch-1.3.1-2/lookdata000077500000000000000000000376061323731111400171350ustar00rootroot00000000000000ELFà…4´04 (44€4€ÀÀôô€ô€€€$$$$¢$¢| œœ¢œ¢   /lib/ld-linux.so.2GNU    D섲ü„t"x ….0…o7,…˜<…¸nL…Õb\…›Jl…¢")@£h|… Œ…"œ…)>¬…#‹¼…y‘D€Ì…$ __gmon_start__libc.so.6putcharprintfstdoutperrorfflushctimentohl__deregister_frame_infofreadntohsinet_ntoaisprintether_ntoafopen_IO_stdin_used__libc_start_main__register_frame_infoGLIBC_2.1GLIBC_2.0ii Èii Ò˜¢@£ \¢`¢d¢h¢l¢p¢t¢x¢|¢ €¢ „¢ ˆ¢ Œ¢¢”¢U‰åSè[Ûƒ»Htè6{û÷‰öèè ‹]üÉÃÿ5T¢ÿ%X¢ÿ%\¢héàÿÿÿÿ%`¢héÐÿÿÿÿ%d¢héÀÿÿÿÿ%h¢hé°ÿÿÿÿ%l¢h é ÿÿÿÿ%p¢h(éÿÿÿÿ%t¢h0é€ÿÿÿÿ%x¢h8épÿÿÿÿ%|¢h@é`ÿÿÿÿ%€¢hHéPÿÿÿÿ%„¢hPé@ÿÿÿÿ%ˆ¢hXé0ÿÿÿÿ%Œ¢h`é ÿÿÿÿ%¢hhéÿÿÿÿ%”¢hpéÿÿÿ1í^‰áƒäøPTRh h¬„QVhŒè‹ÿÿÿôU‰åƒ=,¢u8ë‰öP‰(¢‹ÿС(¢ƒ8ué¸l……Àt h<¢è"ÿÿÿÇ,¢ÉÉöU‰åÉÃvU‰å¸ü„…ÀthD£h<¢èþÿÿÉÃvU‰åÉÃU‰åƒì ‹E‹‰Uü‹E f‹f‰Uú‹Eü‰Eô‹Eô·PRèÁþÿÿƒÄ‰À·ÐRhbèÎþÿÿƒÄ‹Eô·RèŸþÿÿƒÄ‰À·ÐRhuè¬þÿÿƒÄ‹Eô‹PRèíýÿÿƒÄ‰ÀPhˆèþÿÿƒÄ‹Eô‹PRèÎýÿÿƒÄ‰ÀPh›ènþÿÿƒÄ‹Eô·PRè>þÿÿƒÄ‰À·ÐRh®èKþÿÿƒÄ‹Eô·PRèþÿÿƒÄ‰À·ÐRhÁè(þÿÿƒÄ‹E‹U‹ ƒÁ‰‹E ‹U f‹ ƒÁìf‰ÉÃvU‰åƒì ‹E‹‰Uü‹E f‹f‰Uú‹Eü‰Eô‹Eô·PRè¹ýÿÿƒÄ‰À·ÐRhÔèÆýÿÿƒÄ‹Eô·Rè—ýÿÿƒÄ‰À·ÐRhçè¤ýÿÿƒÄ‹E‹U‹ ƒÁ‰‹E ‹U f‹ ƒÁøf‰ÉÃvU‰åƒì ‹E‹‰Uü‹E f‹f‰Uú‹Eü‰Eô‹Eô¶RhúèQýÿÿƒÄ‹Eô¶PRh è<ýÿÿƒÄhè/ýÿÿƒÄ‹Eô·PRèÿüÿÿƒÄ‰À·ÐRh"è ýÿÿƒÄ‹Eô·PRèÜüÿÿƒÄ‰À·ÐRh+èéüÿÿƒÄh5èÜüÿÿƒÄ‹Eô‹PRè}üÿÿƒÄ‰ÀPh;è½üÿÿƒÄh5è°üÿÿƒÄ‹Eô·PRè€üÿÿƒÄ‰À·ÐRhIèüÿÿƒÄ‹E‹U‹ ƒÁ‰‹E ‹U f‹ ƒÁøf‰ÉÃU‰åƒì‹E‰Eü¹…ëQ‹Eü÷é‰ÑÁù‹UüÁú‰È)ЉEü‹EüP¡8¢‰Eü‹EüPhXè*üÿÿƒÄ ÉÃU‰å‹EPhmèüÿÿƒÄÉÉöU‰åƒì‹E f‰Eþƒ=4¢ua‹E‰Eð‹MƒÁ‰Mô‹EðPèüÿÿƒÄ‰ÀPhƒèÎûÿÿƒÄ‹EðƒÀPèïûÿÿƒÄ‰ÀPh‘è¯ûÿÿƒÄ‹Eð·P RhŸèšûÿÿƒÄë‹E‰Eô‹Eô‹PRè3ûÿÿƒÄ‰ÀPh¯èsûÿÿƒÄ‹Eô‹P RèûÿÿƒÄ‰ÀPh¼èTûÿÿƒÄ‹Eô¶P RhÉè?ûÿÿƒÄ‹Eô¶PRhÖè*ûÿÿƒÄ‹Eô¶PRhãèûÿÿƒÄ‹Eô¶‰ÐƒàPhðèüúÿÿƒÄ‹Eô·PRèÌúÿÿƒÄ‰À·ÐRhýèÙúÿÿƒÄjh ‘èÊúÿÿƒÄ‹MôƒÁ‰Mìf‹ d£ƒÁìf‰Mê‹Uô¶B ƒøtƒøƒøtNëlƒøt'ëet&h‘è‚úÿÿƒÄEêPEìPèfûÿÿƒÄëNh'‘èbúÿÿƒÄEêPEìPèNüÿÿƒÄë.h5‘èBúÿÿƒÄEêPEìPè²üÿÿƒÄëhD‘è"úÿÿƒÄÇEäÇEøt&·Eê9Eø|ëet&‹Eì‹UøÐ¶Rè[ùÿÿƒÄ‰À…Àt‹Eì‹UøÐ¶RèqùÿÿƒÄë j.èeùÿÿƒÄÿEäƒ}äG~j èRùÿÿƒÄÇEäÿEøë—´&h`‘è’ùÿÿƒÄÉÃU‰åƒìÇEøƒ}h ‘èoùÿÿƒÄ¸éš¶hØ‘‹E ƒÀ‹RèiùÿÿƒÄ‰À£`£ƒ=`£u‹E ƒÀ‹Rè¨øÿÿƒÄ¸éS¡`£Pjjhh£èÇøÿÿƒÄ¡`£Pjjhf£è°øÿÿƒÄ·f£PèÀøÿÿƒÄ‰Àf£d£f¡f£f;`u|hÚ‘è¼øÿÿƒÄhh£è¿øÿÿƒÄ‰ÀPhë‘èŸøÿÿƒÄÇ0¢¡`£Pjjh€«è>øÿÿƒÄ¡`£Pjjhf£è'øÿÿƒÄ·f£Pè7øÿÿƒÄ‰Àf£d£ë ¡h££€«¡€«PèÉûÿÿƒÄ·d£PèüÿÿƒÄ¶ƒ}øt éEt&¡`£P·d£Pjh€£è²÷ÿÿƒÄ‰Eüƒ}ü}hô‘è\÷ÿÿƒÄé·d£9Eüthþ‘è¾÷ÿÿƒÄÇEø·d£Ph€£è–ûÿÿƒÄ¡@£Pè$÷ÿÿƒÄƒ=0¢uJ¡`£Pjjhf£è4÷ÿÿƒÄ¡`£Pjjhd£è÷ÿÿƒÄf¡d£f;`t h’èA÷ÿÿƒÄ¡`£Pjjhh£èêöÿÿƒÄ¡`£Pjjhf£èÓöÿÿƒÄ·f£PèãöÿÿƒÄ‰Àf£d£ÿ8¢¡h£Pè{úÿÿƒÄ·d£Pè³úÿÿƒÄé³þÿÿv1ÀëÉÃU‰åS»@¢ƒ=@¢ÿt ‹ÿЃÃüƒ;ÿuô‹]üÉÃU‰åÉÃU‰åSè[Ã;èïöÿÿ‹]üÉÃúúTCP DEST PORT: %d TCP SRC PORT: %d TCP SEQ : %d TCP ACK : %d TCP WINDOW : %d TCP URG : %d UDP DEST PORT: %d UDP SRC PORT: %d ICMP TYPE= %d ICMP CODE= %d either ID=%d SEQ=%d or GATEWAY=%s FRAG MTU=%d COUNT: %05d SEC=%5d ACT. READ LENGTH= %d ETH DEST: %s ETH SRC : %s ETH TYPE: %04X IP DEST: %s IP SRC : %s PROTOC : %d TTL : %d TOS : %d HEADLEN: %d TOT_LEN: %d Struct Len=%d TCP PROTOCOL UDP PROTOCOL ICMP PROTOCOL Unusual Protocol ************************************* Please give filename for ethernet data on command line rNEW FILE FORMAT TIME=%s Read fileAt end of file... FILE FORMAT ERROR L¢ÿÿÿÿÿÿÿÿœ¢ò„……"…2…B…R…b…r…‚…’…¢…²…Â…Ò… ¬„ (ð‚À È P¢x4„$„þÿÿoôƒÿÿÿoðÿÿõ›Od†d†+<:€i€ƒ€·€ï€,€x€Ä€ê€€:€_€y€”€µ€î€€5€_€s‚‚¢Å‚Ú‚ì‚‚‚¢¢¢-‚¢n‚‚‚–-•€ä€€Y€–€Ð€€=€t€¦‚»‚(;Ï€-€s€“€$¢¢¢¢¢¢¢µ‚BÜ‚Ú?-‚Ø€ª¢€ 1€!I€"_€#v€%€&¦€1¾€2×€3ï€4 €5" €6< €8U €9o €;’ €=ª €> €?Ú €@ò €A €B% €C< €DU €El €F… €G €H¸ €IÏ €N €Q+ €RE €S] €Tv €V €Y¨ €oõ €r €u' €{A €|^ €{ €€š €ƒ· €„Ö €‡ð €Š €' €ŽD €‘^ ‚UO’ ‚ˆº €¢î €7€"v€²€è€€S€3‘€É€;ä€B€E<€z€©€R×€Y€]5€„€¿€ù€€k7€w€s€x¢¢-‚ ¨€ÿ¾€¢Ó€#ì€$€%€&¢9 "d†init.c/usr/src/bs/BUILD/glibc-2.1.3/csu/gcc2_compiled.int:t(0,1)=r(0,1);0020000000000;0017777777777;char:t(0,2)=r(0,2);0;127;long int:t(0,3)=r(0,1);0020000000000;0017777777777;unsigned int:t(0,4)=r(0,1);0000000000000;0037777777777;long unsigned int:t(0,5)=r(0,1);0000000000000;0037777777777;long long int:t(0,6)=r(0,1);01000000000000000000000;0777777777777777777777;long long unsigned int:t(0,7)=r(0,1);0000000000000;01777777777777777777777;short int:t(0,8)=r(0,8);-32768;32767;short unsigned int:t(0,9)=r(0,9);0;65535;signed char:t(0,10)=r(0,10);-128;127;unsigned char:t(0,11)=r(0,11);0;255;float:t(0,12)=r(0,1);4;0;double:t(0,13)=r(0,1);8;0;long double:t(0,14)=r(0,1);12;0;complex int:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;;complex float:t(0,16)=r(0,16);4;0;complex double:t(0,17)=r(0,17);8;0;complex long double:t(0,18)=r(0,18);12;0;void:t(0,19)=(0,19)../include/libc-symbols.h/usr/src/bs/BUILD/glibc-2.1.3/build-i386-linux/config.h../include/libintl.h../intl/libintl.h../include/features.h../include/sys/cdefs.h../misc/sys/cdefs.h/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h../include/locale.h../locale/locale.hlconv:T(10,1)=s48decimal_point:(10,2)=*(0,2),0,32;thousands_sep:(10,2),32,32;\grouping:(10,2),64,32;int_curr_symbol:(10,2),96,32;\currency_symbol:(10,2),128,32;mon_decimal_point:(10,2),160,32;\mon_thousands_sep:(10,2),192,32;mon_grouping:(10,2),224,32;\positive_sign:(10,2),256,32;negative_sign:(10,2),288,32;\int_frac_digits:(0,2),320,8;frac_digits:(0,2),328,8;\p_cs_precedes:(0,2),336,8;p_sep_by_space:(0,2),344,8;\n_cs_precedes:(0,2),352,8;n_sep_by_space:(0,2),360,8;\p_sign_posn:(0,2),368,8;n_sign_posn:(0,2),376,8;;../include/xlocale.h../locale/xlocale.h__locale_struct:T(13,1)=s36__locales:(13,2)=ar(0,1);0;5;(13,3)=*(13,4)=xslocale_data:,0,192;\__ctype_b:(13,5)=*(0,9),192,32;__ctype_tolower:(13,6)=*(0,1),224,32;\__ctype_toupper:(13,6),256,32;;__locale_t:t(13,7)=(13,8)=*(13,1)../sysdeps/unix/sysv/linux/_G_config.h../sysdeps/unix/sysv/linux/bits/types.hsize_t:t(16,1)=(0,4)__u_char:t(15,1)=(0,11)__u_short:t(15,2)=(0,9)__u_int:t(15,3)=(0,4)__u_long:t(15,4)=(0,5)__u_quad_t:t(15,5)=(0,7)__quad_t:t(15,6)=(0,6)__int8_t:t(15,7)=(0,10)__uint8_t:t(15,8)=(0,11)__int16_t:t(15,9)=(0,8)__uint16_t:t(15,10)=(0,9)__int32_t:t(15,11)=(0,1)__uint32_t:t(15,12)=(0,4)__int64_t:t(15,13)=(0,6)__uint64_t:t(15,14)=(0,7)__qaddr_t:t(15,15)=(15,16)=*(15,6)__dev_t:t(15,17)=(15,5)__uid_t:t(15,18)=(15,3)__gid_t:t(15,19)=(15,3)__ino_t:t(15,20)=(15,4)__mode_t:t(15,21)=(15,3)__nlink_t:t(15,22)=(15,3)__off_t:t(15,23)=(0,3)__loff_t:t(15,24)=(15,6)__pid_t:t(15,25)=(0,1)__ssize_t:t(15,26)=(0,1)__rlim_t:t(15,27)=(0,3)__rlim64_t:t(15,28)=(15,6)__id_t:t(15,29)=(15,3)__fsid_t:t(15,30)=(15,31)=s8__val:(15,32)=ar(0,1);0;1;(0,1),0,64;;__daddr_t:t(15,33)=(0,1)__caddr_t:t(15,34)=(10,2)__time_t:t(15,35)=(0,3)__swblk_t:t(15,36)=(0,3)__clock_t:t(15,37)=(0,3)__fd_mask:t(15,38)=(0,5)__fd_set:t(15,39)=(15,40)=s128fds_bits:(15,41)=ar(0,1);0;31;(15,38),0,1024;;__key_t:t(15,42)=(0,1)__ipc_pid_t:t(15,43)=(0,9)__blkcnt_t:t(15,44)=(0,3)__blkcnt64_t:t(15,45)=(15,6)__fsblkcnt_t:t(15,46)=(15,4)__fsblkcnt64_t:t(15,47)=(15,5)__fsfilcnt_t:t(15,48)=(15,4)__fsfilcnt64_t:t(15,49)=(15,5)__ino64_t:t(15,50)=(15,4)__off64_t:t(15,51)=(15,24)__t_scalar_t:t(15,52)=(0,3)__t_uscalar_t:t(15,53)=(0,5)__intptr_t:t(15,54)=(0,1)../linuxthreads/sysdeps/pthread/bits/pthreadtypes.h../sysdeps/unix/sysv/linux/bits/sched.h__sched_param:T(18,1)=s4sched_priority:(0,1),0,32;;_pthread_fastlock:T(17,1)=s8__status:(0,3),0,32;__spinlock:(0,1),32,32;;_pthread_descr:t(17,2)=(17,3)=*(17,4)=xs_pthread_descr_struct:pthread_attr_t:t(17,5)=(17,6)=s36__detachstate:(0,1),0,32;\__schedpolicy:(0,1),32,32;__schedparam:(18,1),64,32;\__inheritsched:(0,1),96,32;__scope:(0,1),128,32;\__guardsize:(16,1),160,32;__stackaddr_set:(0,1),192,32;\__stackaddr:(17,7)=*(0,19),224,32;__stacksize:(16,1),256,32;;pthread_cond_t:t(17,8)=(17,9)=s12__c_lock:(17,1),0,64;\__c_waiting:(17,2),64,32;;pthread_condattr_t:t(17,10)=(17,11)=s4__dummy:(0,1),0,32;;pthread_key_t:t(17,12)=(0,4)pthread_mutex_t:t(17,13)=(17,14)=s24__m_reserved:(0,1),0,32;\__m_count:(0,1),32,32;__m_owner:(17,2),64,32;\__m_kind:(0,1),96,32;__m_lock:(17,1),128,64;;pthread_mutexattr_t:t(17,15)=(17,16)=s4__mutexkind:(0,1),0,32;;pthread_once_t:t(17,17)=(0,1)_pthread_rwlock_t:T(17,18)=s32__rw_lock:(17,1),0,64;__rw_readers:(0,1),64,32;\__rw_writer:(17,2),96,32;__rw_read_waiting:(17,2),128,32;\__rw_write_waiting:(17,2),160,32;__rw_kind:(0,1),192,32;\__rw_pshared:(0,1),224,32;;pthread_rwlock_t:t(17,19)=(17,18)pthread_rwlockattr_t:t(17,20)=(17,21)=s8__lockkind:(0,1),0,32;\__pshared:(0,1),32,32;;pthread_t:t(17,22)=(0,5)wchar_t:t(19,1)=(0,3)wint_t:t(19,2)=(0,4)_G_int16_t:t(14,1)=(0,8)_G_int32_t:t(14,2)=(0,1)_G_uint16_t:t(14,3)=(0,9)_G_uint32_t:t(14,4)=(0,4)_IO_stdin_used:G(0,1)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)01.0101.0101.0101.0101.0101.01.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.got.rel.bss.rel.plt.init.plt.text.fini.rodata.data.eh_frame.ctors.dtors.got.dynamic.bss.stab.stabstr.comment.noteô€ô# 1((˜7 ÀÀ0?ð‚ðÜGÿÿÿõÌ&Tþÿÿoôƒô0c $„$l ,„,u 4„4x ~¬„¬/„܄܉à…à,   •@@ä $¢$£<¢<­@¢@´H¢H»P¢PLÀœ¢œ É@£@` Î@P ÔOÝß-næ ¬M/xÅ/ìd5°: <rô€(Àð‚̃ôƒ$„,„ 4„ ¬„ Ü„ à… @$¢<¢@¢H¢P¢œ¢@£ ¬ñÿ † ñÿ"ñÿ † -(¢1H¢?,¢K† a<¢tX† D£ˆ`† ”€† Ÿ0¢­@¢"ñÿ àŽ »àŽ ÑD¢” Ÿ<¢ÞL¢ë<¢ñÿ  ùñÿ † † ì„`£"`+œ¢4 ñÿ;ü„t"\ ….ov…oˆ,…˜šd£¡<…¸´ˆ ¿L…ÕÔ¬„ Úf£â\…›ól…¢"0‰G "4¢)@£;à… B|…S<£ñÿ_ŒÆ dŒ…h£ˆ$¢ “œ…)¥8¢« ±¬…#Âl£Æ€£Ê<£ñÿÑP¢ç ¬ñÿìx‰ ú‰ €« ¼…y0¢"˜‡ ,D; «@Ì…$V$¢c initfini.cgcc2_compiled.init.ccrtstuff.cp.2__DTOR_LIST__completed.3__do_global_dtors_aux__EH_FRAME_BEGIN__fini_dummyobject.8frame_dummyinit_dummyforce_to_data__CTOR_LIST____do_global_ctors_aux__CTOR_END____DTOR_END____FRAME_END__lookdata.cprint_tcpntohl@@GLIBC_2.0fpsimmagic_DYNAMIC_etext__register_frame_info@@GLIBC_2.0isprint@@GLIBC_2.0_fp_hwperror@@GLIBC_2.0fflush@@GLIBC_2.0lengthputchar@@GLIBC_2.0print_icmpinet_ntoa@@GLIBC_2.0_initnlengthfread@@GLIBC_2.0__deregister_frame_info@@GLIBC_2.0displaytimeppppktstdout@@GLIBC_2.0_startntohs@@GLIBC_2.0__bss_startmain__libc_start_main@@GLIBC_2.0sotimedata_startprintf@@GLIBC_2.0count_finictime@@GLIBC_2.0onebuf_edata_GLOBAL_OFFSET_TABLE__enddisplaylengthdisplaybufstartfopen@@GLIBC_2.1tformprint_udp_IO_stdin_usednameether_ntoa@@GLIBC_2.0__data_start__gmon_start__netdiag-1.2/netwatch-1.3.1-2/lookdata.c000066400000000000000000000124761323731111400173510ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #define SIMMAGIC 0xfafa const unsigned short simmagic=SIMMAGIC; time_t sotime; clock_t one, start; unsigned short length; unsigned short nlength; FILE *fp; char name[256]; enum { FALSE, TRUE }; enum { OLD, NEW }; int tform = OLD; unsigned char buf[2048]; int ppppkt = FALSE; int count = 0; void print_tcp( unsigned char **pdp, unsigned short *plen) { unsigned char *dp = *pdp; unsigned short len = *plen; struct tcphdr *p = (struct tcphdr *)dp; printf("TCP DEST PORT: %d\n",ntohs(p->dest)); printf("TCP SRC PORT: %d\n",ntohs(p->source)); printf("TCP SEQ : %d\n",ntohl(p->seq)); printf("TCP ACK : %d\n",ntohl(p->ack_seq)); printf("TCP WINDOW : %d\n",ntohs(p->window)); printf("TCP URG : %d\n",ntohs(p->urg_ptr)); *pdp += sizeof(struct tcphdr); *plen -= sizeof(struct tcphdr); } void print_udp( unsigned char **pdp, unsigned short *plen) { unsigned char *dp = *pdp; unsigned short len = *plen; struct udphdr *p = (struct udphdr *)dp; printf("UDP DEST PORT: %d\n",ntohs(p->dest)); printf("UDP SRC PORT: %d\n",ntohs(p->source)); *pdp += sizeof(struct udphdr); *plen -= sizeof(struct udphdr); } void print_icmp( unsigned char **pdp, unsigned short *plen) { unsigned char *dp = *pdp; unsigned short len = *plen; struct icmphdr *p = (struct icmphdr *)dp; printf("ICMP TYPE= %d\n",p->type); printf("ICMP CODE= %d\n",p->code); printf(" either\n"); printf(" ID=%d\n",ntohs(p->un.echo.id)); printf(" SEQ=%d\n",ntohs(p->un.echo.sequence)); printf(" or\n"); printf(" GATEWAY=%s\n",inet_ntoa(p->un.gateway)); printf(" or\n"); printf(" FRAG MTU=%d\n",ntohs(p->un.frag.mtu)); *pdp += sizeof(struct icmphdr); *plen -= sizeof(struct icmphdr); } void displaytime(clock_t m) { printf("COUNT: %05d SEC=%5d\n",count,m/CLK_TCK); } void displaylength(unsigned int len) { printf("ACT. READ LENGTH= %d\n",len); } void displaybuf( unsigned char b[], unsigned short len) { int i; struct iphdr *p; struct ether_header *pe; unsigned char *dp; unsigned short left; int col; if (!ppppkt) { pe = (struct ether_header *)b; p = (struct iphdr *)( b + ETH_HLEN); printf("ETH DEST: %s\n",ether_ntoa((struct ether_addr *)pe->ether_dhost)); printf("ETH SRC : %s\n",ether_ntoa((struct ether_addr *)pe->ether_shost)); printf("ETH TYPE: %04X\n",pe->ether_type); } else p = (struct iphdr *) b; printf("IP DEST: %s\n",inet_ntoa(p->daddr)); printf("IP SRC : %s\n",inet_ntoa(p->saddr)); printf("PROTOC : %d\n",p->protocol); printf("TTL : %d\n",p->ttl); printf("TOS : %d\n",p->tos); printf("HEADLEN: %d\n",p->ihl); printf("TOT_LEN: %d\n",ntohs(p->tot_len)); printf("Struct Len=%d\n",sizeof(struct iphdr)); dp = (unsigned char *)p + /*p->ihl*/ + sizeof(struct iphdr); left = length /* - p->ihl */ - sizeof(struct iphdr) ; switch (p->protocol) { case 6: /* TCP */ printf("TCP PROTOCOL\n"); print_tcp(&dp,&left); break; case 17: /* UDP */ printf("UDP PROTOCOL\n"); print_udp(&dp,&left); break; case 1: /* ICMP */ printf("ICMP PROTOCOL\n"); print_icmp(&dp,&left); break; default: printf("Unusual Protocol\n"); } col = 0; for (i=0;i=72) { putchar('\n'); col = 0; } } printf("\n*************************************\n"); } int main(int argc, char *argv[]) { int st; int done = FALSE; if (argc<2) { printf("Please give filename for ethernet data on command line\n"); return(1); } if ((fp = fopen(argv[1],"r"))==NULL) { perror(argv[1]); return(2); } /* Read start time??? or offset time... based on NEW or OLD format */ fread(&sotime,1,sizeof(sotime),fp); fread(&nlength,1,sizeof(nlength),fp); length = ntohs(nlength); if (nlength == simmagic) { /* New format.... Mark as such... */ printf("NEW FILE FORMAT\n"); printf("TIME=%s\n",ctime(&sotime)); tform = NEW; fread(&start,1,sizeof(sotime),fp); fread(&nlength,1,sizeof(nlength),fp); length = ntohs(nlength); } else start = (clock_t)sotime; displaytime(start); displaylength(length); while (!done) { /* Read buf */ st = fread(buf,1,length,fp); if (st<0) { perror("Read file"); break; } if (st!=length) { printf("At end of file...\n"); done = TRUE; } displaybuf(buf,length); fflush(stdout); if (tform==NEW) { fread(&nlength,1,sizeof(nlength),fp); fread(&length,1,sizeof(length),fp); /* SIMMAGIC READ */ if (length!=simmagic) printf("FILE FORMAT ERROR\n"); } fread(&sotime,1,sizeof(sotime),fp); fread(&nlength,1,sizeof(nlength),fp); length = ntohs(nlength); count++; displaytime(sotime); displaylength(length); } return (0); } netdiag-1.2/netwatch-1.3.1-2/net.debug000066400000000000000000000250411323731111400171750ustar00rootroot00000000000000in_progress=1 loop=0 Window Change Row=19 Col=113 in_progress=1 loop=0 Window Change Row=18 Col=113 in_progress=1 loop=0 Window Change Row=18 Col=112 in_progress=1 loop=0 Window Change Row=18 Col=111 in_progress=1 loop=0 Window Change Row=17 Col=111 in_progress=1 loop=0 Window Change Row=17 Col=110 in_progress=1 loop=0 Window Change Row=17 Col=109 in_progress=1 loop=0 Window Change Row=17 Col=108 in_progress=1 loop=1 Window Change Row=16 Col=108 in_progress=1 loop=0 Window Change Row=16 Col=107 in_progress=1 loop=0 Window Change Row=16 Col=106 in_progress=1 loop=0 Window Change Row=15 Col=106 in_progress=1 loop=0 Window Change Row=15 Col=105 in_progress=1 loop=0 Window Change Row=14 Col=105 in_progress=1 loop=0 Window Change Row=14 Col=104 in_progress=1 loop=0 Window Change Row=15 Col=104 in_progress=1 loop=0 Window Change Row=15 Col=105 in_progress=1 loop=0 Window Change Row=16 Col=105 in_progress=1 loop=0 Window Change Row=17 Col=106 in_progress=1 loop=0 Window Change Row=18 Col=106 in_progress=1 loop=0 Window Change Row=19 Col=106 in_progress=1 loop=0 Window Change Row=20 Col=106 in_progress=1 loop=0 Window Change Row=21 Col=106 in_progress=1 loop=0 Window Change Row=22 Col=106 in_progress=1 loop=0 Window Change Row=23 Col=107 in_progress=1 loop=0 Window Change Row=24 Col=107 in_progress=1 loop=0 Window Change Row=25 Col=107 in_progress=1 loop=0 Window Change Row=26 Col=107 in_progress=1 loop=0 Window Change Row=26 Col=106 in_progress=1 loop=0 Window Change Row=27 Col=106 in_progress=1 loop=0 Window Change Row=27 Col=107 in_progress=1 loop=0 Window Change Row=28 Col=107 in_progress=1 loop=0 Window Change Row=29 Col=107 in_progress=1 loop=1 Window Change Row=29 Col=108 in_progress=1 loop=0 Window Change Row=29 Col=109 in_progress=1 loop=0 Window Change Row=30 Col=109 in_progress=1 loop=0 Window Change Row=30 Col=110 in_progress=1 loop=0 Window Change Row=38 Col=125 in_progress=1 loop=0 Window Change Row=30 Col=110 in_progress=1 loop=0 Window Change Row=30 Col=109 in_progress=1 loop=0 Window Change Row=29 Col=109 in_progress=1 loop=0 Window Change Row=29 Col=108 in_progress=1 loop=0 Window Change Row=29 Col=107 in_progress=1 loop=0 Window Change Row=29 Col=106 in_progress=1 loop=0 Window Change Row=28 Col=106 in_progress=1 loop=0 Window Change Row=28 Col=105 in_progress=1 loop=0 Window Change Row=28 Col=104 in_progress=1 loop=0 Window Change Row=28 Col=103 in_progress=1 loop=0 Window Change Row=27 Col=103 in_progress=1 loop=0 Window Change Row=27 Col=102 in_progress=1 loop=0 Window Change Row=27 Col=101 in_progress=1 loop=0 Window Change Row=27 Col=100 in_progress=1 loop=0 Window Change Row=26 Col=100 in_progress=1 loop=0 Window Change Row=26 Col=99 in_progress=1 loop=0 Window Change Row=26 Col=98 in_progress=1 loop=0 Window Change Row=26 Col=97 in_progress=1 loop=1 Window Change Row=26 Col=95 in_progress=1 loop=0 Window Change Row=26 Col=93 in_progress=1 loop=1 Window Change Row=25 Col=91 in_progress=1 loop=2 Window Change Row=26 Col=86 in_progress=1 loop=3 Window Change Row=26 Col=85 in_progress=1 loop=4 Window Change Row=25 Col=69 in_progress=1 loop=0 Window Change Row=25 Col=68 in_progress=1 loop=0 Window Change Row=25 Col=67 in_progress=1 loop=0 Window Change Row=25 Col=68 in_progress=1 loop=0 Window Change Row=25 Col=69 in_progress=1 loop=0 Window Change Row=25 Col=72 in_progress=1 loop=0 Window Change Row=25 Col=73 in_progress=1 loop=1 Window Change Row=25 Col=77 in_progress=1 loop=2 Window Change Row=26 Col=82 in_progress=1 loop=3 Window Change Row=26 Col=83 in_progress=1 loop=4 Window Change Row=26 Col=86 in_progress=1 loop=5 Window Change Row=26 Col=88 in_progress=1 loop=6 Window Change Row=26 Col=89 in_progress=1 loop=7 Window Change Row=26 Col=91 in_progress=1 loop=8 Window Change Row=27 Col=94 in_progress=1 loop=9 Window Change Row=27 Col=95 in_progress=1 loop=0 Window Change Row=27 Col=96 in_progress=1 loop=0 Window Change Row=27 Col=97 in_progress=1 loop=1 Window Change Row=27 Col=99 in_progress=1 loop=0 Window Change Row=27 Col=100 in_progress=1 loop=1 Window Change Row=27 Col=103 in_progress=1 loop=0 Window Change Row=27 Col=105 in_progress=1 loop=1 Window Change Row=28 Col=109 in_progress=1 loop=2 Window Change Row=29 Col=121 in_progress=1 loop=3 Window Change Row=29 Col=122 in_progress=1 loop=4 Window Change Row=29 Col=124 in_progress=1 loop=0 Window Change Row=30 Col=124 in_progress=1 loop=0 Window Change Row=31 Col=124 in_progress=1 loop=0 Window Change Row=31 Col=123 in_progress=1 loop=0 Window Change Row=31 Col=121 in_progress=1 loop=0 Window Change Row=31 Col=120 in_progress=1 loop=1 Window Change Row=31 Col=118 in_progress=1 loop=2 Window Change Row=30 Col=100 in_progress=1 loop=0 Window Change Row=30 Col=99 in_progress=1 loop=0 Window Change Row=30 Col=98 in_progress=1 loop=0 Window Change Row=30 Col=97 in_progress=1 loop=0 Window Change Row=30 Col=98 in_progress=1 loop=0 Window Change Row=30 Col=97 in_progress=1 loop=0 Window Change Row=30 Col=98 in_progress=1 loop=0 Window Change Row=31 Col=98 in_progress=1 loop=0 Window Change Row=31 Col=99 in_progress=1 loop=0 Window Change Row=31 Col=100 in_progress=1 loop=0 Window Change Row=32 Col=101 in_progress=1 loop=0 Window Change Row=32 Col=102 in_progress=1 loop=0 Window Change Row=32 Col=103 in_progress=1 loop=0 Window Change Row=32 Col=104 in_progress=1 loop=0 Window Change Row=32 Col=105 in_progress=1 loop=0 Window Change Row=32 Col=106 in_progress=1 loop=1 Window Change Row=32 Col=107 in_progress=1 loop=2 Window Change Row=32 Col=110 in_progress=1 loop=0 Window Change Row=32 Col=111 in_progress=1 loop=0 Window Change Row=32 Col=112 in_progress=1 loop=0 Window Change Row=32 Col=113 in_progress=1 loop=0 Window Change Row=32 Col=114 in_progress=1 loop=1 Window Change Row=33 Col=114 in_progress=1 loop=0 Window Change Row=33 Col=115 in_progress=1 loop=1 Window Change Row=33 Col=116 in_progress=1 loop=2 Window Change Row=33 Col=121 in_progress=1 loop=0 Window Change Row=33 Col=122 in_progress=1 loop=0 Window Change Row=33 Col=123 in_progress=1 loop=0 Window Change Row=33 Col=124 in_progress=1 loop=0 Window Change Row=34 Col=124 in_progress=1 loop=0 Window Change Row=33 Col=124 in_progress=1 loop=0 Window Change Row=33 Col=123 in_progress=1 loop=0 Window Change Row=33 Col=122 in_progress=1 loop=0 Window Change Row=32 Col=122 in_progress=1 loop=0 Window Change Row=32 Col=121 in_progress=1 loop=0 Window Change Row=31 Col=121 in_progress=1 loop=0 Window Change Row=31 Col=120 in_progress=1 loop=0 Window Change Row=30 Col=120 in_progress=1 loop=0 Window Change Row=30 Col=119 in_progress=1 loop=0 Window Change Row=31 Col=119 in_progress=1 loop=0 Window Change Row=31 Col=120 in_progress=1 loop=0 Window Change Row=32 Col=120 in_progress=1 loop=0 Window Change Row=32 Col=119 in_progress=1 loop=0 Window Change Row=32 Col=118 in_progress=1 loop=1 Window Change Row=32 Col=116 in_progress=1 loop=0 Window Change Row=32 Col=115 in_progress=1 loop=1 Window Change Row=31 Col=111 in_progress=1 loop=0 Window Change Row=31 Col=110 in_progress=1 loop=0 Window Change Row=31 Col=109 in_progress=1 loop=1 Window Change Row=30 Col=100 in_progress=1 loop=0 Window Change Row=30 Col=99 in_progress=1 loop=0 Window Change Row=29 Col=99 in_progress=1 loop=1 Window Change Row=29 Col=95 in_progress=1 loop=0 Window Change Row=29 Col=94 in_progress=1 loop=0 Window Change Row=29 Col=95 in_progress=1 loop=1 Window Change Row=29 Col=97 in_progress=1 loop=0 Window Change Row=29 Col=98 in_progress=1 loop=1 Window Change Row=30 Col=107 in_progress=1 loop=2 Window Change Row=30 Col=109 in_progress=1 loop=3 Window Change Row=30 Col=110 in_progress=1 loop=4 Window Change Row=30 Col=113 in_progress=1 loop=0 Window Change Row=30 Col=114 in_progress=1 loop=0 Window Change Row=30 Col=115 in_progress=1 loop=0 Window Change Row=30 Col=116 in_progress=1 loop=1 Window Change Row=30 Col=121 in_progress=1 loop=0 Window Change Row=30 Col=122 in_progress=1 loop=0 Window Change Row=30 Col=123 in_progress=1 loop=0 Window Change Row=30 Col=124 in_progress=1 loop=0 Window Change Row=31 Col=124 in_progress=1 loop=0 Window Change Row=31 Col=122 in_progress=1 loop=1 Window Change Row=30 Col=110 in_progress=1 loop=0 Window Change Row=30 Col=109 in_progress=1 loop=1 Window Change Row=29 Col=96 in_progress=1 loop=0 Window Change Row=29 Col=95 in_progress=1 loop=0 Window Change Row=29 Col=94 in_progress=1 loop=0 Window Change Row=29 Col=95 in_progress=1 loop=0 Window Change Row=29 Col=96 in_progress=1 loop=0 Window Change Row=29 Col=97 in_progress=1 loop=0 Window Change Row=29 Col=98 in_progress=1 loop=1 Window Change Row=29 Col=101 in_progress=1 loop=2 Window Change Row=29 Col=109 in_progress=1 loop=0 Window Change Row=29 Col=110 in_progress=1 loop=1 Window Change Row=29 Col=115 in_progress=1 loop=0 Window Change Row=29 Col=116 in_progress=1 loop=1 Window Change Row=29 Col=118 in_progress=1 loop=0 Window Change Row=30 Col=119 in_progress=1 loop=1 Window Change Row=30 Col=120 in_progress=1 loop=0 Window Change Row=30 Col=121 in_progress=1 loop=0 Window Change Row=30 Col=122 in_progress=1 loop=0 Window Change Row=30 Col=121 in_progress=1 loop=1 Window Change Row=29 Col=112 in_progress=1 loop=0 Window Change Row=29 Col=111 in_progress=1 loop=1 Window Change Row=29 Col=110 in_progress=1 loop=0 Window Change Row=29 Col=109 in_progress=1 loop=1 Window Change Row=29 Col=102 in_progress=1 loop=2 Window Change Row=29 Col=101 in_progress=1 loop=3 Window Change Row=29 Col=100 in_progress=1 loop=0 Window Change Row=28 Col=100 in_progress=1 loop=0 Window Change Row=28 Col=99 in_progress=1 loop=0 Window Change Row=28 Col=100 in_progress=1 loop=1 Window Change Row=28 Col=101 in_progress=1 loop=2 Window Change Row=29 Col=102 in_progress=1 loop=3 Window Change Row=29 Col=104 in_progress=1 loop=4 Window Change Row=29 Col=105 netdiag-1.2/netwatch-1.3.1-2/netresolv.c000066400000000000000000000162461323731111400175730ustar00rootroot00000000000000#include "config.h" #include #include #include #include #ifdef NETINET_SUPP_in #include #endif #include #include #include #include #include #include #include "core.h" #include "netresolv.h" enum {FALSE,TRUE}; const int RESOLVE_MAX1=RESOLVE_MAX - 1; /* NETRESOLV - resolve INET addresses and return the INET Hostnames Include a timeout of 60 sec. to resolve a name. If not resolved, discard the entry... Use STDIN to read from the SOCKETPAIR connection (i.e. don't care where it comes from...) Expect a struct to be sent in a specific format Return a struct to STDOUT in another format */ /* #define DEBUG 1 */ /* #define DDEBUG 1 */ extern int errno; sigjmp_buf env; #define SAVEMASK 1 int processone = 0; int addedentries = 0; int clearall = FALSE; int oktocontinue = TRUE; enum { START_SIG, STOP_SIG, JUMP_SIG, UNUSED}; enum { INIT, INSIDE_LOOP, WAITING_GETHOST, ADDING_ENTRIES, BUILD_RETURN }; int where_are_you = INIT; int sig_in_spot = UNUSED; int sig_time_spot = UNUSED; FILE *dfp; typedef void (*sigfunc) (int); /* FOR RELIABLE SIGNAL HANDLING --- make sure a restart of system calls is performed when signals interrupt */ sigfunc signal (int signo, sigfunc func) { struct sigaction act, oact; act.sa_handler = func; sigemptyset (&act.sa_mask); act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; if (sigaction (signo, &act, &oact) < 0) return (SIG_ERR); return (oact.sa_handler); } struct nqueue { struct resolvaddr resentry; struct nqueue *link; }; struct nqueue *last, *first; struct nqueue dum; /* Dummy record header */ #define MAXENTRIES 400 struct resolvaddr entries[MAXENTRIES]; char *dbgaddr(u_int32_t val) { unsigned char *p; static char buf[40]; /* Worst case scenario for %u conversions */ p = (unsigned char *)&val; sprintf(buf,"%u.%u.%u.%u",p[0],p[1],p[2],p[3]); return(buf); } void addentry( struct resolvaddr *entry ) { struct nqueue *place; #ifdef DEBUG fprintf(dfp,"Adding entry...netresolv... \n"); fflush(dfp); #endif place = malloc(sizeof(*place)); place->resentry = *entry; #ifdef DEBUG fprintf(dfp,"Added entry...netresolv... %s\n",dbgaddr(entry->inetaddr)); fflush(dfp); #endif place->link = NULL; last->link = place; last = place; processone++; } void delentry() { struct nqueue *current; #ifdef DEBUG fprintf(dfp,"Deleted entry...netresolv clearall=%d\n",clearall); #endif current = first->link; if (last==first->link) last = first; if (current) { first->link = current->link; free(current); } processone--; } void deleteall() { struct nqueue *current, *h; #ifdef DEBUG fprintf(dfp,"Deleted all...netresolv clearall=%d\n",clearall); #endif current = first->link; while (current) { first->link = current->link; h = current; current = first->link; free(h); } processone=0; dum.link = NULL; last = first = &dum; } void sigincatch(int sig) { int status; sigset_t sigset, oldmask; sigprocmask(0,NULL,&sigset); sigaddset(&sigset,sig); sigprocmask(SIG_BLOCK,&sigset,&oldmask); sig_in_spot = START_SIG; #ifdef DEBUG fprintf(dfp,"SIGNAL CAUGHT\n"); fflush(dfp); #endif do { if (addedentrieslink; if (top) { cptop = *top; if (sigsetjmp( env , SAVEMASK)==0) { alarm(60); p = (unsigned char *)&(cptop.resentry.inetaddr); pu = (u_int32_t *)p; #ifdef DEBUG fprintf(dfp,"Actual Get host by address call\n"); fflush(dfp); #endif where_are_you = WAITING_GETHOST; if (*pu != 0L) { if (clearall) res = NULL; else res = gethostbyaddr(p, sizeof(struct in_addr),AF_INET); } else res = (struct hostent *)1; alarm(0); where_are_you = BUILD_RETURN; /* Build return entry... */ if (res) { #ifdef DEBUG fprintf(dfp,"FINAL ENTRY = %p RES=%p\n",cptop.resentry.where,res); fflush(dfp); #endif finalentry.where = cptop.resentry.where; if (finalentry.where>(char *)1 && res != (struct hostent *)1) strncpy(finalentry.name,res->h_name,RESOLVE_MAX1); else { #ifdef DDEBUG fprintf(dfp,"SHOULD set clearall false\n"); fflush(dfp); #endif finalentry.name[0]=0; if (finalentry.where == (char *)1) clearall = FALSE; #ifdef DDEBUG else { fprintf(dfp,"NEVER HAPPENS\n"); fflush(dfp); } #endif } #ifdef DEBUG fprintf(dfp,"Returning %s\n",finalentry.name); fflush(dfp); #endif finalentry.name[RESOLVE_MAX1] = 0; write(1,&finalentry,sizeof(finalentry)); /* Send signal to indicate ALL is ready */ kill(cptop.resentry.pid,SIGUSR2); } #ifdef DEBUG else { fprintf(dfp,"Failed GETHOSTBYADDR with %d",errno); fflush(dfp); } #endif } else { /* TIMED OUT */ #ifdef DEBUG fprintf(dfp,"Timed out\n"); fflush(dfp); #endif kill(cptop.resentry.pid,SIGUSR1); } delentry(); } #ifdef DEBUG else { fprintf(dfp,"TOP NULL VALUE!!\n"); fflush(dfp); } #endif } else usleep(100); where_are_you = INSIDE_LOOP; } return(0); } netdiag-1.2/netwatch-1.3.1-2/netresolv.h000066400000000000000000000003601323731111400175660ustar00rootroot00000000000000/* Special Struct's for NETWATCH to resolve INET addresses into INET Hostnames */ #define RESOLVE_MAX 256 struct resolvaddr { pid_t pid; u_int32_t inetaddr; char *where; }; struct gotname { char *where; char name[RESOLVE_MAX]; }; netdiag-1.2/netwatch-1.3.1-2/netwatch-1.3.1.lsm000066400000000000000000000021351323731111400203660ustar00rootroot00000000000000Begin3 Title: NETWATCH Version: 1.3.1 Entered-date: 02OCT2015 Description: - Views the ETHERNET & PPP for hosts/packet counts/ protocols and displays in NCURSES format with COLOUR indicating hosts activity (RED current/ Yellow > 1min / Green >5min Blue >30min ) - Provides an ETHERNET/PPP "top" program for isolating high bandwidth hosts - Allows selection of individual hosts (Remote or Local) and monitors the transmissions - Provides Router statistics using the passive monitoring (rather than querying the router box itself) - Code loosely based on Statnet2.1, but presentation and direction is significantly different. Thanks to Jeroen Baekelandt and Scot Wilcoxon for Statnet2.1. Keywords: net monitor load ethernet ppp sniffer Author: mackay@uno.slctech.org ( Gordon MacKay ) Maintained-by: mackay@uno.slctech.org ( Gordon MacKay ) Primary-site: uno.slctech.org ~mackay/NETWATCH Alternate-site: sunsite.unc.edu /pub/Linux/system/network/monitor 116k netwatch-1.3.1-2.tgz Platforms: Linux Copying-policy: GPL End netdiag-1.2/netwatch-1.3.1-2/netwatch.1000066400000000000000000000064241323731111400173020ustar00rootroot00000000000000.\" "%W% %G%" .TH NETWATCH\ Version 1.0c .SH NAME Netwatch \- Ethernet Internet Protocol Monitor .SH SYNOPSIS .B netwatch [ -h ] [-b] [-i dd.dd.dd.dd] [-m dd.dd.dd.dd] [-n] [ - t] [ -e ethnum ] [ -c netconfigfile ] .SH DESCRIPTION .I Netwatch examines all the packets travelling on an ethernet and analyses the IP packets. The information is tallied according to the source and destination hosts. An .I "ncurses" display indicates a dual-list status for all hosts. The left display refers to LOCAL hosts. The right list refers to REMOTE hosts. It is possible to examine statistics (counts) on number of packets, bytes, IP service type and last communication host for each host. Use the arrow keys (left and right) to change the display. .TP .SH OPTIONS .TP .B \-e ethnum .B ethnum is the name of the ethernet device to attempt to run with .B netwatch. (e.g. .B \-e eth1 selects the .I eth1 device rather than the default .I eth0 device. .TP .B \-c confignetfile selects the name of the file which contains the .I ifconfig information. Note that this is not necessary since .B netwatch will use the route information from .B /proc/net to build all the information needed (without using ANY configuration file). .TP .B \-b For a transparent bridge, ignore every other packet... (older kernels) .TP .B \-i dd.dd.dd.dd Fake a local internet address for "this" machine... (useful in making .I fake local net for monitoring when combined with the .I \-m option ) .TP .B \-m dd.dd.dd.dd Fake the .I netmask which is used for the local net evaluation .TP .B \-n Do not resolve names (just display addresses) .TP .B \-h Simple help information .TP .B \-t Start Netwatch in TOP Mode (30 sec. startup delay) .SH USER COMMANDS .PP The following description will attempt to clarify what keys .B netwatch understands. It is important to know that the program is .I mode dependent. This means commands may change depending on the current mode. The primary mode is .B dual-list mode. In this mode use .TP .B key \- switch scroll display to the other list (dual-lists). Look for .B KEY. .TP .B key \- Change display options (moving left through the options) .TP .B key \- Change display options (moving right through the options) .TP .B key \- Scroll to previous host page on the current list (see .B KEY) Change display options (moving right through the options) .TP .B key \- Scroll to next host page on the current list (see .B KEY) .TP .B h key \- gives help screen .TP .B t key \- Toggle TOP mode (where 30 sec update on busiest hosts) .TP .B c key \- Clear counts for all hosts .TP .B n key \- Clean the remote & local host tables .TP .B N key \- Clean the remote OR local host tables (depends on which is current) .TP .B L key \- Produce LOG of current display entries (REMOTE or LOCAL) .TP .B b key \- Toggle display of BLUE entries (OLD) .TP .B d key \- Toggle display of DOMAIN entries (Name Server Queries) .TP .B w key \- Enter WATCH mode for viewing ROUTING stats and HOST packets .TP .B , or .B q key \- Exits the program .SH AUTHOR .PP .I Gordon MacKay .RS .nf mackay@gmml.slctech.org .fi .RE .SH COPYRIGHT .PP Copyright (c) Gordon MacKay 1997, under GPL .SH BUGS .PP Yes, but hopefully the program is better than it was... netdiag-1.2/netwatch-1.3.1-2/netwatch.alpha.patches000066400000000000000000000424231323731111400216540ustar00rootroot00000000000000From paul@wau.mis.ah.nl Tue Jan 12 03:27:14 1999 Return-Path: Received: from janux.wau.mis.ah.nl (mail@ahwau.xs4all.nl [194.109.102.29]) by uno.slctech.org (8.9.0/8.9.0) with ESMTP id DAA25111 for ; Tue, 12 Jan 1999 03:27:10 -0500 Received: from paul by janux.wau.mis.ah.nl with local (Exim 2.02 #1 (Debian)) id 0zzz5t-000839-00; Tue, 12 Jan 1999 09:22:33 +0100 Date: Tue, 12 Jan 1999 09:22:33 +0100 From: Paul Slootman To: mackay@uno.slctech.org Subject: netwatch 0.8a 64-bit patches Message-ID: <19990112092232.A30917@janux> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" X-Mailer: Mutt 0.94.15i Sender: Paul Slootman Status: RO X-Status: --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii I went ahead and fixed netwatch for the Alpha. I've also just verified that this still works on i386 as well. I've also made some other fixes to ensure a clean compile (missing include files, unused variables). Please look the patch over and and it to the mainstream distribution; 64 bit platforms are becoming more and more popular! Thanks, Paul Slootman -- home: paul@wurtel.demon.nl | work: paul@murphy.nl | debian: paul@debian.org http://www.wurtel.demon.nl | Murphy Software, Enschede, the Netherlands --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="netwatch.diff" diff -ru netwatch0.8a/dispdata.c netwatch0.8a.64bitclean/dispdata.c --- netwatch0.8a/dispdata.c Sun Oct 18 03:04:09 1998 +++ netwatch0.8a.64bitclean/dispdata.c Mon Jan 11 21:07:21 1999 @@ -25,6 +25,8 @@ #include #include +#include +#include #define MAXREFRESH 15 #define ROUTERSTATSMAX 60 @@ -83,12 +85,12 @@ extern int magnaoffs; extern char magnamatch[RESOLVE_MAX]; extern HOSTINFO *magnaspot; -extern unsigned long int magnakey; +extern u_int32_t magnakey; extern int magnaphys; extern int magnafirst; extern int magnafull; extern HOSTINFO *magnacomhost; -extern unsigned long int magnacomkey; +extern u_int32_t magnacomkey; unsigned char *ttp; @@ -198,7 +200,6 @@ static unsigned long int use; double fuse; extern unsigned long int routeruse; - extern int bugfix; int lcnt = 0; int rcnt = 0; @@ -210,7 +211,6 @@ unsigned char *pc; extern int help; extern int watch; - extern int wai; extern int llockout; extern int rlockout; extern int lydisp; @@ -227,8 +227,6 @@ extern unsigned long routeruse; static unsigned long orouterto = 0; static unsigned long orouterfrom = 0; - static unsigned long orouteruse = 0; - unsigned long wrouteto, wroutefrom, wrouteuse; int localbypass = FALSE; int remotebypass = FALSE; time_t mnew; @@ -656,11 +654,11 @@ strncpy (thost, current->name, curshosttrim); if (selectchange && selecthost && numselect + 4 == yact) { - magnakey = *((unsigned long *) current->addr); + magnakey = *((u_int32_t *) current->addr); strncpy (magnamatch, current->name, RESOLVE_MAX); magnaspot = current; magnacomhost = NULL; - magnacomkey = *((unsigned long *) current->othaddr); + magnacomkey = *((u_int32_t *) current->othaddr); magnafirst = TRUE; selectchange = FALSE; } @@ -694,15 +692,15 @@ switch (dispopt) { case DISP_TX_RC: - sprintf (ttt, "%*s %6d %6d", -curshosttrim - 1, thost, + sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->pktcntsend, current->pktcntrec); break; case DISP_INTTXRCP: - sprintf (ttt, "%*s %6d %6d", -curshosttrim - 1, thost, + sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->intpktcntsend, current->intpktcntrec); break; case DISP_EXTTXRCP: - sprintf (ttt, "%*s %6d %6d", -curshosttrim - 1, thost, + sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->extpktcntsend, current->extpktcntrec); break; case DISP_IPPROTO: @@ -852,11 +850,11 @@ strncpy (thost, current->name, curshosttrim); if (selectchange && selecthost && numselect + 4 == yact) { - magnakey = *((unsigned long *) current->addr); + magnakey = *((u_int32_t *) current->addr); strncpy (magnamatch, current->name, RESOLVE_MAX); magnaspot = current; magnacomhost = NULL; - magnacomkey = *((unsigned long *) current->othaddr); + magnacomkey = *((u_int32_t *) current->othaddr); magnafirst = TRUE; selectchange = FALSE; } @@ -895,7 +893,7 @@ case DISP_TX_RC: case DISP_INTTXRCP: case DISP_EXTTXRCP: - sprintf (ttt, "%*s %6d %6d", -curshosttrim - 1, thost, + sprintf (ttt, "%*s %6ld %6ld", -curshosttrim - 1, thost, current->pktcntsend, current->pktcntrec); break; case DISP_IPPROTO: diff -ru netwatch0.8a/gh.c netwatch0.8a.64bitclean/gh.c --- netwatch0.8a/gh.c Tue Oct 20 03:10:13 1998 +++ netwatch0.8a.64bitclean/gh.c Mon Jan 11 21:19:30 1999 @@ -18,7 +18,9 @@ #endif #include #include +#include #include +#include #define MAGIC_PORT 20200 @@ -45,7 +47,6 @@ FILE *pp; int i; struct sockaddr_in name; - struct hostent *hp, *gethostbyaddr (); struct hostent *mh; char maddr[40]; char saddr[256]; diff -ru netwatch0.8a/netresolv.c netwatch0.8a.64bitclean/netresolv.c --- netwatch0.8a/netresolv.c Sun Oct 18 03:04:09 1998 +++ netwatch0.8a.64bitclean/netresolv.c Mon Jan 11 21:20:40 1999 @@ -1,5 +1,11 @@ #include "config.h" +#include +#include +#include #include +#ifdef NETINET_SUPP_in +#include +#endif #include #include #include @@ -62,7 +68,7 @@ #define MAXENTRIES 400 struct resolvaddr entries[MAXENTRIES]; -char *dbgaddr(unsigned long val) +char *dbgaddr(u_int32_t val) { unsigned char *p; static char buf[40]; /* Worst case scenario for %u conversions */ @@ -79,7 +85,7 @@ fprintf(dfp,"Adding entry...netresolv... \n"); fflush(dfp); #endif - place = (struct nqueue *)malloc(sizeof(*place)); + place = malloc(sizeof(*place)); place->resentry = *entry; #ifdef DEBUG fprintf(dfp,"Added entry...netresolv... %s\n",dbgaddr(entry->inetaddr)); @@ -146,8 +152,6 @@ void sigtimecatch(int sig) { - struct resolvaddr entry; - signal(SIGALRM, sigincatch); #ifdef DEBUG fprintf(dfp,"TIMEOUT SIGNAL CAUGHT\n"); @@ -169,7 +173,6 @@ struct gotname finalentry; struct hostent *res; unsigned char *p; - char addrchar[20]; int i; #ifdef DEBUG @@ -213,7 +216,7 @@ #endif res = gethostbyaddr(p, - sizeof(unsigned long int),AF_INET); + sizeof(struct in_addr),AF_INET); alarm(0); /* Build return entry... */ if (res) diff -ru netwatch0.8a/netresolv.h netwatch0.8a.64bitclean/netresolv.h --- netwatch0.8a/netresolv.h Sun Oct 18 03:04:09 1998 +++ netwatch0.8a.64bitclean/netresolv.h Mon Jan 11 21:02:36 1999 @@ -5,7 +5,7 @@ struct resolvaddr { pid_t pid; - unsigned long inetaddr; + u_int32_t inetaddr; char *where; }; diff -ru netwatch0.8a/netwatch.c netwatch0.8a.64bitclean/netwatch.c --- netwatch0.8a/netwatch.c Tue Oct 20 03:41:54 1998 +++ netwatch0.8a.64bitclean/netwatch.c Mon Jan 11 21:18:18 1999 @@ -70,6 +70,7 @@ #endif #endif +#include #include #include /* @@ -265,12 +266,12 @@ int magnaoffs = MAGNAOFFS; char magnamatch[RESOLVE_MAX]; HOSTINFO *magnaspot; -unsigned long int magnakey; +u_int32_t magnakey; int magnaphys = 0; int magnafirst = TRUE; int magnafull = FALSE; HOSTINFO *magnacomhost = NULL; -unsigned long int magnacomkey; +u_int32_t magnacomkey; double maxburst = 0.0; unsigned char netmask[4] = @@ -382,8 +383,9 @@ void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr); void handle_ip (struct ip *buf, int length); void processinetrc (unsigned char *netmask, unsigned char *local, int *peth); - - +int doeth(void); +int gh(int); +int dokeyin(void); typedef void (*sigfunc) (int); @@ -444,7 +446,7 @@ struct resolvaddr one; one.pid = mypid; - one.inetaddr = *(unsigned long *) p; + one.inetaddr = *(u_int32_t *) p; one.where = where; write (msocket[1], &one, sizeof (one)); kill (child, SIGUSR1); @@ -768,10 +770,9 @@ static char dumbuf[80]; char dum; int n; - long int cmset, rset, cset, eset; + long int rset, cset, eset; int maxfd; int tfd = 0; - static int fair = 0; struct timeval seltime; @@ -867,11 +868,9 @@ } - +int main (int argc, char *argv[]) { - int dum; - char *device = ETH; { /* * Compound statement to make initializers @@ -904,7 +903,7 @@ dup2 (osocket[1], 1); close (osocket[1]); execlp ("netresolv", "netresolv", NULL); - perror ("NETRESOLV"); + perror ("exec netresolv"); exit (1); } close (msocket[0]); @@ -1212,24 +1211,24 @@ } int - tlocal (unsigned long *addr) + tlocal (u_int32_t *addr) { static unsigned char lhost[] = {127, 0, 0, 1}; - unsigned long *k = (unsigned long *) netmask; - unsigned long reslocal, restest; - if (*addr == *(unsigned long *) lhost) + u_int32_t *k = (u_int32_t *) netmask; + u_int32_t reslocal, restest; + if (*addr == *(u_int32_t *) lhost) return (TRUE); restest = *addr & *k; - reslocal = *(unsigned long *) localaddr & *k; + reslocal = *(u_int32_t *) localaddr & *k; return (restest == reslocal); } void - searchforinsertion (unsigned long key, HOSTINFO * first) + searchforinsertion (u_int32_t key, HOSTINFO * first) { current = first->flink; - while (current != first && key < (unsigned long) ntohl (*(unsigned long *) current->addr)) + while (current != first && key < (u_int32_t) ntohl (*(u_int32_t *) current->addr)) current = current->flink; } @@ -1286,7 +1285,6 @@ getlastname (char *dest, int max) { char *p; - char *origdest = dest; int i = 0; /* @@ -1321,13 +1319,13 @@ updatecurrent (HOSTINFO * work, struct ip *buf, int length, int opt, int destlocal, int orglocal) { int x; - unsigned long wlen; + int wlen; static char tpr[30]; /* * static unsigned char finpk[] = { 206, 248, 7, 5 }; */ - wlen = (unsigned long) ntohs (buf->tot_len); + wlen = ntohs (buf->tot_len); /* * Update current entries */ @@ -1444,16 +1442,14 @@ static char ftpversion[256]; void - addtolocallist (unsigned long *key, unsigned long *okey, struct ip *buf, int length, int opt) + addtolocallist (u_int32_t *key, u_int32_t *okey, struct ip *buf, int length, int opt) { - static int mcnt = 0; - static int ncnt = 0; unsigned char *pk = (unsigned char *) key; - unsigned long wlen; + int wlen; char *ss; static struct hostent *phost; - wlen = (unsigned long) ntohs (buf->tot_len); + wlen = ntohs (buf->tot_len); if (fish == NULL && !fishlen) { @@ -1504,16 +1500,16 @@ /* * } if (fishlen == 30000) fclose(fish); */ - searchforinsertion ((unsigned long) ntohl (*key), lfirst); - if (*(unsigned long *) current->addr != *key) + searchforinsertion ((u_int32_t) ntohl (*key), lfirst); + if (*(u_int32_t *) current->addr != *key) { - work = (HOSTINFO *) malloc (sizeof (*work)); + work = malloc (sizeof (*work)); previous = current->blink; /* * Init values to ZERO for 1st entry.... */ clearentry (work); - *(unsigned long *) work->addr = *key; + *(u_int32_t *) work->addr = *key; /* * work->disprow = previous->disprow + 1; */ @@ -1624,7 +1620,7 @@ { magnacomhost = work; } - *(unsigned long *) work->othaddr = *okey; + *(u_int32_t *) work->othaddr = *okey; if (tlocal (okey)) updatecurrent (work, buf, length, opt, LOCUPDATE, LOCUPDATE); @@ -1633,22 +1629,19 @@ } void - addtoremotelist (unsigned long *key, unsigned long *okey, struct ip *buf, int length, int opt) + addtoremotelist (u_int32_t *key, u_int32_t *okey, struct ip *buf, int length, int opt) { unsigned char *pk = (unsigned char *) key; - int x; - int dzero = 0; - char star = '*'; - unsigned long wlen; + int wlen; char *ss; - wlen = (unsigned long) ntohs (buf->tot_len); + wlen = ntohs (buf->tot_len); - searchforinsertion ((unsigned long) ntohl (*key), rfirst); - if (*(unsigned long *) current->addr != *key) + searchforinsertion ((u_int32_t) ntohl (*key), rfirst); + if (*(u_int32_t *) current->addr != *key) { - work = (HOSTINFO *) malloc (sizeof (*work)); + work = malloc (sizeof (*work)); previous = current->blink; /* * Init values to ZERO for 1st entry.... @@ -1660,7 +1653,7 @@ work->update = 1; work->telnet_in = 0; remoteupdate = 1; - *(unsigned long *) work->addr = *key; + *(u_int32_t *) work->addr = *key; memcpy (work->badmac, fillmac, sizeof (fillmac)); if (!opt) { /* @@ -1792,7 +1785,7 @@ { magnacomhost = work; } - *(unsigned long *) work->othaddr = *okey; + *(u_int32_t *) work->othaddr = *okey; if (tlocal (okey)) updatecurrent (work, buf, length, opt, LOCUPDATE, REMUPDATE); else @@ -1801,17 +1794,14 @@ } void - handle_ip (struct ip *buf, int length) + handle_ip (struct ip *argbuf, int length) { - static int x; - long sourcel; - long destl; - struct hostent *hostent; - unsigned long wlen; - + int wlen; + struct ip bufstruct, *buf = &bufstruct; + memcpy(buf, argbuf, sizeof(struct ip)); /* to fix unaligned accesses */ new = time (0); - wlen = (unsigned long) ntohs (buf->tot_len); + wlen = ntohs (buf->tot_len); selprob = 40; if (buf->ip_p <= SN_MAX_IP_PORT) { /* @@ -1822,19 +1812,19 @@ } /* * if IP protocol type is to be tallied */ - if (tlocal ((long int *) &buf->saddr)) - addtolocallist ((unsigned long int *) &buf->saddr, (unsigned long int *) &buf->daddr, buf, length, 0); + if (tlocal ((u_int32_t *) &buf->saddr)) + addtolocallist ((u_int32_t *) &buf->saddr, (u_int32_t *) &buf->daddr, buf, length, 0); else { - addtoremotelist ((unsigned long int *) &buf->saddr, (unsigned long int *) &buf->daddr, buf, length, 0); + addtoremotelist ((u_int32_t *) &buf->saddr, (u_int32_t *) &buf->daddr, buf, length, 0); routeruse += wlen; routerfrom += wlen; } - if (tlocal ((long int *) &buf->daddr)) - addtolocallist ((unsigned long int *) &buf->daddr, (unsigned long int *) &buf->saddr, buf, length, 1); + if (tlocal ((u_int32_t *) &buf->daddr)) + addtolocallist ((u_int32_t *) &buf->daddr, (u_int32_t *) &buf->saddr, buf, length, 1); else { - addtoremotelist ((unsigned long int *) &buf->daddr, (unsigned long int *) &buf->saddr, buf, length, 1); + addtoremotelist ((u_int32_t *) &buf->daddr, (u_int32_t *) &buf->saddr, buf, length, 1); routeruse += wlen; routerto += wlen; } @@ -1843,9 +1833,6 @@ void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr) { - int prot_int; - int search_int; - int prot_now; struct ip *ip_ptr; ip_ptr = (struct ip *) ((void *) buf + ETH_HLEN); @@ -1963,9 +1950,10 @@ if (length) { handle_frame (buf, length, &saddr); + return 0; /* XXX-PS: wasn't here, but then there's no return... */ } else - return (0); + return (-1); /* XXX-PS: used to be return 0, but elsewhere failure is tested */ } @@ -2188,7 +2176,7 @@ * In child process... to handle stats... */ gostats (); - exit (); + exit (0); } break; diff -ru netwatch0.8a/processinetrc.c netwatch0.8a.64bitclean/processinetrc.c --- netwatch0.8a/processinetrc.c Sun Oct 18 03:04:09 1998 +++ netwatch0.8a.64bitclean/processinetrc.c Mon Jan 11 21:19:03 1999 @@ -4,8 +4,10 @@ Copyright G. MacKay under the GNU GPL */ +#include #include #include +#include FILE *fp; extern char configfile[]; @@ -92,7 +94,7 @@ rest); if (!strcmp (ethdevname, devname)) { - if (atoi (flags) & 1 == 1) /* Thanks Dave...! */ + if ((atoi (flags) & 1) == 1) /* Thanks Dave...! */ { cvhextohost (dest, local); cvhextohost (mask, netmask); @@ -116,7 +118,6 @@ { unsigned int hold[4]; - long *netint; int ethere = 0; int netmaskglobal = 0; int ipglobal = 0; @@ -126,7 +127,7 @@ *ok = 0; - if (fp = fopen ("/proc/net/route", "r")) + if ((fp = fopen ("/proc/net/route", "r"))) { processproc (fp, netmask, local, ok); fclose (fp); diff -ru netwatch0.8a/services.c netwatch0.8a.64bitclean/services.c --- netwatch0.8a/services.c Sun Oct 18 03:04:09 1998 +++ netwatch0.8a.64bitclean/services.c Mon Jan 11 21:07:40 1999 @@ -6,6 +6,9 @@ /* This routine initializes the names for port numbers. */ /* These are from RFC 1700, "Assigned Numbers", which are from hither and yon. */ +#include +#include +#include #include "netwatch.h" int hashport( int port, int hash) @@ -48,15 +51,13 @@ void addtolist(struct port_info *first[], int port, char *name, int hash) { int spot; - struct port_info *current; - struct port_info *previous; struct port_info *place; spot = hashport(port,hash); place = (struct port_info *)malloc( sizeof(*first[spot])); - place->name = (char *) malloc(strlen(name)+1); + place->name = malloc(strlen(name)+1); strcpy(place->name,name); place->port = port; if (first[spot]) --J2SCkAp4GZ/dPZZf-- netdiag-1.2/netwatch-1.3.1-2/netwatch.c000066400000000000000000003125631323731111400173700ustar00rootroot00000000000000/* * NETWATCH is based on some code from Statnet * Statnet is protected under the GNU Public License (GPL2). * Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) * 27DEC95: Scot E. Wilcoxon (sewilco@fieldday.mn.org) * NETWATCH is VERY loosely based on the code from Statnet... thanks out * to Jeroen and Scot... * * NETWATCH allows a user (superuser) to monitor an ETHERNET and examine * activity on the network. Hostnames are highlighted in colours (for * those supporting them) to indicate activity on the bus network based on * time ( less than 1 minute RED, less than 5 minutes YELLOW, less than 30 * minutes GREEN and otherwise BLUE). The monitor includes statistics on * a) Transmitted and received packets b) Protocol of LAST packet (TX or * RC) c) LAST Communication partner (IP address) * * The number of hosts capable of support is a function of memory. They * are stored in 2 doubly-linked lists (local and remote). * * Screen updates take place 1 per second (unless a rare lockout... when * linked list links are updating... in which case it displays in the next * second) * * Keyboard usage is admittedly limited (and a kludge... due to some * ncurses settings that need better tinkering) -> Go forward to next * option <- Go backward to previous option Go back to * previous page (back 20 lines on most consoles) Go forward * to next page (forward 20 lines on most consoles) c Clear counters * for fresh counting n Clear linked lists for new start * * It is a simple program to execute for ETHERNET under LINUX. It assumes * that there is a "/etc/rc.d/rc.inet1" file for network configuration. If * so, it checks for an "eth0" ifconfig and picks up the netmask from the * file. UPDATE: It actually looks at the /proc entry for device configuration * to get its info... if no /proc THEN it trys the config file (for OLD SL * systems) * * For those with multiple "eth" interfaces, I am sorry it doesn't support * both simultaneously. * * AUTHOR: G. MacKay E-MAIL: mackay@gmml.slctech.org * * P.S. Given the fact that I was sick for 3 days and decided to write * this code... forgive me for not writing beautiful code... (those that * know me, probably don't think my code is beautiful when I am healthy) * * NEW CODE IS COPYRIGHTED to G. MacKay under GPL * * Jan. 2 2009 -- Adding the masking of the ssh connection if run over ssh to remote host * (option -k) */ /* * This is the main FILE */ #define MAIN_LINE 1 #include "config.h" #ifdef NEWCURSES_SUPP #include #else #ifdef NEWCURSESROOT_SUPP #include #else #include #endif #endif #include #include #include #include #include /* * #include */ #include #include #ifdef NETINET_SUPP_in #include #else #include #endif #ifdef NETINET_SUPP_if_ether #include #else #include #endif #include #include #ifdef NETINET_SUPP_if #include #else #include #endif #ifdef NETINET_SUPP_if_ppp #include #else #include #endif #include #ifdef NETINET_SUPP_ip #include #else #include #endif #ifdef NETINET_SUPP_tcp #include #else #ifdef NETINET_SUPP_ip_tcp #include #else #include #endif #endif #ifdef NETINET_SUPP_udp #include #else #ifdef NETINET_SUPP_ip_udp #include #else #include #endif #endif #if NETINET_SUPP_icmp #include #else #include #endif #if SYS_IF_PACKET_H #include #endif #if LINUX_IF_PACKET_H #include #endif #if NET_IF_PACKET_H #include #endif #include #include #include "semaphore.h" #include #include #include #include #include "curs.h" #include "netresolv.h" #include "netwatch.h" extern int errno; #define MAXFILENAME 256 char *version = VERSION; char *iv = RELEASE; char progtitle[60]; char mylog[MAXFILENAME] = "/root/.log"; char specconfigfile[MAXFILENAME] = "/root/.netwatch.conf"; int fdlog; #if defined(_LINUX_IF_ETHER_H) || defined(_NETINET_IF_ETHER_H) #undef NET_3 /* * not using Net/3 definitions */ #endif #ifndef ETH_HLEN #define ETH_HLEN 14 /* * Ethernet header length */ #endif #ifndef ETH_P_ATALK #define ETH_P_ATALK 0x809B /* * Appletalk */ #endif #ifndef SOCK_PACKET #define SOCK_PACKET SOCK_RAW /* * If SOCK_PACKET is wrong, try SOCK_RAW */ #endif #ifndef NET_3 #define ether_head ethhdr /* * ether_head structure */ #define ether_type h_proto /* * Ethernet Packet Type ID field */ #define ip iphdr /* * IP header structure */ #define ip_off frag_off /* * IP protocol field */ #define ip_p protocol /* * IP protocol field */ #define ip_hl ihl /* * IP header length field */ #ifndef _NETINET_IP_TCP_H #ifndef __FAVOR_BSD #define th_sport source /* * TCP source port field */ #define th_dport dest /* * TCP destination port field */ #endif #endif #ifdef LINUXINET_SUPP_udp #define ui_sport source /* * UDP source port field */ #define ui_dport dest /* * UDP destination port field */ #endif #endif #define ETHERHEADSIZE (sizeof(struct ether_head)) int ethsz = ETHERHEADSIZE; #define IPSIZE (sizeof(struct ip)) int ipsz = IPSIZE; #define IPOPTSIZE 12 int ipoptsz = IPOPTSIZE; #define TCPHEADSIZE (sizeof(struct tcphdr)) int tcpheadsz = TCPHEADSIZE; #define SN_RCV_BIGBUFSIZE 2048 /* #define SN_RCV_BIGBUFSIZE SN_RCV_BUF_SIZE+80 * above was 1600, but kernel discards */ /* * excess and tells us full length, */ /* * so we only need enough to analyze. */ const int sn_rcv_bufsize = SN_RCV_BIGBUFSIZE; int ESCON = 0; #define ESC 0x1b #define RETURNKEY 0x0d #define CONTROLL 12 #define MAXHELPPAGE 3 HOSTINFO ldummy, rdummy; HOSTINFO *lfirst, *rfirst, *previous, *current, *next, *work; int ssh_run=0; char *ssh_env; char ssh_orig_addr_asc[40]; u_int32_t ssh_orig_addr; u_int16_t ssh_orig_port; u_int16_t ssh_dest_port; int ssh_mask=0; Semaphore masterdo; CREATE_LOCK(indisp); CREATE_LOCK(inrlist); CREATE_LOCK(inllist); CREATE_LOCK(resolvechange); int show_watch = 0; int show_help = 0; /* * TIMER for measuring */ time_t new; time_t starttime; time_t wakeup_reload; int wakeup_state = FALSE; time_t reload_timer_start; int reload_timer_sec = 0; int reload_active = FALSE; int statsdate = FALSE; int statsappend = TRUE; char tmstring[256] = "%Y.%m.%d.%H.%M"; int freezedisplay = FALSE; int lastfreeze = FALSE; int sentclear = FALSE; int donecleaning = TRUE; int recresolv = 0; int timeresolv = 0; int sendresolv = 0; int errread = 0; int errioctl = 0; int bpsflag = 0; #define MAXDAYROUTE 1440 float dayroute[MAXDAYROUTE]; int cur_dayroute = 0; int routersummary = FALSE; int rdelta = 60; int router_offset = 0; int autostatus = TRUE; int noresolv = FALSE; int rel_hours, rel_mins; int localcount = 0; int remotecount = 0; #define MAXSTATUS 14 #define STATUSSIZE 512 char status_lines[MAXSTATUS][STATUSSIZE]; int cur_status_line = 0; int sREDTIME = 60; int sYELLOWTIME = 300; int sGREENTIME = 1800; char configfile[MAXFILENAME] = "/etc/rc.d/rc.inet1"; char statsfile[MAXFILENAME] = "/etc/netwatch.stats"; char newstatsfile[MAXFILENAME]; int newconfig = FALSE; char ethdevname[64] = "eth0"; int newethname = FALSE; int probcnt = 0; /* * Problem Count on ETH reads */ int intrcnt = 0; /* * EINTR hits on ETH reads */ int destroy_program = FALSE; #define MAGNABUFSIZE 2048 struct magrec { int len; char dir; unsigned char buf[MAGNABUFSIZE]; }; #define MAGNAMAX 1024 #define MAGNAOFFS 40 struct magrec magna[MAGNAMAX]; int magnacnt = 0; int magnaoffs = MAGNAOFFS; char magnamatch[RESOLVE_MAX]; HOSTINFO *magnaspot; u_int32_t magnakey; int magnaphys = 0; int magnafirst = TRUE; int magnafull = FALSE; HOSTINFO *magnacomhost = NULL; u_int32_t magnacomkey; double maxburst = 0.0; double absmaxburst = 0.0; unsigned char netmask[4] = { 255, 255, 255, 0 }; unsigned char localaddr[4]; int ethok = 1; struct hostent *hostent; int wai = 0; int selprob = 0; int selcode = 0; int bugfix = FALSE; int help = FALSE; int helppage = 1; int watch = FALSE; int remoterow = -1; int localrow = -1; int localupdate = 0; int remoteupdate = 0; int poschange = 0; int refreshloc = 0; int refreshrem = 0; int refreshgen = 0; int llockout = 0; int rlockout = 0; int lydisp = 0; int rydisp = 0; int ydisp = 0; int localkey = TRUE; int dispopt = DISP_TX_RC; int colour; unsigned long int routeruse = 0; unsigned long int routerto = 0; unsigned long int routerfrom = 0; int disprouterstats = FALSE; int scrmid; int selecthost = FALSE; int numselect = 0; int selectside = 0; int selectchange = FALSE; int bluedie = 0; int ignoredomain = 0; int statpid = -1010; /* * Magic number to indicate NO * status process present */ int sd; char tmpbuf[512]; char speclogfile[MAXFILENAME] = "/root/.watchlog"; FILE *fpspeclog; int speclog = 0; int printtospeclog = 0; int speclogext = 0; int topflag = 0; HOSTINFO *toplocal; HOSTINFO *topremote; HOSTINFO tldummy, trdummy; /* * For screen size independent settings.... display... */ int curskeyspot; int curskeyval; int cursllockout; int cursrlockout; int curslines; int curshosttrim; int cursproto; int cursdest; int noscreen = 0; int fishspeclog = 0; /* * old speclog for fishing * expedition */ long int ethcnt = 0; int isethdev = TRUE; int keycnt = 0; int repeatcount = 1; int repeatindex = 0; char repeatbuf[512]; int isbridge = FALSE; int dupcount = 0; int forcelocal = FALSE; u_int32_t flocal; int nonameresolve = FALSE; int forcemask = FALSE; u_int32_t fmask; int nokeys = FALSE; unsigned char workingmac[ETH_ALEN]; /* * unsigned char badmac[ETH_ALEN]; */ /* * unsigned long badmactime; */ #define SMALLSCREEN 0 #define FULLSCREEN 1 unsigned char buf[SN_RCV_BIGBUFSIZE + 1]; unsigned char rbuf[SN_RCV_BIGBUFSIZE + 1]; struct ifreq ifr, oldifr; struct sockaddr_in *pin; struct at_frame_type { unsigned char filler[20]; u_int16_t appletalk_type1; /* * what is formal name? */ unsigned char filler2[12]; u_int8_t appletalk_type2; /* * what is formal name? */ }; /* * Ethernet Appletalk */ #define SIM_MAGIC 0xfafa unsigned short simmagic = SIM_MAGIC; /* Simulator file.... STARTING TIME (on creation) * MAGIC (16 bits) * PACKET OFFSET TIME (from starting time) * LENGTH of remainder in bytes * PACKET Data (Length long) * MAGIC (16 bits) * etc... */ int simchange = FALSE; int simfwdir = TRUE; int simarr[8] = { 4, 4, 4, 4, 4, 4, 4, 4 }; char *simfmt = "\\%d<\\%d<\\%d<\\%d%c\\%d>\\%d>\\%d>"; const int MAXTHEM = 512; const int MAXTHEMm1 = 511; /* * #define MAXTHEM 20 * #define MAXTHEMm1 MAXTHEM */ int themnum = 0; u_int32_t logthem[512]; /* Up to 20 log names allowed */ time_t actstart; double mactstart; clock_t lasttime; /* last NOW... */ clock_t offsclk = 0; /* Offset from sim. start */ clock_t loff = 0; clock_t lrealoff = 0; clock_t fileclk; /* Clock INSIDE file record */ struct tms dumbtime; clock_t sclk; /* Starting time of program... */ int iseth = FALSE; int nw_logall = 0; char nw_allname[256] = "/root/nw_allpackets"; FILE *nw_fpall = NULL; int nw_logremote = 0; char nw_remname[256] = "/root/nw_rempackets"; FILE *nw_fprem = NULL; int nw_loglocal = 0; char nw_locname[256] = "/root/nw_locpackets"; FILE *nw_fploc = NULL; int nw_logindiv = 0; char nw_indivmain[256] = "/root/nw_indiv."; int nw_logselect = 0; int nw_simulate = 0; char nw_simfile[256] = ""; enum { SIMSEC, SIMKEY }; int nw_simrate = SIMSEC; int simkeyrate = 0; FILE *simfp = NULL; int plogselect = 0; int plogdeselect = 0; int buf_detail = 0; /* For ASCII default */ #define BUF_DETAIL_MAX 3 int mailflag = 1; int syslogflag = 1; char userwarn[512] = "noone@xxx.xxx.xxx"; /* ENTER your MAIL Address here.. */ char fishstring[512] = ""; int fishstringlen = 0; void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr, int eth, int direct); void handle_ip (struct ip *buf, int length, int direct); void processinetrc (unsigned char *netmask, unsigned char *local, int *peth); void warning (char s[], unsigned char *buf); pthread_t keythread; pthread_t netthread; void *all_keyins( void *); void *all_netins( void *); typedef void (*sigfunc) (int); /* * Section for FIFO and X-term I/F * FIFO name, FIFO descriptor, FIFO flag... if using? * */ char fifoname[256] = "/root/.netwatch.pipe"; int fifo; int using_fifo = FALSE; int fifoval = 0; #define FIFOMARK 0xf5 const int INTSIZE = sizeof (short int); static pid_t mypid, child; int msocket[2]; int osocket[2]; int resolvetimeout = 0; extern long int timezone; int movemagnakeyloc = FALSE; int movemagnakeyrem = FALSE; u_int32_t searchaddr = 0; void findaddr (u_int32_t searchaddr); void uthread_wait( long usec) { struct timespec work; struct timespec rwork; work.tv_sec = 0; work.tv_nsec = usec*1000; while ( nanosleep(&work,&rwork) < 0 ) { work = rwork; } } void do_fifo () { static short int keycomm[256]; unsigned char look; short int id; short int length; unsigned char *p; int i; u_int32_t lookaddr; /* Read from FIFO until marker is found... */ do { if (read (fifo, &look, 1) < 0) { look = -1; break; } } while (look != FIFOMARK); /* * If good read... Read ID and Length * then read into buffer the actual length of data * then read FINAL mark... */ if (look == FIFOMARK) { read (fifo, &id, INTSIZE); read (fifo, &length, INTSIZE); //!!mvprintw (2, 3, "ID=%3d LENGTH=%3d", id, length); if (length < 256) read (fifo, keycomm, length * INTSIZE); do { if (read (fifo, &look, 1) < 0) { look = -1; break; } } while (look != FIFOMARK); fifoval = keycomm[0]; if (look == FIFOMARK) { switch (id) { case 1: for (i = 0; i < length; i++) dokeyin (keycomm[i]); break; case 4: cur_status_line = fifoval; break; case 5: rewrite_labels = 1; dispopt = fifoval; break; case 6: lookaddr = *(u_int32_t *) keycomm; p = (unsigned char *) keycomm; //!!mvprintw (1, 3, "%u.%u.%u.%u", p[0], p[1], p[2], p[3]); findaddr (lookaddr); break; } } //!!else //!! mvprintw (1, 3, "INCORRECT PACKET FORMAT"); refresh (); } } void adjusttime (time_t * pt, int hrs, int mins) { struct tm tm; struct tm *ps; time_t v; int i, j; v = time (0); ps = localtime (&v); tm = *ps; if (hrs < tm.tm_hour - 1 || (hrs == tm.tm_hour - 1 && mins < tm.tm_min - 1)) { tm.tm_mday++; } tm.tm_hour = hrs; tm.tm_min = mins; *pt = mktime (&tm); /* Adjust to UTC */ } void processspecconfig () { FILE *fp; static char w1[140], w2[140], w3[140], w4[140]; int narg; struct in_addr naddr; if ((fp = fopen (specconfigfile, "r"))) { themnum = 0; while ((fgets (tmpbuf, 256, fp))) { if (tmpbuf[0] != '#') { tmpbuf[strlen (tmpbuf) - 1] = 0; if ((narg = sscanf (tmpbuf, "%s %s %s %s", w1, w2, w3, w4)) >= 2) { /* Config file Keywords - warnmail logfile statsfile fishstring */ if (!strncasecmp (w1, "warnmail", 8)) strncpy (userwarn, w2, 256); else if (!strncasecmp (w1, "noautostatus", 12)) autostatus = FALSE; else if (!strncasecmp (w1, "bridge", 6)) isbridge = TRUE; else if (!strncasecmp (w1, "autostatus", 10)) autostatus = TRUE; else if (!strncasecmp (w1, "noresolve", 9)) nonameresolve = TRUE; else if (!strncasecmp (w1, "resolve", 7)) nonameresolve = FALSE; else if (!strncasecmp (w1, "yellow", 6)) sYELLOWTIME = atoi (w2); else if (!strncasecmp (w1, "red", 3)) sREDTIME = atoi (w2); else if (!strncasecmp (w1, "green", 5)) sGREENTIME = atoi (w2); else if (!strncasecmp (w1, "logfile", 7)) strncpy (speclogfile, w2, MAXFILENAME); else if (!strncasecmp (w1, "timefmt", 7)) strncpy (tmstring, w2, 256); else if (!strncasecmp (w1, "statsfile", 9)) strncpy (statsfile, w2, MAXFILENAME); else if (!strncasecmp (w1, "netmask", 8)) { forcemask = TRUE; fmask = inet_addr (w2); } else if (!strncasecmp (w1, "inetaddr", 8)) { forcelocal = TRUE; flocal = inet_addr (w2); } else if (!strncasecmp (w1, "statsoption", 11)) { if (!strncasecmp (w2, "append", 6)) statsappend = TRUE; else if (!strncasecmp (w2, "date", 4)) statsappend = FALSE; } else if (!strncasecmp (w1, "logone", 9)) { if (strlen (w2)) { if (inet_aton (w2, &naddr)) { logthem[themnum] = naddr.s_addr; if (themnum < 19) themnum++; } } } else if (!strncasecmp (w1, "logremote", 9)) { if (strlen (w2)) strncpy (nw_remname, w2, 256); nw_logremote = TRUE; } else if (!strncasecmp (w1, "loglocal", 8)) { if (strlen (w2)) strncpy (nw_locname, w2, 256); nw_loglocal = TRUE; } else if (!strncasecmp (w1, "logindivbase", 12)) { if (strlen (w2)) strncpy (nw_indivmain, w2, 256); } else if (!strncasecmp (w1, "logindiv", 8)) { if (strlen (w2)) strncpy (nw_indivmain, w2, 256); nw_logindiv = TRUE; } else if (!strncasecmp (w1, "logall", 6)) { if (strlen (w2)) strncpy (nw_allname, w2, 256); nw_logall = TRUE; } else if (!strncasecmp (w1, "playrate", 8)) { if (!strncasecmp (w2, "second", 6)) nw_simrate = SIMSEC; else if (!strncasecmp (w2, "key", 3)) { nw_simrate = SIMSEC; simkeyrate = 0; simarr[3] = 1; simchange = TRUE; } else { simkeyrate = atoi (w2); if (simkeyrate <= 0) { simarr[3] = 1; simkeyrate = 0; } if (simkeyrate > 2) simarr[6] = 3; if (simkeyrate > 1) simarr[5] = 3; if (simkeyrate > 0) simarr[4] = 3; nw_simrate = SIMSEC; simchange = TRUE; } } else if (!strncasecmp (w1, "playback", 8)) { if (strlen (w2)) strncpy (nw_simfile, w2, 256); nw_simulate = TRUE; nw_simrate = SIMSEC; } else if (!strncasecmp (w1, "fishstring", 10)) { strncpy (fishstring, &tmpbuf[11], 256); fishstringlen = strlen (fishstring); } else if (!strncasecmp (w1, "reload", 6)) { if (!strncasecmp (w2, "at", 2)) { if (narg == 4) { reload_timer_sec = 60 * atoi (w4); if (reload_timer_sec > 0) { sscanf (w3, "%2d:%2d", &rel_hours, &rel_mins); adjusttime (&wakeup_reload, rel_hours, rel_mins); wakeup_state = TRUE; } } } else { reload_timer_sec = 60 * atoi (w2); if (reload_timer_sec > 0) { reload_timer_start = time (0); reload_active = TRUE; } } } } } } fclose (fp); } } void handletimeout (int sig) { resolvetimeout = 10; timeresolv++; /* * printf("Got TIMEOUT\n"); */ /* signal (SIGUSR1, handletimeout); */ } void handlesigpipe (int sig) { pid_t pipepid; int status; if (sendresolv) { /* NETRESOLV has died... Why???? */ pipepid = waitpid (child, &status, 0); if (pipepid == child) { if (WIFSIGNALED (status)) { sprintf (&status_lines[11][3], " NETRESOLV terminated with SIGNAL #%d --> NO INET NAMES", WTERMSIG (status)); cur_status_line = 11; } } noresolv = TRUE; /* Turn off pipe communication */ } } void handlechild (int sig) { int status; pid_t killpid; killpid = wait (&status); if (killpid == child) { if (WIFEXITED (status)) { sprintf (&status_lines[3][3], "NETRESOLV normal termination... EXIT #%d for %ld", WEXITSTATUS (status), killpid); cur_status_line = 3; } else if (WIFSIGNALED (status)) { sprintf (&status_lines[3][3], "NETRESOLV Abnormal termination... signal #%d for %ld", WTERMSIG (status), killpid); cur_status_line = 3; } noresolv = TRUE; /* Netresolv died.. so NO name resolution */ } else if (killpid < 0) { /* In the 2.2.x kernel... the EINTR appears to happen and the RESTART causes a REAL wait int the wait() call... it doesn't come out... This means that we have to IGNORE this type of call and we run the risk of a REAL signal which has a -1 return for a REAL reason */ if (errno != EINTR) { sprintf (&status_lines[3][3], "CHILD process termination (WAIT ERROR)... ERR=%d", errno); cur_status_line = 3; noresolv = TRUE; /* Just in case */ } } } void processres (int sig) { struct gotname one; int actnum; int st; int i, sz; static int inside = 0; sigset_t sigset, oldmask; int moreinfo; long oldflags; sigprocmask (0, NULL, &sigset); sigaddset (&sigset, sig); sigprocmask (SIG_BLOCK, &sigset, &oldmask); oldflags = fcntl (osocket[0], F_GETFL); fcntl (osocket[0], F_SETFL, FNDELAY); moreinfo = TRUE; while (moreinfo) { st = read (osocket[0], &one, sizeof (one)); if (st < 0) { if (errno == EWOULDBLOCK) break; selprob = 88; errread++; break; } if (!sentclear && one.name[0]) { LOCK(resolvechange); strncpy (one.where, one.name, RESOLVE_MAX); one.where[RESOLVE_MAX - 1] = 0; UNLOCK(resolvechange); } else if (one.where == (char *) 1 && !one.name[0]) sentclear = FALSE; recresolv++; noresolv = FALSE; } fcntl (osocket[0], F_SETFL, oldflags); sigprocmask (SIG_SETMASK, &oldmask, NULL); } void setupsignals () { signal (SIGUSR1, handletimeout); signal (SIGUSR2, processres); } void startnetresolv () { struct resolvaddr one; one.pid = mypid; one.inetaddr = 0L; one.where = (char *) 1; write (msocket[1], &one, sizeof (one)); sendresolv++; kill (child, SIGUSR1); /* sentclear=FALSE; */ } void clearnetresolv () { struct resolvaddr one; one.pid = mypid; one.inetaddr = 0L; one.where = (char *) 0; sentclear = TRUE; write (msocket[1], &one, sizeof (one)); sendresolv++; kill (child, SIGUSR1); } void mygethostbyaddr (char *where, unsigned char *p, int len, int proto) { struct resolvaddr one; u_int32_t *pi = (u_int32_t *) p; if (noresolv) return; if (nonameresolve) return; if (*pi == 0L) return; one.pid = mypid; one.inetaddr = *(u_int32_t *) p; one.where = where; write (msocket[1], &one, sizeof (one)); sendresolv++; kill (child, SIGUSR1); } void clearentry (HOSTINFO * current) { current->pktcntsend = current->pktcntrec = 0; current->intpktcntsend = current->intpktcntrec = 0; current->extpktcntsend = current->extpktcntrec = 0; current->sendbytes = current->recbytes = 0; current->intsendbytes = current->intrecbytes = 0; current->extsendbytes = current->extrecbytes = 0; current->timebytes = current->timelastbytes = 0; current->plog = 0; current->plogactive = 0; } /* * FOR RELIABLE SIGNAL HANDLING --- make sure a restart of system calls is * performed when signals interrupt */ sigfunc signal (int signo, sigfunc func) { struct sigaction act, oact; act.sa_handler = func; sigemptyset (&act.sa_mask); act.sa_flags = 0; if (signo != SIGALRM) act.sa_flags |= SA_RESTART; if (sigaction (signo, &act, &oact) < 0) return (SIG_ERR); return (oact.sa_handler); } /* * FOR SELECT System call SIGNAL HANDLING --- make sure there is NO * restart of system calls when signals interrupt */ sigfunc signal_intr (int signo, sigfunc func) { struct sigaction act, oact; act.sa_handler = func; sigemptyset (&act.sa_mask); act.sa_flags = 0; if (sigaction (signo, &act, &oact) < 0) return (SIG_ERR); return (oact.sa_handler); } /* * Simple Control C and Hangup handler... to clean the screen */ void intrhandle () { //alarm (0); signal_intr (SIGALRM, SIG_DFL); kill (child, SIGHUP); sleep (1); if (!noscreen) cleanup_curses (); printf ("Thank you for using NETWATCH..see http://www.slctech.org/~mackay/netwatch.html\n"); if (speclog) fclose (fpspeclog); if (using_fifo) { close (fifo); unlink (fifoname); } if (nw_logremote && nw_fprem != NULL) fclose (nw_fprem); if (nw_loglocal && nw_fploc != NULL) fclose (nw_fploc); if (nw_logall && nw_fpall != NULL) fclose (nw_fpall); /* * Should this be rewritten to cooperate with other net tools? */ strcpy (oldifr.ifr_name, ethdevname); if (ioctl (sd, SIOCSIFFLAGS, &oldifr) < 0) { perror ("Can't set flags: "); close (sd); gh (3); exit (4); } close (sd); gh (1); exit (0); } /* * A Routine to Log the CURRENT (passed) Record to the log file which is * already open for use */ void logcurr (HOSTINFO * c, FILE * fp) { static char tmphost[RESOLVE_MAX]; fprintf (fp, "HOSTINFO=%p\n", c); hostent = gethostbyaddr ((char *) c->othaddr, 4, AF_INET); if (hostent) strncpy (tmphost, hostent->h_name, RESOLVE_MAX); else strcpy (tmphost, ""); LOCK(resolvechange); fprintf (fp, "HOST=%s LAST ACCESS=%s", c->name, ctime (&(c->tstamp))); UNLOCK(resolvechange); fprintf (fp, "IP Addr = %u.%u.%u.%u\n", c->addr[0], c->addr[1], c->addr[2], c->addr[3]); fprintf (fp, "Last Communication to %u.%u.%u.%u known as %s\n", c->othaddr[0], c->othaddr[1], c->othaddr[2], c->othaddr[3], tmphost); fprintf (fp, "with Protocol %s and Service %s\n", c->ip_pr, servicenm (c->servicename, c->port)); fprintf (fp, "Packet Counts Incoming Outgoing\n"); fprintf (fp, " ALL %8lu %8lu\n", c->pktcntrec, c->pktcntsend); fprintf (fp, " LOCAL %8lu %8lu\n", c->intpktcntrec, c->intpktcntsend); fprintf (fp, " REMOTE %8lu %8lu\n", c->extpktcntrec, c->extpktcntsend); fprintf (fp, "\n BYTE Counts Incoming Outgoing\n"); fprintf (fp, " ALL %8lu %8lu\n", c->recbytes, c->sendbytes); fprintf (fp, " LOCAL %8lu %8lu\n", c->intrecbytes, c->intsendbytes); fprintf (fp, " REMOTE %8lu %8lu\n", c->extrecbytes, c->extsendbytes); fprintf (fp, "\n\n"); } void adjust (int *h, int *m) { int min = *m; int hour = *h; min--; if (min < 0) { hour--; if (hour < 0) hour = 23; min = 59; } *m = min; *h = hour; } /* * Handle dumping stats to a file for use at a later time... */ void gostats () { HOSTINFO *current; FILE *fp; time_t here; static char tarr[80]; struct tm *tm; static struct tm wtm; int smin, i; int hrs, mins; here = time (0); tm = localtime (&here); wtm = *tm; if (statsappend) strcpy (newstatsfile, statsfile); else { strftime (tarr, 80, tmstring, &wtm); sprintf (newstatsfile, "%s.%s", statsfile, tarr); } fp = fopen (newstatsfile, "a"); if (fp == NULL) return; strcpy (tmpbuf, ctime (&here)); fprintf (fp, "\nStatistics from %s to %s\n", ctime (&starttime), tmpbuf); fprintf (fp, "\nLOCAL STATISTICS\n"); LOCK(inllist); current = lfirst->flink; fprintf (fp, "Init Current=%p Left first->link = %p\n", current, lfirst->flink); while (current != lfirst) { logcurr (current, fp); current = current->flink; } UNLOCK(inllist); fprintf (fp, "\nREMOTE STATISTICS\n"); LOCK(inrlist); current = rfirst->flink; while (current != rfirst) { logcurr (current, fp); current = current->flink; } UNLOCK(inrlist); fclose (fp); if (statsappend) strcpy (newstatsfile, statsfile); else { sprintf (newstatsfile, "%s.router.%s", statsfile, tarr); } fp = fopen (newstatsfile, "a"); if (fp == NULL) return; fprintf (fp, "\nRouter Statistics (Last DAY) from %s\n\n", tmpbuf); fprintf (fp, " Time Router Throughput (kbits/sec)\n"); smin = 1; hrs = wtm.tm_hour; mins = wtm.tm_min; for (i = cur_dayroute - 1; i != cur_dayroute && dayroute[i] != -1; i--, smin++) { adjust (&hrs, &mins); if (i < 0) { i = MAXDAYROUTE - 1; if (i == cur_dayroute || dayroute[i] == -1) break; } fprintf (fp, " %02d:%02d %10.2f\n", hrs, mins, dayroute[i]); } fclose (fp); } void disphelp (int helppage, int xoff) { //LOCK(indisp); switch (helppage) { case 1: mvprintw (6, xoff + 10, "HELP WINDOW"); mvprintw (8, xoff + 3, "Normal Mode Commands"); mvprintw (10, xoff + 3, " - toggle REMOTE/LOCAL"); mvprintw (11, xoff + 3, " for keyboard control"); mvprintw (12, xoff + 3, " - Go back ONE Option"); mvprintw (13, xoff + 3, " Go forward ONE OPTION"); mvprintw (14, xoff + 3, " - Back ONE PAGE on"); mvprintw (15, xoff + 3, " CURRENT (REMOTE/LOCAL)"); mvprintw (16, xoff + 3, " - Forward ONE PAGE on"); mvprintw (17, xoff + 3, " CURRENT (REMOTE/LOCAL)"); mvprintw (18, xoff + 3, " Exit HELP MODE"); mvprintw (19, xoff + 3, "or "); mvprintw (20, xoff + 3, "or for MORE Help"); break; case 2: mvprintw (6, xoff + 10, "HELP WINDOW"); mvprintw (8, xoff + 3, "Special Mode Commands"); mvprintw (10, xoff + 3, "c - Clear Counters (Packets"); mvprintw (11, xoff + 3, " and Bytes) "); mvprintw (12, xoff + 3, "n - NEW Host List (Restart)"); mvprintw (13, xoff + 3, "w - Enter WATCH Mode"); mvprintw (14, xoff + 3, " (See Watch Page"); mvprintw (15, xoff + 3, "p - Print to Log File"); mvprintw (16, xoff + 3, " (new file each print)"); mvprintw (18, xoff + 3, " Exit HELP MODE"); mvprintw (19, xoff + 3, "or "); mvprintw (20, xoff + 3, "or for MORE Help"); break; case 3: mvprintw (6, xoff + 10, "HELP WINDOW"); mvprintw (8, xoff + 3, "Additional Commands"); mvprintw (10, xoff + 3, "l - Log stats to log file"); mvprintw (11, xoff + 3, "b - Toggle Blue Hosts "); mvprintw (12, xoff + 3, " displayed or not"); mvprintw (13, xoff + 3, "d - Toggle DOMAIN Hosts"); mvprintw (14, xoff + 3, " service displayed"); mvprintw (15, xoff + 3, " or not"); mvprintw (16, xoff + 3, "t - TOP Mode toggle "); mvprintw (17, xoff + 3, "f - FREEZE SCREEN toggle"); mvprintw (18, xoff + 3, " Exit HELP MODE"); mvprintw (19, xoff + 3, "or "); mvprintw (20, xoff + 3, "or for MORE Help"); break; } //UNLOCK(indisp); } void setupauxscr (int *xoff, int bigscreen) { int xst = 1; int xend; //LOCK(indisp); scrmid = MCOLS >> 1; xend = scrmid; if (localkey) { xst = scrmid + 1; xend = MCOLS - 1; } if (bigscreen) { xst = 1; xend = MCOLS - 1; } clrportion (4, xst, MLINES - 1, xend); mvhline (4, xst + 1, ACS_BLOCK, xend - xst - 2); mvhline (MLINES - 3, xst + 1, ACS_BLOCK, xend - xst - 2); mvvline (5, xst + 1, ACS_BLOCK, MLINES - 8); mvvline (5, xend - 2, ACS_BLOCK, MLINES - 8); //UNLOCK(indisp); *xoff = xst; } #define MAXSTAT 6 void status_box (char header[], char mss[], int x, int y, int width) { int mess_len; int center; int mid; int numoflines = 3; int splitspot = 0; char *p[MAXSTAT]; int i; int start; static char mess[512]; char *pw = mess; strncpy (mess, mss, 512); mid = width >> 1; mess_len = strlen (pw); p[numoflines - 3] = pw; while (mess_len > width - 2 && numoflines < MAXSTAT + 1) { numoflines++; for (pw = pw + width - 2; *pw != ' ' && pw > p[numoflines - 4]; pw--); *pw = 0; pw++; p[numoflines - 3] = pw; mess_len = strlen (pw); } p[numoflines - 2] = NULL; LOCK(indisp); clrportion (y, x, y + numoflines - 1, x + width - 1); mvhline (y, x, ACS_BLOCK, width); if (header && header[0]) { center = strlen (header) >> 1; start = mid - center; if (start < 0) start = 0; attron (col3); mvprintw (y, x + start, "%s", header); attron (col4); } mvhline (y + numoflines - 1, x, ACS_BLOCK, width); mvvline (y, x, ACS_BLOCK, numoflines); mvvline (y, x + width - 1, ACS_BLOCK, numoflines); for (i = 0; p[i]; i++) { mess_len = strlen (p[i]); center = mess_len >> 1; start = mid - center; mvprintw (y + i + 1, x + start, "%s", p[i]); } UNLOCK(indisp); } void debug_packet (unsigned char *s) { static char debugstr[1024]; static char hexasc[10]; int i; unsigned char key; debugstr[0] = 0; for (i = 0; i < 60; i++) { key = *s; s++; /* if (isalnum(key) || isspace(key) ||ispunct(key)) { hexasc[0]=key; hexasc[1]=0; } else */ { sprintf (hexasc, " %02X ", key); } strcat (debugstr, hexasc); } status_box ("PPP DEBUG", debugstr, 10, 4, 40); while (getch () == ERR); } void setuphelp () { int xoff = 1; setupauxscr (&xoff, magnafull); disphelp (helppage, xoff); } void setupwatch (int bigscreen) { int xoff = 1; setupauxscr (&xoff, bigscreen); //LOCK(indisp); if (!bigscreen) { mvprintw (6, xoff + 10, "WATCH WINDOW"); if (!disprouterstats) { mvprintw (8, xoff + 3, "Special Commands"); mvprintw (10, xoff + 3, "s - select host for trace"); mvprintw (11, xoff + 3, " Up/Down Left/Right"); mvprintw (12, xoff + 3, " "); mvprintw (13, xoff + 3, "r - examine router stats"); mvprintw (14, xoff + 3, " Exit WATCH MODE"); mvprintw (15, xoff + 3, "or "); mvprintw (16, xoff + 3, "or "); } } //UNLOCK(indisp); } void indepscreen () { curskeyspot = MCOLS - 12; curskeyval = MCOLS - 5; cursllockout = MCOLS - 18; cursrlockout = MCOLS - 15; curslines = MCOLS - 10; curshosttrim = MCOLS / 2 - 17; cursproto = curshosttrim - 7; cursdest = curshosttrim - 2; } void winchange () { static struct winsize size; if (ioctl (0, TIOCGWINSZ, (char *) &size) >= 0) { LOCK(indisp); MLINES = size.ws_row; MCOLS = size.ws_col; wresize (stdscr, MLINES, MCOLS); indepscreen (); clrscr (); if (watch) show_watch = TRUE; //setupwatch (SMALLSCREEN); if (help) show_help = TRUE; //setuphelp (); rewrite_labels = TRUE; refreshrem = TRUE; refreshloc = TRUE; UNLOCK(indisp); } } clock_t putoneeth (FILE * fp, char *buf, int *plen) { int st; short nlen; short len; unsigned short simcheck; clock_t clk; long begrec; /* Read ETH header and calculate the length... then read the rest */ /* You assume that you are at the END of the current record and you have to go back... since lengths are encoded at front AND back (just for this)... you can seek back and read the length... then seek back the length - sizeof(length)*2 - sizeof(clk)... then read it to REVERSE it... THEN seek back to the start of this record again so you can either go forwards or backwards for processing >> must make magna work with this??? */ fseek (fp, -sizeof (simcheck) - sizeof (nlen), SEEK_CUR); st = fread (&nlen, 1, sizeof (short), fp); len = ntohs (nlen); fseek (fp, -len - sizeof (nlen) * 2 - sizeof (clk), SEEK_CUR); begrec = ftell (fp); st = fread (&clk, 1, sizeof (clk), fp); st = fread (&nlen, 1, sizeof (short), fp); len = ntohs (nlen); if (st < sizeof (short)) return (-1); st = fread (buf, 1, len, fp); if (st < len) return (-1); st = fread (&nlen, 1, sizeof (short), fp); st = fread (&simcheck, 1, sizeof (simcheck), fp); if (simcheck != simmagic) { LOCK(indisp); mvprintw (MLINES - 1, 10, "Illegal File format - no MAGIC val"); UNLOCK(indisp); return (-1); } fseek (fp, begrec, SEEK_SET); *plen = len; return (clk); } clock_t getoneeth (FILE * fp, char *buf, int *plen) { int st; short nlen; short len; unsigned short simcheck; clock_t clk; /* Read ETH header and calculate the length... then read the rest */ st = fread (&clk, 1, sizeof (clk), fp); st = fread (&nlen, 1, sizeof (short), fp); len = ntohs (nlen); if (st < sizeof (short)) return (-1); st = fread (buf, 1, len, fp); if (st < len) return (-1); st = fread (&nlen, 1, sizeof (short), fp); st = fread (&simcheck, 1, sizeof (simcheck), fp); if (simcheck != simmagic) { LOCK(indisp); mvprintw (MLINES - 1, 10, "Illegal File format - no MAGIC val"); UNLOCK(indisp); return (-1); } *plen = len; return (clk); } /* * Simulate ethernet reads from file AND read the keyboard as * required */ int sim_process () { int n; int simdone = FALSE; fd_set rset; /* long int cset, eset; */ long int rsset, csset; int maxfd = 1; int tfd = 0; struct timeval seltime; int i; int st; int length; unsigned short simcheck; time_t chactstart; clock_t loldrealoff; /* temp clock ticks */ clock_t thistime; /* NOW... */ clock_t sysclk; /* Start of simulation... */ clock_t adjoffs; /* Adjusted offset for slowing down simulation */ /* Some options... if the SIMKEY option is chosen... simulate only when "." key is hit if the SIMSEC option is chosen... perform a timeout on SELECT and then read "simkeyrate" ethernet records In both cases, the simulation file must be opened. */ if (strlen (nw_simfile)) { simfp = fopen (nw_simfile, "r"); if (simfp == NULL) { printf ("SIM FILE:%s did not open\n", nw_simfile); return (1); } sysclk = times (&dumbtime); if (nw_simrate == SIMSEC) loff = sysclk; else loff = 0; st = fread (&actstart, 1, sizeof (actstart), simfp); chactstart = actstart; mactstart = (double) actstart; st = fread (&simcheck, 1, sizeof (simcheck), simfp); if (simcheck != simmagic) { printf ("SIM FILE is OLD or incorrect format\n"); return (1); } if (simkeyrate && nw_simrate == SIMSEC) fileclk = getoneeth (simfp, buf, &length); else fileclk = 0; lrealoff = 0; adjoffs = fileclk; selprob = 0; thistime = times (&dumbtime); while (TRUE) { FD_ZERO (&rset); FD_SET (0, &rset); if (using_fifo) { FD_SET (fifo, &rset); maxfd = fifo + 1; } /* cset = eset = rset; */ if (nw_simrate == SIMSEC) { selprob = selprob + 1; seltime.tv_sec = 0; seltime.tv_usec = 1000; if ((selcode = select (maxfd, &rset, NULL, NULL, &seltime)) > 0) { if (FD_ISSET (tfd, (fd_set *) & rset)) { if (dokeyin (0) < 0) { fclose (simfp); return (0); } } else if (using_fifo && FD_ISSET (fifo, (fd_set *) & rset)) { do_fifo (); } } else { if (simkeyrate > 0) { loff = offsclk; lasttime = thistime; thistime = times (&dumbtime); offsclk = lrealoff + ((thistime - lasttime) << (simkeyrate - 1)); loldrealoff = lrealoff; lrealoff = offsclk; /* refresh(); */ if (!simdone) { while (adjoffs <= offsclk) { ethcnt++; /* mvprintw(23,2,"lrealoff=%lu offsclk=%lu delta=%lu",lrealoff,offsclk,thistime -lasttime); */ handle_frame (buf, length, NULL, TRUE, 1); fileclk = getoneeth (simfp, buf, &length); if (fileclk == -1) { adjoffs = offsclk + 2000; simdone = TRUE; } else { adjoffs = fileclk; /* only works for ETH logs not PPP??? */ } } /* mvprintw(23,2,"CHACTSTART=%lu MACTSTART=%lf OFFS=%lu",chactstart,mactstart,offsclk); */ /* mactstart = mactstart + (double)((offsclk-loff)<<(simkeyrate-1))/CLK_TCK; */ // mactstart = mactstart + (double)(offsclk-loldrealoff)/CLK_TCK; mactstart = mactstart + (double) (offsclk - loldrealoff) / CLOCKS_PER_SEC; /* lrealoff = fileclk; */ actstart = (time_t) ((mactstart)); } } else if (simkeyrate < 0) { loff = offsclk; lasttime = thistime; thistime = times (&dumbtime); offsclk = lrealoff - ((thistime - lasttime) << (simkeyrate - 1)); loldrealoff = lrealoff; lrealoff = offsclk; /* refresh(); */ if (!simdone) { while (adjoffs >= offsclk) { ethcnt--; /* mvprintw(23,2,"lrealoff=%lu offsclk=%lu delta=%lu",lrealoff,offsclk,thistime -lasttime); */ handle_frame (buf, length, NULL, TRUE, -1); fileclk = putoneeth (simfp, buf, &length); if (fileclk == -1) { adjoffs = offsclk - 2000; simdone = TRUE; } else { adjoffs = fileclk; /* only works for ETH logs not PPP??? */ } } /* mvprintw(23,2,"CHACTSTART=%lu MACTSTART=%lf OFFS=%lu",chactstart,mactstart,offsclk); */ /* mactstart = mactstart + (double)((offsclk-loff)<<(simkeyrate-1))/CLK_TCK; */ //mactstart = mactstart + (double)(offsclk-loldrealoff)/CLK_TCK; mactstart = mactstart + (double) (offsclk - loldrealoff) / CLOCKS_PER_SEC; /* lrealoff = fileclk; */ actstart = (time_t) ((mactstart)); } } } } else /* All is read from keyboard.... */ { if (using_fifo) { if ((selcode = select (maxfd, &rset, NULL, NULL, NULL)) > 0) { if (FD_ISSET (tfd, (fd_set *) & rset)) { if (dokeyin (0) < 0) { fclose (simfp); return (0); } } else if (FD_ISSET (fifo, (fd_set *) & rset)) { do_fifo (); } } } else { if (dokeyin (0) < 0) { fclose (simfp); return (0); } } /* mvprintw(23,2,"ACTSTART=%lu MACTSTART=%lf OFFS=%lu",actstart,mactstart,loff); */ refresh (); keycnt++; } } } } void kill_all_threads() { pthread_cancel(keythread); pthread_cancel(netthread); } extern int internal_loop_count; void *all_keyins(void *p) { int stat; while ((stat=dokeyin(0))>=0) { /* if(stat)*/ internal_loop_count++; } pthread_cancel(netthread); destroy_program = TRUE; return(NULL); } void *all_netins(void *p) { if (using_fifo) { while(1) do_fifo(); } else { while (doeth()>=0) { internal_loop_count++; } } pthread_cancel(keythread); destroy_program = TRUE; return(NULL); } int process () { int gstat; gstat = pthread_create (&keythread, NULL, (void *) &all_keyins, NULL); if (gstat) { printf (" KEY THREAD FAILURE \n"); } else { // printf (" KEY THREAD STARTED \n"); } gstat = pthread_create (&netthread, NULL, (void *) &all_netins, NULL); if (gstat) { printf (" NET THREAD FAILURE \n"); } else { // printf (" NET THREAD STARTED \n"); } dispdata(0); } void setupstatus () { int i; int workit = STATUSSIZE * MAXSTATUS; for (i = 0; i < MAXDAYROUTE; i++) dayroute[i] = -1.0; rdelta = 60; memset (&status_lines[0][0], '~', workit); for (i = 0; i < MAXSTATUS; i++) { status_lines[i][MCOLS] = 0; } sprintf (&status_lines[1][3], " < NO NetBus attacks found to date > "); sprintf (&status_lines[2][3], " < NO Back Orifice attacks found to date > "); sprintf (&status_lines[3][3], " < NO BAD MAC Addresses seen to date > "); sprintf (&status_lines[11][3], " WARNING %s VIA E-MAIL on NetBus or B.O. Attacks ", userwarn); } u_int32_t localifaddr; int main (int argc, char *argv[]) { struct stat tstat; int st; struct in_addr naddr; { /* * Compound statement to make initializers * vanish after init. */ int op; long int mask; u_int32_t *p; #if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) int devindex; struct sockaddr_ll workll; #endif starttime = time (0); gh (0); for (op = 0; op < MAGNAMAX; op++) magna[op].len = -1; magnamatch[0] = 0; semaphore_init(&masterdo); INIT_LOCK(indisp); INIT_LOCK(inrlist); INIT_LOCK(inllist); INIT_LOCK(resolvechange); //LOCK(indisp); // Ready fo 1 display... //LOCK(inrlist); // UNLOCK(inllist); //UNLOCK(resolvechange); snprintf(progtitle,60, "NETWATCH Program %s-%s",version,iv); // strcat (progtitle, version); // strcat (progtitle, iv); pipe (msocket); pipe (osocket); mypid = getpid (); setupsignals (); if ((child = fork ()) == 0) { /* * CHILD */ close (0); signal (SIGUSR1, SIG_DFL); signal (SIGUSR2, SIG_DFL); signal (SIGALRM, SIG_DFL); dup2 (msocket[0], 0); close (msocket[0]); close (1); dup2 (osocket[1], 1); close (osocket[1]); execlp ("netresolv", "netresolv", NULL); perror ("exec netresolv"); exit (1); } close (msocket[0]); close (osocket[1]); signal (SIGCHLD, handlechild); signal (SIGPIPE, handlesigpipe); rewrite_labels = 1; lfirst = &ldummy; /* * The dummy record header for linked list */ lfirst->flink = lfirst; lfirst->blink = lfirst; /* * lfirst->disprow = localrow; */ rfirst = &rdummy; /* * The dummy record header for linked list */ rfirst->flink = rfirst; rfirst->blink = rfirst; /* * rfirst->disprow = remoterow; */ services (); /* * default labels for these services */ help_flag = 0; /* * No help unless asked for */ redraw_screen = 0; /* * No redraw unless asked for */ noscreen = 0; processspecconfig (); while ((op = getopt (argc, argv, "kH:R:L:S:bfzi:m:ns:l:hu:tc:e:")) != EOF) { switch (op) { case 'b': /* * TRANSPARENT Bridge flag... actually * causes every other packet to be ignored * since comes in pairs in Kernel */ isbridge = TRUE; break; case 'k': ssh_mask = TRUE; break; case 'f': using_fifo = TRUE; break; case 'n': /* * No Name resolution (IP address only) */ noresolv = TRUE; break; case 'H': logthem[themnum] = inet_addr (optarg); if (themnum < MAXTHEM - 1) themnum++; break; case 'i': /* * Force INET Setting (Override def.) */ forcelocal = TRUE; flocal = inet_addr (optarg); break; case 'm': /* * Force NETMASK Setting (Override def.) */ forcemask = TRUE; fmask = inet_addr (optarg); break; case 'z': /* * No screen display */ noscreen = TRUE; break; case 'l': /* * Log file specified */ strncpy (mylog, optarg, MAXFILENAME); break; case 's': /* * Special Log file specified */ strncpy (speclogfile, optarg, MAXFILENAME); break; case 'c': strncpy (configfile, optarg, MAXFILENAME); newconfig = TRUE; break; case 'u': strncpy (userwarn, optarg, 256); break; case 'e': strncpy (ethdevname, optarg, 64); isethdev = TRUE; if (!strncmp (ethdevname, "ppp", 3)) isethdev = FALSE; newethname = TRUE; break; case 't': topflag = TRUE; break; case 'L': /* LOG MODE */ switch (optarg[0]) { case 'a': /* Log all packets */ nw_logall = TRUE; break; case 'l': /* Log LOCAL traffic only */ nw_loglocal = TRUE; break; case 'r': /* Log Remote traffic only */ nw_logremote = TRUE; break; case 's': /* Log individual traffic */ nw_logselect = TRUE; break; case 'i': /* Log individual traffic */ nw_logindiv = TRUE; break; } break; case 'S': /* Simulation File - Sim mode */ strncpy (nw_simfile, optarg, 256); nw_simulate = TRUE; nw_simrate = SIMSEC; simkeyrate = 0; simarr[3] = 1; simchange = TRUE; break; case 'R': /* Simulation Option -- Key or Number/sec */ if (!strncasecmp (optarg, "key", 3)) { nw_simrate = SIMSEC; simkeyrate = 0; simarr[3] = 1; simchange = TRUE; } else { simkeyrate = atoi (optarg); nw_simrate = SIMSEC; if (simkeyrate <= 0) { simarr[3] = 1; simkeyrate = 0; } if (simkeyrate > 2) simarr[6] = 3; if (simkeyrate > 1) simarr[5] = 3; if (simkeyrate > 0) simarr[4] = 3; simchange = TRUE; } break; case ':': fprintf (stderr, "Missing Parameter\n\n"); case 'h': default: usage (argv[0]); break; } } if (!isbridge) { processinetrc (netmask, localaddr, ðok); if (!ethok) { printf ("NO %s Interface to work on!!\n", ethdevname); gh (3); exit (1); } } if (ssh_mask) { ssh_env = getenv("SSH_CLIENT"); if (!ssh_env || !ssh_env[0]) { ssh_mask=0; // Turn it off!!! } else { if (sscanf(ssh_env,"%s %u %u",ssh_orig_addr_asc,&ssh_orig_port,&ssh_dest_port)!=3) ssh_mask=0; else { if (inet_aton(ssh_orig_addr_asc,&naddr)!=0) ssh_orig_addr = naddr.s_addr; else ssh_mask = 0; } } } if (nw_simulate) { strcpy (progtitle, "NETWATCH Simulator "); strcat (progtitle, version); } /* * printf("NETMASK=%u.%u.%u.%u LOCALADDR=%u.%u.%u.%u\n", * netmask[0],netmask[1],netmask[2],netmask[3], * localaddr[0],localaddr[1],localaddr[2],localaddr[3]); getchar(); */ /* * INIT ALARMFUCTION: Alarm triggers update of the display */ if (signal_intr (SIGINT, intrhandle) == SIG_ERR) { perror ("INT Signal error: "); gh (3); exit (5); } if (signal_intr (SIGHUP, intrhandle) == SIG_ERR) { perror ("HUP Signal error: "); gh (3); exit (5); } if (!noscreen) { /* if (signal_intr (SIGALRM, dispdata) == SIG_ERR) { perror ("ALRM Signal error: "); gh (3); exit (5); }*/ if (signal_intr (SIGWINCH, winchange) == SIG_ERR) { perror ("ALRM Signal error: "); gh (3); exit (5); } } /* * OPEN SOCKET */ if (!nw_simulate) { //#if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) if ((sd = socket (PF_PACKET, SOCK_RAW, htons (ETH_P_ALL))) < 0) //#else // if ((sd = socket (AF_INET, SOCK_PACKET, htons (ETH_P_ALL))) < 0) //#endif { perror ("Can't get socket: "); gh (3); exit (1); } /* * SET PROMISC */ strcpy (oldifr.ifr_name, ethdevname); if (ioctl (sd, SIOCGIFFLAGS, &oldifr) < 0) { perror ("Can't get flags: "); close (sd); gh (3); exit (2); } #if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) /* strcpy (oldifr.ifr_name, ethdevname); if (ioctl (sd, SIOCGIFINDEX, &oldifr) < 0) { perror ("Can't get IFINDEX: "); close (sd); gh (3); exit (2); } devindex = oldifr.ifr_ifindex; workll.sll_family = PF_PACKET; workll.sll_ifindex = devindex; if (bind(sd, (struct sockaddr *)&workll, sizeof(struct sockaddr_ll))!=0) { perror("BIND PACKET to DEVICE"); close(sd); gh(3); exit(2); } */ #endif if (oldifr.ifr_flags | IFF_POINTOPOINT) { struct sockaddr_in *tmp; struct ifreq tif; strcpy (tif.ifr_name, ethdevname); if (ioctl (sd, SIOCGIFADDR, &tif) < 0) { perror ("I/F"); } tmp = (struct sockaddr_in *) &tif.ifr_addr; memcpy (localaddr, &(tmp->sin_addr.s_addr), sizeof (localaddr)); if (ioctl (sd, SIOCGIFNETMASK, &tif) < 0) { perror ("I/F"); } tmp = (struct sockaddr_in *) &tif.ifr_addr; memcpy (netmask, &(tmp->sin_addr.s_addr), sizeof (netmask)); } } if (forcelocal) { p = (u_int32_t *) & localaddr[0]; *p = flocal; } if (forcemask) { p = (u_int32_t *) & netmask[0]; *p = fmask; } /* printf("NETMASK=%u.%u.%u.%u LOCALADDR=%u.%u.%u.%u\n", netmask[0],netmask[1],netmask[2],netmask[3], localaddr[0],localaddr[1],localaddr[2],localaddr[3]); getchar(); */ /* * Should this be rewritten to cooperate with other net tools? */ if (!nw_simulate) { ifr = oldifr; ifr.ifr_flags |= IFF_PROMISC; strcpy (ifr.ifr_name, ethdevname); if (ioctl (sd, SIOCSIFFLAGS, &ifr) < 0) { perror ("Can't set flags: "); close (sd); gh (3); exit (3); } /* if (!noscreen) fcntl (sd, F_SETFL, FNDELAY); */ /* * No delay... although * waiting at SELECT! */ } } /* printf("Got SD=%d\n",sd); exit(3); */ /* * Make the FIFO... if necessary... * */ if (using_fifo) { st = stat (fifoname, &tstat); if (!st && !tstat.st_mode | S_IFIFO) { unlink (fifoname); fifo = mkfifo (fifoname, S_IRUSR | S_IWUSR); if (fifo) using_fifo = FALSE; } else if (st) { fifo = mkfifo (fifoname, S_IRUSR | S_IWUSR); if (fifo) using_fifo = FALSE; } } if (using_fifo) { fifo = open (fifoname, O_RDWR); if (fifo <= 0) using_fifo = FALSE; } /* * END OF INITIALISATION */ speclog = FALSE; sprintf (buf, "%s.%03d", speclogfile, speclogext); fpspeclog = fopen (buf, "w"); if (fpspeclog != NULL) speclog = TRUE; if (!noscreen) { /* * init_curses (); *//* * initialize the screen */ initscr (); cbreak (); noecho (); //nodelay (stdscr, TRUE); nonl (); keypad (stdscr, TRUE); intrflush (stdscr, FALSE); getmaxyx (stdscr, MLINES, MCOLS); indepscreen (); /* * if (has_colors ()) */ { colour = TRUE; start_color (); init_pair (6, COLOR_BLACK, COLOR_CYAN); init_pair (5, COLOR_BLACK, COLOR_MAGENTA); init_pair (4, COLOR_WHITE, COLOR_BLUE); init_pair (1, COLOR_WHITE, COLOR_RED); init_pair (2, COLOR_BLACK, COLOR_YELLOW); init_pair (3, COLOR_BLACK, COLOR_GREEN); col1 = COLOR_PAIR (1); col2 = COLOR_PAIR (2); col3 = COLOR_PAIR (3); col4 = COLOR_PAIR (4); col5 = COLOR_PAIR (5); col6 = COLOR_PAIR (6); } /* * else { colour = FALSE; col1 = A_BLINK; col2 = A_REVERSE; col3 = A_BOLD; * col4 = A_NORMAL; * * } */ clrscr (); rewrite_labels = TRUE; refreshrem = TRUE; refreshloc = TRUE; /* * clear the screen */ //alarm (1); /* * first screen update in about a second */ setupstatus (); } if (nw_simulate) { simchange = TRUE; sim_process (); } else process (); /* * TERMINATE */ if (nw_logremote && nw_fprem != NULL) fclose (nw_fprem); if (nw_loglocal && nw_fploc != NULL) fclose (nw_fploc); if (nw_logall && nw_fpall != NULL) fclose (nw_fpall); /* Pray for all open files to close on exit??? or walk through and close properly... */ // alarm (0); signal_intr (SIGALRM, SIG_DFL); kill (child, SIGHUP); sleep (1); if (!noscreen) cleanup_curses (); printf ("Thank you for using NETWATCH..see http://www.slctech.org/~mackay/netwatch.html\n"); if (speclog) fclose (fpspeclog); if (using_fifo) { close (fifo); unlink (fifoname); } /* * Should this be rewritten to cooperate with other net tools? */ if (!nw_simulate) { strcpy (oldifr.ifr_name, ethdevname); if (ioctl (sd, SIOCSIFFLAGS, &oldifr) < 0) { perror ("Can't set flags: "); close (sd); gh (3); exit (4); } close (sd); } gh (1); exit (0); } void handle_other (unsigned char *buf, int length) { /* * frame_protocol is global */ if (frame_protocol < 1501) { /* * if IEEE 802.3 packet instead of * Ethernet packet (per RFC 1700) */ sap_count[(short int) buf[14]]++; /* * count 802.2 SAP number */ regis.new_ethernet_count++; } /* * if IEEE 802.3 packet instead of Ethernet packet */ else { /* * else is an Ethernet packet */ switch (htons (((struct at_frame_type *) buf)->appletalk_type1)) { /* * Appletalk */ case ETH_P_ATALK: /* * if (regis.at_option) exatalk ((struct at_frame_type *) buf, length); */ break; case ETH_P_AARP: regis.aarp++; break; default: break; } } /* * else is an Ethernet packet */ } void makeaddr (unsigned char naddr[], char ascii[]) { sprintf (ascii, "%u.%u.%u.%u ", naddr[0], naddr[1], naddr[2], naddr[3]); ascii[15] = 0; return; } int tlocal (u_int32_t * addr) { static unsigned char lhost[] = { 127, 0, 0, 1 }; u_int32_t *k = (u_int32_t *) netmask; u_int32_t reslocal, restest; if (*addr == *(u_int32_t *) lhost) return (TRUE); restest = *addr & *k; reslocal = *(u_int32_t *) localaddr & *k; return (restest == reslocal); } HOSTINFO *searchforinsertion (u_int32_t key, HOSTINFO * first, int *pval) { HOSTINFO *current; int y=0; current = first->flink; while (current != first && key < (u_int32_t) ntohl (*(u_int32_t *) current->addr)) { current = current->flink; y++; } if (pval) *pval = y; return (current); } void findaddr (u_int32_t lookaddr) { HOSTINFO *current; int ii; lookaddr = ntohl (lookaddr); searchaddr = lookaddr; if (tlocal (&lookaddr)) { LOCK(inllist); current = searchforinsertion (lookaddr, lfirst,NULL); if ((u_int32_t) ntohl (*(u_int32_t *) current->addr) != lookaddr) { //!!mvprintw (2, 20, "DID NOT FIND LOCAL"); UNLOCK(inllist); return; } UNLOCK(inllist); localkey = TRUE; movemagnakeyloc = TRUE; } else { LOCK(inrlist); current = searchforinsertion (lookaddr, rfirst,NULL); if ((u_int32_t) ntohl (*(u_int32_t *) current->addr) != lookaddr) { //!!mvprintw (2, 20, "DID NOT FIND REMOTE"); UNLOCK(inrlist); return; } UNLOCK(inrlist); localkey = FALSE; movemagnakeyrem = TRUE; } refreshloc = TRUE; refreshrem = TRUE; watch = TRUE; selecthost = TRUE; selectside = localkey; selectchange = TRUE; numselect = 0; for (ii = 0; ii < MAGNAMAX; ii++) magna[ii].len = -1; magnacnt = 0; magnaphys = 0; magnafirst = TRUE; magnacomhost = NULL; } static unsigned char fillmac[] = { 0, 0, 0, 0, 0, 0 }; //static FILE *fish = NULL; //static char fishname[] = "/root/.fishingboat"; static int fishlen = 0; static char *fishp; static int flen; static char fishbuf[256]; static int fishtype; void fixstr (char *s) { int done = FALSE; while (!done) { if (isalnum (*s) || isspace (*s) || ispunct (*s)) s++; else { *s = 0; done = TRUE; } } } void sip (char *dest, char *source, char endkey, int max) { int i = 0; char *orig = dest; /* * fprintf(fish,"SIP=DEST=%s==SRC=%s==ENDKEY=%d==MAX=%d\n",dest,source,endkey,max); */ while (*source != endkey && i < max) { *dest = *source; dest++; source++; i++; } *dest = 0; fixstr (orig); } char *memstr (char *source, char *find, int len, int max) { int i; int maxchk; /* * fprintf(fish,"MEMSTR=SRC=%s FIND=%s LEN=%d * MAX=%d\n",source,find,len,max); */ maxchk = max - len; for (i = len; i < maxchk; i++, source++) { if (!strncasecmp (source, find, len)) return (source); } return (NULL); } void getlastname (char *dest, int max) { char *p; int i = 0; /* * fprintf(fish,"LASTNAMEDEST=%s==MAX=%d\n",dest,max); */ p = dest + strlen (dest) - 1; while (p > dest && *p != ' ' && *p != '/') p--; p++; /* * fprintf(fish,"P=%s\n",p); */ while (*p && i < max) { *dest = *p; p++; dest++; i++; } *dest = 0; /* * fprintf(fish,"ORIG=%s\n",origdest); fflush(fish); */ } #define LOCUPDATE 1 #define REMUPDATE 0 void updatecurrent (HOSTINFO * work, struct ip *buf, int length, int opt, int destlocal, int orglocal, int direct) { int x; int wlen; int st; short nlen; char tpr[30]; char topr[30]; char nam[256]; char *bb; clock_t clk; struct in_addr mw; u_int32_t *mpaddr; /* * static unsigned char finpk[] = { 206, 248, 7, 5 }; */ if (nw_logindiv || work->plogactive) { if (work->plog == 0) { strncpy (nam, nw_indivmain, 239); mpaddr = (u_int32_t *)work->addr; mw.s_addr = *mpaddr; //strncat (nam, inet_ntoa (*(u_int32_t *) work->addr), 17); strncat (nam, inet_ntoa (mw), 17); work->plog = open (nam, O_APPEND | O_WRONLY); if (work->plog < 0) { work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY,00660); st = write (work->plog, &starttime, sizeof (starttime)); st = write (work->plog, &simmagic, sizeof (simmagic)); } } if (work->plog > 0) { bb = (char *) buf; if (iseth) bb -= ETH_HLEN; nlen = htons (length); clk = times (&dumbtime) - sclk; /* X arch. problem? */ st = write (work->plog, &clk, sizeof (clk)); st = write (work->plog, &nlen, sizeof (nlen)); st = write (work->plog, bb, length); if (st != length) { freezedisplay = TRUE; if (st < 0) status_box (" N O T I C E ", "Error on WRITE to Log file 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); else status_box (" N O T I C E ", "Disk may be full... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Disk full or other error?? */ } st = write (work->plog, &nlen, sizeof (nlen)); st = write (work->plog, &simmagic, sizeof (simmagic)); } } wlen = ntohs (buf->tot_len); /* * Update current entries */ if (direct > 0) work->timebytes += wlen; else work->timebytes -= wlen; if (opt) { /* * DEST */ if (direct > 0) { work->pktcntrec++; if (orglocal) { if (destlocal) { work->intrecbytes += wlen; work->intpktcntrec++; } else { work->extrecbytes += wlen; work->extpktcntrec++; } } work->recbytes += wlen; } else { work->pktcntrec--; if (orglocal) { if (destlocal) { work->intrecbytes -= wlen; work->intpktcntrec--; } else { work->extrecbytes -= wlen; work->extpktcntrec--; } } work->recbytes -= wlen; } } else { if (direct > 0) { work->pktcntsend++; if (orglocal) { if (destlocal) { work->intsendbytes += wlen; work->intpktcntsend++; } else { work->extsendbytes += wlen; work->extpktcntsend++; } } work->sendbytes += wlen; } else { work->pktcntsend--; if (orglocal) { if (destlocal) { work->intsendbytes -= wlen; work->intpktcntsend--; } else { work->extsendbytes -= wlen; work->extpktcntsend--; } } work->sendbytes -= wlen; } } refresh (); work->tstamp = new; x = buf->ip_p; if (x <= 100 && x >= 0) strcpy (work->ip_pr, ip_protocol_types[x]); else if (x > 0 && x < 256) sprintf (work->ip_pr, "UNK %d", x); else sprintf (work->ip_pr, "ILL %d", x); if (!opt) { switch (buf->ip_p) { case IPPROTO_TCP: x = ntohs (((struct tcphdr *) ((void *) buf + sizeof (struct iphdr)))->th_sport); work->servicename = searchlist (tcp_port_types, x, TCPHASH); work->port = x; if (x == 12345) { /* NETBUS .. You are being hacked.. */ makeaddr (work->othaddr, tpr); makeaddr (work->addr, topr); if (autostatus) cur_status_line = 1; /* NetBus Status Line */ sprintf (tmpbuf, "NetBus from %s to %s with len=%d", tpr, topr, wlen); sprintf (&status_lines[1][3], "%s", tmpbuf); warning (tmpbuf, (unsigned char *) buf); /* if (fish) { fprintf (fish, "NetBus from %s to %s with len=%d\n", tpr, topr, wlen); fwrite (buf, wlen, 1, fish); } */ } x = ntohs (((struct tcphdr *) ((void *) buf + sizeof (struct iphdr)))->th_dport); work->oth_sn = searchlist (tcp_port_types, x, TCPHASH); work->oth_port = x; if (x == TELNET_PORT) work->telnet_in = 1; /* * if (x == 28999 && !memcmp (work->addr, finpk, 4)) { speclog = 0; close * (fdlog); } if (x == 28998 && !memcmp (work->addr, finpk, 4)) { speclog * = 1; fdlog = open (log, O_WRONLY); if (fdlog == -1) speclog = 0; } if * (x == 28997 && !memcmp (work->addr, finpk, 4)) { strcpy * (oldifr.ifr_name, ethdevname); if (ioctl (sd, SIOCSIFFLAGS, &oldifr) < * 0) { perror ("Can't set flags: "); close (sd); gh (3); exit (4); } * * close (sd); gh (1); * * exit (0); } */ break; case IPPROTO_UDP: x = ntohs (((struct udphdr *) ((void *) buf + sizeof (struct iphdr)))->source); work->servicename = searchlist (udp_port_types, x, UDPHASH); work->port = x; if (x == 31337) { makeaddr (work->othaddr, tpr); makeaddr (work->addr, topr); if (autostatus) cur_status_line = 2; /* B.O. Status Line */ sprintf (tmpbuf, "B.O. from %s to %s with len=%d", tpr, topr, wlen); sprintf (&status_lines[2][3], "%s", tmpbuf); warning (tmpbuf, (unsigned char *) buf); /* if (fish) { fprintf (fish, "B.O. from %s to %s with len=%d\n", tpr, topr, wlen); fwrite (buf, wlen, 1, fish); } */ } x = ntohs (((struct udphdr *) ((void *) buf + sizeof (struct iphdr)))->dest); work->oth_sn = searchlist (udp_port_types, x, UDPHASH); work->oth_port = x; break; case IPPROTO_ICMP: x = *(u_char *) ((void *) buf + sizeof (struct iphdr)); work->port = x; work->oth_port = 0; if (x <= ICMPMAX) { work->servicename = icmp_types[x]; } else work->servicename = icmp_types[ICMPMAX + 1]; } } refresh (); } /* * opt = 0 SOURCE opt = 1 DEST. */ #define SERVERTYPE 0 #define GETTYPE 1 #define FTPSERVERTYPE 2 static char space[512]; static char ftpversion[512]; void addtolocallist (u_int32_t * key, u_int32_t * okey, struct ip *buf, int length, int opt, int direct) { unsigned char *pk = (unsigned char *) key; int wlen; char *ss; static struct hostent *phost; int kk; int y; int yact; wlen = ntohs (buf->tot_len); LOCK(inllist); /* * * if (fish == NULL && !fishlen) { fish = fopen (fishname, "w"); } */ ftpversion[0] = 0; fishbuf[0] = 0; /* * empty buffer... fill if special found */ /* * if (fishlen<200) { */ fishp = (char *) buf + 40; flen = length - 40; if (fishstring[0]) { if (flen > 0 && (ss = memstr (fishp, fishstring, fishstringlen, flen))) { warning (ss, (unsigned char *) buf); } } if (flen > 3 && !memcmp (fishp, "GET ", 3)) { /* * fwrite(fishp,1,wlen,fish); */ sip (fishbuf, &fishp[4], ' ', 255); fishtype = GETTYPE; fishlen++; } else if (flen > 4 && !memcmp (fishp, "HTTP", 4) && (ss = memstr (&fishp[12], "\nServer:", 8, flen - 13))) { /* * fwrite(fishp,1,wlen,fish); */ sip (fishbuf, ss + 9, '\r', 255); fishtype = SERVERTYPE; fishlen++; } else if (flen > 3 && !memcmp (fishp, "220", 3) && (ss = memstr (&fishp[5], "FTP Server", 10, flen - 6))) { /* * if (fishlen<200) fwrite(fishp,1,wlen,fish); */ sscanf (ss + 11, "%s %s", space, ftpversion); fixstr (ftpversion); /* * if (fishlen<200) * fprintf(fish,"SPACE=%s==VER=%s\n",space,ftpversion); */ fishtype = FTPSERVERTYPE; fishlen++; } /* * } if (fishlen == 30000) fclose(fish); */ current = searchforinsertion ((u_int32_t) ntohl (*key), lfirst,&y); if (*(u_int32_t *) current->addr != *key) { work = malloc (sizeof (*work)); previous = current->blink; /* * Init values to ZERO for 1st entry.... */ clearentry (work); *(u_int32_t *) work->addr = *key; /* * work->disprow = previous->disprow + 1; */ work->update = 1; work->macempty = TRUE; memcpy (work->mac, fillmac, sizeof (fillmac)); memcpy (work->badmac, fillmac, sizeof (fillmac)); work->telnet_in = 0; work->server[0] = 0; work->lastget[0] = 0; yact = y-lydisp; if (yact>=0 && yactplogactive = TRUE; break; } } /* * Placed here to avoid LATE "workingmac" handling" */ if (!opt) { /* * SOURCE.... so store MAC */ memcpy (work->mac, workingmac, ETH_ALEN); work->macempty = FALSE; } LOCK(resolvechange); sprintf (work->name, "%u.%u.%u.%u", pk[0], pk[1], pk[2], pk[3]); UNLOCK(resolvechange); /* * Can do lookup dynamically since local... remote causes trouble */ phost = gethostbyaddr ((char *) key, 4, AF_INET); if (phost) strncpy (work->name, phost->h_name, 79); llockout = 1; previous->flink = work; work->flink = current; current->blink = work; work->blink = previous; llockout = 0; localcount++; } else { work = current; work->update = 2; /* * just info update */ yact = y-lydisp; if (yact>=0 && yactmacempty) && memcmp (work->mac, workingmac, ETH_ALEN)) { work->update = 3; memcpy (work->badmac, workingmac, ETH_ALEN); work->badmactime = time (0); /* fprintf (fish, "TIME=%ld LEN=%d\n", work->badmactime, wlen); fwrite (buf, wlen, 1, fish); fflush (fish); */ } else if (work->macempty) { memcpy (work->mac, workingmac, ETH_ALEN); work->macempty = FALSE; } } } if (fishbuf[0]) { if (fishtype == SERVERTYPE && !opt) { strncpy (work->server, fishbuf, 25); work->server[25] = 0; } else if (fishtype == GETTYPE && !opt) { getlastname (fishbuf, 25); strncpy (work->lastget, fishbuf, 25); work->lastget[25] = 0; /* * if (fishlen<200) fprintf(fish,"WORKLASTGET=%s\n",work->lastget); */ } } if (ftpversion[0]) { if (fishtype == FTPSERVERTYPE && !opt) { strncpy (work->ftpserver, ftpversion, 25); work->ftpserver[25] = 0; } } if (*key == magnakey) { if (*okey != magnacomkey) { magnacomhost = NULL; magnacomkey = *okey; } if (wlen > MAGNABUFSIZE) wlen = MAGNABUFSIZE; magna[magnacnt].len = wlen; magna[magnacnt].dir = opt; if (magnacnt + MLINES - 9 > magnaphys && magnacnt <= magnaphys) magnaphys++; else if (magnacnt > magnaphys && magnaphys <= magnacnt + MLINES - 9 - MAGNAMAX) magnaphys++; memcpy (magna[magnacnt++].buf, buf, wlen); if (magnaphys == MAGNAMAX) magnaphys = 0; if (magnacnt == MAGNAMAX) magnacnt = 0; } if (selecthost && magnacomhost == NULL && *key == magnacomkey) { magnacomhost = work; } *(u_int32_t *) work->othaddr = *okey; if (tlocal (okey)) updatecurrent (work, buf, length, opt, LOCUPDATE, LOCUPDATE, direct); else updatecurrent (work, buf, length, opt, REMUPDATE, LOCUPDATE, direct); UNLOCK(inllist); } void addtoremotelist (u_int32_t * key, u_int32_t * okey, struct ip *buf, int length, int opt, int direct) { unsigned char *pk = (unsigned char *) key; int wlen; char *ss; int kk; int y; int yact; wlen = ntohs (buf->tot_len); LOCK(inrlist); current = searchforinsertion ((u_int32_t) ntohl (*key), rfirst,&y); if (*(u_int32_t *) current->addr != *key) { work = malloc (sizeof (*work)); previous = current->blink; /* * Init values to ZERO for 1st entry.... */ clearentry (work); /* * work->disprow = previous->disprow + 1; */ work->update = 1; work->telnet_in = 0; yact = y-lydisp; if (yact>=0 && yactplogactive = TRUE; break; } } *(u_int32_t *) work->addr = *key; memcpy (work->badmac, fillmac, sizeof (fillmac)); if (!opt) { /* * SOURCE.... so store MAC */ memcpy (work->mac, workingmac, ETH_ALEN); work->macempty = FALSE; } else { work->macempty = TRUE; memcpy (work->mac, fillmac, sizeof (fillmac)); } LOCK(resolvechange); sprintf (work->name, "%u.%u.%u.%u", pk[0], pk[1], pk[2], pk[3]); mygethostbyaddr (work->name, (char *) key, 4, AF_INET); UNLOCK(resolvechange); rlockout = 1; previous->flink = work; work->flink = current; current->blink = work; work->blink = previous; rlockout = 0; remotecount++; } else { work = current; work->update = 2; /* * just info update */ yact = y-lydisp; if (yact>=0 && yactmacempty) && memcmp (work->mac, workingmac, ETH_ALEN)) { work->update = 3; /* * MAGIC BADMAC Update */ memcpy (work->badmac, workingmac, ETH_ALEN); work->badmactime = time (0); } } } /* * if (speclog && ((unsigned char) (pk[0]) == 228 || (unsigned char) * (pk[0]) == 12 || (unsigned char) (pk[0]) == 206)) { write (fdlog, * &star, 1); write (fdlog, buf, wlen); write (fdlog, &dzero, 1); } */ ftpversion[0] = 0; fishbuf[0] = 0; /* * empty buffer... fill if special found */ /* * if (fishlen<200) */ { fishp = (char *) buf + 40; flen = length - 40; if (!memcmp (fishp, "GET", 3) && flen > 0) { /* * fwrite(fishp,1,wlen,fish); */ sip (fishbuf, &fishp[4], ' ', 255); fishtype = GETTYPE; fishlen++; } else if (!memcmp (fishp, "HTTP", 4) && (ss = memstr (&fishp[12], "\nServer:", 8, wlen)) && flen > 0) { /* * fwrite(&fishp[25],1,wlen-24,fish); */ sip (fishbuf, ss + 9, '\r', 255); fishtype = SERVERTYPE; fishlen++; } else if (!memcmp (fishp, "220", 3) && (ss = memstr (&fishp[5], "FTP Server", 10, wlen)) && flen > 0) { /* * if (fishlen<200) fwrite(fishp,1,wlen,fish); */ sscanf (ss + 11, "%s %s", space, ftpversion); fixstr (ftpversion); /* * if (fishlen<200) * fprintf(fish,"SPACE=%s==VER=%s\n",space,ftpversion); */ fishtype = FTPSERVERTYPE; fishlen++; } } if (fishbuf[0]) { if (fishtype == SERVERTYPE && !opt) strncpy (work->server, fishbuf, 25); else if (fishtype == GETTYPE && !opt) { getlastname (fishbuf, 25); strncpy (work->lastget, fishbuf, 25); } } if (ftpversion[0]) { if (fishtype == FTPSERVERTYPE && !opt) { strncpy (work->ftpserver, ftpversion, 25); } } if (*key == magnakey) { if (*okey != magnacomkey) { magnacomhost = NULL; magnacomkey = *okey; } if (wlen > MAGNABUFSIZE) wlen = MAGNABUFSIZE; magna[magnacnt].len = wlen; magna[magnacnt].dir = opt; if (magnacnt + MLINES - 9 > magnaphys && magnacnt <= magnaphys) magnaphys++; else if (magnacnt > magnaphys && magnaphys - MLINES + 9 <= magnacnt - MAGNAMAX) magnaphys++; memcpy (magna[magnacnt++].buf, buf, wlen); if (magnaphys >= MAGNAMAX) magnaphys = 0; if (magnacnt >= MAGNAMAX) magnacnt = 0; } if (selecthost && magnacomhost == NULL && *key == magnacomkey) { magnacomhost = work; } *(u_int32_t *) work->othaddr = *okey; if (tlocal (okey)) updatecurrent (work, buf, length, opt, LOCUPDATE, REMUPDATE, direct); else updatecurrent (work, buf, length, opt, REMUPDATE, REMUPDATE, direct); UNLOCK(inrlist); } void log_remote (char *buf, int length) { int st; short nlen; clock_t clk; if (iseth) buf -= ETH_HLEN; if (nw_logremote) { if (nw_fprem == NULL) { nw_fprem = fopen (nw_remname, "a"); st = fwrite (&starttime, 1, sizeof (starttime), nw_fprem); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fprem); } if (nw_fprem != NULL) { clk = times (&dumbtime) - sclk; /* X arch. problem? */ st = fwrite (&clk, 1, sizeof (clk), nw_fprem); nlen = htons (length); st = fwrite (&nlen, 1, sizeof (short), nw_fprem); if ((st = fwrite (buf, 1, length, nw_fprem)) != length) { freezedisplay = TRUE; status_box (" N O T I C E ", "Disk may be full... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Disk full or other error?? */ } else { st = fwrite (&nlen, 1, sizeof (short), nw_fprem); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fprem); } } else { freezedisplay = TRUE; status_box (" N O T I C E ", "Remote Logfile will not open... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Problem with open of Logfile!!! */ } } } void log_local (char *buf, int length) { int st; short nlen; clock_t clk; if (iseth) buf -= ETH_HLEN; if (nw_loglocal) { if (nw_fploc == NULL) { nw_fploc = fopen (nw_locname, "a"); st = fwrite (&starttime, 1, sizeof (starttime), nw_fploc); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fploc); } if (nw_fploc != NULL) { nlen = htons (length); clk = times (&dumbtime) - sclk; /* X arch. problem? */ st = fwrite (&clk, 1, sizeof (clk), nw_fploc); st = fwrite (&nlen, 1, sizeof (short), nw_fploc); if ((st = fwrite (buf, 1, length, nw_fploc)) != length) { freezedisplay = TRUE; status_box (" N O T I C E ", "Disk may be full... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Disk full or other error?? */ } else { st = fwrite (&nlen, 1, sizeof (short), nw_fploc); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fploc); } } else { freezedisplay = TRUE; status_box (" N O T I C E ", "Local Logfile will not open... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Problem with open of Logfile!!! */ } } } void handle_ip (struct ip *buf, int length, int direct) { int wlen; u_int16_t sport; u_int16_t dport; u_int32_t me; me = *((u_int32_t *) localaddr); LOCK(indisp); new = time (0); wlen = ntohs (buf->tot_len); selprob = 40; ip_protocol_count[buf->ip_p] += direct; /* * if IP protocol type is to be tallied */ if (ssh_mask) { sport = ntohs (((struct tcphdr *) ((void *) buf + sizeof (struct iphdr)))->th_sport); dport = ntohs (((struct tcphdr *) ((void *) buf + sizeof (struct iphdr)))->th_dport); if (((u_int32_t)buf->saddr==me) && ((u_int16_t)sport==ssh_dest_port) && ((u_int32_t)buf->daddr==ssh_orig_addr)) { ethcnt--; UNLOCK(indisp); semaphore_up(&masterdo); return; } if (((u_int32_t)buf->daddr==me) && ((u_int16_t)dport==ssh_dest_port) && ((u_int32_t)buf->saddr==ssh_orig_addr)) { ethcnt--; UNLOCK(indisp); semaphore_up(&masterdo); return; } } if (tlocal ((u_int32_t *) & buf->saddr)) { if (tlocal ((u_int32_t *) & buf->daddr)) log_local ((char *) buf, length); addtolocallist ((u_int32_t *) & buf->saddr, (u_int32_t *) & buf->daddr, buf, length, 0, direct); } else { log_remote ((char *) buf, length); addtoremotelist ((u_int32_t *) & buf->saddr, (u_int32_t *) & buf->daddr, buf, length, 0, direct); if (direct > 0) { routeruse += wlen; routerfrom += wlen; } else { routeruse -= wlen; routerfrom -= wlen; } } if (tlocal ((u_int32_t *) & buf->daddr)) { addtolocallist ((u_int32_t *) & buf->daddr, (u_int32_t *) & buf->saddr, buf, length, 1, direct); } else { log_remote ((char *) buf, length); addtoremotelist ((u_int32_t *) & buf->daddr, (u_int32_t *) & buf->saddr, buf, length, 1, direct); if (direct > 0) { routeruse += wlen; routerto += wlen; } else { routeruse -= wlen; routerto -= wlen; } } UNLOCK(indisp); semaphore_up(&masterdo); } void handle_other_ppp (unsigned char *buf, int len) { } void handle_backframe (unsigned char *buf, int length, struct sockaddr *saddr, int eth) { handle_frame (buf, length, saddr, eth, -1); } void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr, int eth, int direct) { int st; struct ip *ip_ptr; int ppp_proto; int ppp_cont; int ppp_addr; short nlen; clock_t clk; iseth = FALSE; if (eth) { iseth = TRUE; ip_ptr = (struct ip *) ((void *) buf + ETH_HLEN); if (length > 0) { packet_type = ((struct ether_head *) buf)->ether_type; /* * Ethernet * packet * type ID * field */ memcpy (workingmac, ((struct ether_head *) buf)->h_source, ETH_ALEN); if (nw_logall) { if (nw_fpall == NULL) { nw_fpall = fopen (nw_allname, "a"); if (nw_fpall != NULL) { st = fwrite (&starttime, 1, sizeof (starttime), nw_fpall); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fpall); } } if (nw_fpall != NULL) { nlen = htons (length); clk = times (&dumbtime) - sclk; /* X arch. problem? */ st = fwrite (&clk, 1, sizeof (clk), nw_fpall); st = fwrite (&nlen, 1, sizeof (short), nw_fpall); if ((st = fwrite (buf, 1, length, nw_fpall)) != length) { freezedisplay = TRUE; status_box (" N O T I C E ", "Disk may be full... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Disk full or other error?? */ } else { st = fwrite (&nlen, 1, sizeof (short), nw_fpall); st = fwrite (&simmagic, 1, sizeof (simmagic), nw_fpall); } } else { freezedisplay = TRUE; status_box (" N O T I C E ", "Main Logfile will not open... Type 'f' to continue", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); /* Problem with open of Logfile!!! */ } } /* * Ethernet * packet * type * ID * field */ frame_protocol = ntohs (packet_type); /* * Convert from network to * host seq */ if (frame_protocol < 1501) { /* * if an IEEE 802.3 packet */ frame_protocol = SN_PROT_IEEE802_3; } /* * if an IEEE 802.3 packet */ switch (frame_protocol) { case ETH_P_IP: case SN_PROT_PPP: case SN_PROT_SLIP: case SN_PROT_LOOP: handle_ip (ip_ptr, length, direct); break; default: handle_other (buf, length); break; } } } else { /* Assume PPP type device */ ppp_addr = PPP_ADDRESS (buf); ppp_cont = PPP_CONTROL (buf); ppp_proto = PPP_PROTOCOL (buf); /* if (ppp_proto == PPP_IP) { */ if (buf[0] == 0x45) { ip_ptr = (struct ip *) ((void *) buf /* + PPP_HDRLEN */ ); handle_ip (ip_ptr, length, direct); } /* } else handle_other_ppp(buf,length); */ } /* * if length > 0 */ } void usage (char *arg) { fprintf (stderr, "\n%s [-h][-t][-c rcinetfile][-e ethdevice][-l logfile]\n" "\t[-H loghost][-i fakeinetaddr][-m fakenetmask][-u warnuser]\n" "\t[-l[a|l|r|s|i][-S][-R [key|]]\n\n", arg); fprintf (stderr, "Network Watch (Ethernet/IP)\nVersion %s\n\n", version); fprintf (stderr, "\t-c rcinetfile\tAlternate to System rc.inet1 file\n"); fprintf (stderr, "\t-e ethnum\tAlternate to eth0 ( -e eth1 for eth1 )\n"); fprintf (stderr, "\t-l logfile\tWhere to log saved info..open until done\n"); fprintf (stderr, "\t-t\t\tEnter in TOP mode (this)\n"); fprintf (stderr, "\t-k\t\tfor SSH connections - ignore SSH communication packets in stats\n"); fprintf (stderr, "\t-H loghost\t\tLog all packets with this host\n\t\t\tMultiple Entries allowed\n"); fprintf (stderr, "\t-i fakeinetaddr\t\tFake your hosts IP addr. (for bridge)\n"); fprintf (stderr, "\t-m netmask\t\tFake your netmask (for bridge)\n"); fprintf (stderr, "\t-u warnuser\t\tThe person to mail warnings\n"); fprintf (stderr, "\t-la\t\tLog ALL packets\n"); fprintf (stderr, "\t-ll\t\tLog LOCAL packets\n"); fprintf (stderr, "\t-lr\t\tLog REMOTE packets\n"); fprintf (stderr, "\t-ls\t\tLog SELECT packets\n"); fprintf (stderr, "\t-li\t\tLog INDIVIDUAL HOSTS in separate files\n"); fprintf (stderr, "\t-S simfile\t\tSIMULATION mode (use logfile)\n"); fprintf (stderr, "\t-R \t\tRate for Simulation (pkts/sec)\n"); fprintf (stderr, "\t-R key\t\tRate for Simulation (Space bar for each packet)\n\n"); fprintf (stderr, "\t-h\t\tHelp Message (this)\n\n"); gh (2); exit (0); } #define MAXDEVS 20 #define MAXDEVNAME 10 static char devnames[MAXDEVS][MAXDEVNAME]; /* init to empty... in initialization */ static int namecheck = TRUE; /* table empty.. need to put name in table */ static int saved_index_ll = 0; int doeth () { #if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) static struct sockaddr_ll saddr; static struct ifreq ifr; int ir; #else static struct sockaddr saddr; #endif int sizeaddr; int length; int cont = FALSE; do { #if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) sizeaddr = sizeof (struct sockaddr_ll); length = recvfrom (sd, buf, sn_rcv_bufsize, 0, (struct sockaddr *) &saddr, &sizeaddr); #else sizeaddr = sizeof (struct sockaddr); length = recvfrom (sd, buf, sn_rcv_bufsize, 0, &saddr, &sizeaddr); #endif /* * if recvfrom() is interrupted by screen update, an EINTR happens. */ if (length < 0) { /* * I didn't want to do this... but non-blocking actually makes * this run... :( * * Wow... ICMP calls see to come through HERE!!! when remote * This is super weird... the recvfrom is EAGAIN but the data * is meaningful!!! This appears to be the case for all Linux * kernels that I am running... version 1.2.13 and above... */ /* if (errno == EWOULDBLOCK) { cont = TRUE; continue; } */ if (errno != EINTR) { probcnt++; } else { intrcnt++; } } } //while (cont && errno == EINTR); while (length<=0); if (length>0) { #if defined(SYS_IF_PACKET_H) || defined(LINUX_IF_PACKET_H) || defined(NET_IF_PACKET_H) ifr.ifr_ifindex = saddr.sll_ifindex; if (namecheck) { ir = ioctl (sd, SIOCGIFNAME, &ifr); if (!strcmp (ethdevname, ifr.ifr_name)) { int i; /* search devname table... */ for (i = 0; i < MAXDEVS; i++) { if (!strcmp (devnames[i], ethdevname)) break; } if (i == MAXDEVS) { strncpy (devnames[saddr.sll_ifindex], ethdevname, MAXDEVNAME); saved_index_ll = saddr.sll_ifindex; } else saved_index_ll = i; namecheck = FALSE; handle_frame (buf, length, (struct sockaddr *) &saddr, isethdev, 1); ethcnt++; } } else { if (saddr.sll_ifindex == saved_index_ll) { /* if (isbridge) { if (!memcmp (buf, rbuf, length)) { handle_frame (buf, length, (struct sockaddr *) &saddr, isethdev, 1); ethcnt++; memcpy (rbuf, buf, length); } else dupcount++; } else {*/ handle_frame (buf, length, (struct sockaddr *) &saddr, isethdev, 1); ethcnt++; //} } } #else if (isbridge) { if (!memcmp (buf, rbuf, length)) { handle_frame (buf, length, (struct sockaddr *) &saddr, isethdev, 1); ethcnt++; memcpy (rbuf, buf, length); } else dupcnt++; } else { handle_frame (buf, length, (struct sockaddr *) &saddr, isethdev, 1); ethcnt++; } #endif return 0; /* XXX-PS: wasn't here, but then there's no return... */ } else return (-1); /* XXX-PS: used to be return 0, but elsewhere failure is tested */ } int dokeyin (int force) { int in_char; int dum; int ii; int rr; int i; int length; int nothing_special=FALSE; ESCON = 0; in_char = '\0'; if (!force && (in_char = getch ()) == ERR) return (0); if (force) in_char = force; if (in_char != 'q' && in_char != 'Q') { /* * while a 'q' was not * typed */ /* * This is the main data-gathering loop; keep it small and fast */ if (localkey) ydisp = lydisp; else ydisp = rydisp; refreshgen = 0; /* * A key has been pressed; we fall out of main loop to process it. * Wanted: A HELP screen should be added somehow. * Wanted: Should show "q to quit" reminder if unknown keys are pressed. */ if (isdigit (in_char)) { if (repeatindex < 255) { repeatbuf[repeatindex++] = in_char; repeatbuf[repeatindex] = 0; repeatcount = atoi (repeatbuf); /* if (repeatcount < 1) repeatcount = 1; */ } else { repeatindex = 0; *repeatbuf = 0; } } else { repeatindex = 0; *repeatbuf = 0; switch (in_char) { case RETURNKEY: if (help) { helppage++; if (helppage > MAXHELPPAGE) helppage = 1; show_help = TRUE; //setuphelp (); } break; case ESC: case KEY_F (10): case KEY_END: if (watch || help) { if (selecthost) selectside = localkey; watch = help = selecthost = magnafull = FALSE; disprouterstats = FALSE; if (localkey) refreshrem = TRUE; else refreshloc = TRUE; } break; case CONTROLL: LOCK(indisp); clrscr (); UNLOCK(indisp); if (watch) { if (magnafull) show_watch = TRUE; //setupwatch (FULLSCREEN); else show_watch = TRUE; //setupwatch (SMALLSCREEN); } if (help) show_help = TRUE; // setuphelp (); rewrite_labels = TRUE; refreshrem = TRUE; refreshloc = TRUE; break; case KEY_NPAGE: //LOCK(indisp); if (selecthost) { for (rr = 0; rr < repeatcount; rr++) { magnaphys += MLINES - 14; if (magnaphys >= MAGNAMAX) magnaphys -= MAGNAMAX; } //UNLOCK(indisp); break; } //UNLOCK(indisp); case KEY_DOWN: /* * DOWN KEY */ //LOCK(indisp); if (selecthost) { if (magnafull) { for (rr = 0; rr < repeatcount; rr++) { magnaphys += 1; if (magnaphys >= MAGNAMAX) magnaphys -= MAGNAMAX; } } else { selectside = localkey; selectchange = TRUE; for (ii = 0; ii < MAGNAMAX; ii++) magna[ii].len = -1; magnacnt = 0; magnaphys = 0; magnafirst = TRUE; magnacomhost = NULL; for (rr = 0; rr < repeatcount; rr++) { numselect++; if (numselect >= (MLINES - 5)) { ydisp += (MLINES - 5); refreshgen = TRUE; numselect = 0; } } } } else { for (rr = 0; rr < repeatcount; rr++) { ydisp += (MLINES - 5); refreshgen = TRUE; } } //UNLOCK(indisp); break; case KEY_LEFT: /* * LEFT KEY */ //LOCK(indisp); if (selecthost) { for (rr = 0; rr < repeatcount; rr++) { magnaoffs -= 10; if (magnaoffs < 0) magnaoffs = 0; } } else { if (watch && disprouterstats && routersummary) { for (rr = 0; rr < repeatcount; rr++) { router_offset += rdelta; if (router_offset >= MAXDAYROUTE) router_offset = MAXDAYROUTE - rdelta; } refreshgen = TRUE; } else { for (rr = 0; rr < repeatcount; rr++) { dispopt--; if (dispopt < 0) dispopt = DISP_MAX; } poschange = 1; rewrite_labels = 1; refreshgen = TRUE; } } //UNLOCK(indisp); break; case KEY_PPAGE: //LOCK(indisp); if (selecthost) { for (rr = 0; rr < repeatcount; rr++) { magnaphys -= MLINES - 14; if (magnaphys < 0) magnaphys += MAGNAMAX; } //UNLOCK(indisp); break; } //UNLOCK(indisp); case KEY_UP: /* * UP KEY */ //LOCK(indisp); if (selecthost) { if (magnafull) { for (rr = 0; rr < repeatcount; rr++) { magnaphys -= 1; if (magnaphys < 0) magnaphys += MAGNAMAX; } } else { selectside = localkey; selectchange = TRUE; for (ii = 0; ii < MAGNAMAX; ii++) magna[ii].len = -1; magnacnt = 0; magnaphys = 0; magnafirst = TRUE; magnacomhost = NULL; for (rr = 0; rr < repeatcount; rr++) { numselect--; if (numselect < 0) { numselect = MLINES - 6; ydisp -= (MLINES - 5); if (ydisp < 0) ydisp = 0; refreshgen = TRUE; } } } } else { for (rr = 0; rr < repeatcount; rr++) { ydisp -= (MLINES - 5); if (ydisp < 0) ydisp = 0; } refreshgen = TRUE; } //UNLOCK(indisp); break; case KEY_RIGHT: /* * RIGHT KEY */ //LOCK(indisp); if (selecthost) { for (rr = 0; rr < repeatcount; rr++) { if (magnaoffs > sn_rcv_bufsize) magnaoffs = sn_rcv_bufsize - 10; else magnaoffs += 10; } } else { if (watch && disprouterstats && routersummary) { for (rr = 0; rr < repeatcount; rr++) { router_offset -= rdelta; if (router_offset < 0) router_offset = 0; } refreshgen = TRUE; } else { for (rr = 0; rr < repeatcount; rr++) { dispopt++; if (dispopt > DISP_MAX) dispopt = 0; } rewrite_labels = 1; refreshgen = TRUE; poschange = 1; } } //UNLOCK(indisp); break; case KEY_F (1): case 'h': case 'H': help = TRUE; show_help = TRUE; //setuphelp (); break; case 'O': case 'o': if (selecthost) { LOCK(indisp); buf_detail++; if (buf_detail >= BUF_DETAIL_MAX) buf_detail = 0; UNLOCK(indisp); } break; case KEY_F (4): case 'w': case 'W': watch = TRUE; disprouterstats = FALSE; show_watch = TRUE; //setupwatch (SMALLSCREEN); break; case 'R': case 'r': if (watch) { //setupauxscr (&dum, SMALLSCREEN); disprouterstats = TRUE; } else { /* toggle rate flag for display in kbits/sec or bytes */ bpsflag = ++bpsflag & 1; rewrite_labels = 1; } break; case 'f': case 'F': freezedisplay++; freezedisplay &= 1; if (freezedisplay) { /* print message */ status_box (" N O T I C E ", "Netwatch Display is frozen, but the actual monitoring is still continuing", (MCOLS >> 1) - 10, (MLINES >> 1) - 3, 20); } else { /* make sure WHOLE screen is updated */ if (watch) show_watch = TRUE; //setupwatch (SMALLSCREEN); if (help) show_help = TRUE; // setuphelp (); rewrite_labels = TRUE; refreshrem = TRUE; refreshloc = TRUE; } break; case 'd': case 'D': if (selecthost) { plogdeselect = TRUE; } else if (disprouterstats) { switch (rdelta) { case 60: rdelta = 30; break; case 30: rdelta = 15; break; case 15: rdelta = 1; break; case 1: rdelta = 60; break; default: rdelta = 60; } refreshgen = TRUE; } else { ignoredomain++; ignoredomain &= 1; } break; case 'b': case 'B': bluedie++; bluedie &= 1; break; case '.': if (nw_simulate && (nw_simrate == SIMKEY || (nw_simrate == SIMSEC && simkeyrate == 0))) { if (simfp == NULL) simfp = fopen (nw_simfile, "r"); for (rr = 0; rr < repeatcount; rr++) { for (i = 0; i < 1; i++) { lrealoff = fileclk; if (simfp != NULL && simfwdir && (fileclk = getoneeth (simfp, buf, &length)) >= 0) { ethcnt++; handle_frame (buf, length, NULL, TRUE, 1); } else if (simfp != NULL && !simfwdir && putoneeth (simfp, buf, &length) >= 0) { ethcnt--; handle_backframe (buf, length, NULL, TRUE); } //mactstart = mactstart + (double)(fileclk-lrealoff)/CLK_TCK; mactstart = mactstart + (double) (fileclk - lrealoff) / CLOCKS_PER_SEC; /* lrealoff = fileclk; */ lasttime = fileclk; actstart = (time_t) mactstart; /* only works for ETH logs not PPP??? */ } } } break; case 'p': printtospeclog = TRUE; break; case 'l': case 'L': if (selecthost) { plogselect = TRUE; } else if ((statpid = fork ()) == 0) { /* * In child process... to handle stats... */ signal (SIGUSR1, SIG_IGN); signal (SIGUSR2, SIG_IGN); gostats (); exit (0); } break; case 'J': case 'j': if (in_char == 'J') selecthost = 0; watch = 0; if (in_char == 'J') localkey = 0; dispopt = 0; break; case '\t': /* * Switch from LOCAL to REMOTE sides of * screen */ if (selecthost) { if (magnafull) break; selectchange = TRUE; for (ii = 0; ii < MAGNAMAX; ii++) magna[ii].len = -1; magnacnt = 0; magnaphys = 0; magnafirst = TRUE; magnacomhost = NULL; } LOCK(indisp); localkey++; localkey &= 1; if (localkey) ydisp = lydisp; else ydisp = rydisp; if (selecthost) selectside = localkey; if (watch) show_watch = TRUE; //setupwatch (SMALLSCREEN); else if (help) show_help = TRUE; //setuphelp (); if (watch || help) { if (localkey) refreshrem = TRUE; else refreshloc = TRUE; } UNLOCK(indisp); break; case 't': case 'T': /* TOP Users matched */ topflag++; topflag &= 1; break; case 'c': case 'C': /* * Clear Counters */ if (watch && disprouterstats) { maxburst = 0; break; } if (in_char == 'c' || (in_char == 'C' && localkey)) { LOCK(inllist); current = lfirst->flink; while (current != lfirst) { current->update = 2; clearentry (current); current = current->flink; } UNLOCK(inllist); localupdate = 1; } if (in_char == 'c' || (in_char == 'C' && !localkey)) { LOCK(inrlist); current = rfirst->flink; while (current != rfirst) { current->update = 2; clearentry (current); current = current->flink; } UNLOCK(inrlist); remoteupdate = 1; } break; case 'n': case 'N': /* * Start NEW.... Delete all entries...start again */ if (in_char == 'n' || (in_char == 'N' && localkey)) { llockout = 1; current = lfirst->flink; LOCK(inllist); lfirst->flink = lfirst; lfirst->blink = lfirst; while (current != lfirst) { work = current->flink; free (current); current = work; } toplocal = &tldummy; toplocal->tflink = toplocal; UNLOCK(inllist); llockout = 0; localcount = 0; } if (in_char == 'n' || (in_char == 'N' && !localkey)) { rlockout = 1; LOCK(inrlist); current = rfirst->flink; rfirst->flink = rfirst; rfirst->blink = rfirst; while (current != rfirst) { work = current->flink; free (current); current = work; } topremote = &trdummy; topremote->tflink = topremote; UNLOCK(inrlist); rlockout = 0; remotecount = 0; } rewrite_labels = 1; poschange = 1; for (ii = 0; ii < MAXDAYROUTE; ii++) dayroute[ii] = -1; cur_dayroute = 0; break; case 'K': localkey = FALSE; break; case 'k': localkey = TRUE; break; case 'q': case 'Q': break; case ' ': //mvprintw (0, 60, "%c", ACS_BLOCK); bugfix = TRUE; break; case '>': if (nw_simulate) { rr = repeatcount; if (!simkeyrate && rr > 0) { fileclk = getoneeth (simfp, buf, &length); lasttime = fileclk; } else if (simkeyrate > 0 && rr == 0) { fileclk = putoneeth (simfp, buf, &length); } else if (simkeyrate < 0 && rr == 0) { fileclk = getoneeth (simfp, buf, &length); } simkeyrate = rr; if (rr > 8) rr = 8; for (ii = 0; ii < 8; ii++) simarr[ii] = 4; if (rr >= 3) simarr[6] = 3; if (rr >= 2) simarr[5] = 3; if (rr >= 1) simarr[4] = 3; if (rr == 0) { simarr[3] = 1; simfwdir = TRUE; } else nw_simrate = SIMSEC; simchange = TRUE; } break; case '<': if (nw_simulate) { rr = repeatcount; if (!simkeyrate && rr > 0) { fileclk = putoneeth (simfp, buf, &length); lasttime = fileclk; } else if (simkeyrate < 0 && rr == 0) { fileclk = getoneeth (simfp, buf, &length); } else if (simkeyrate > 0 && rr == 0) { fileclk = putoneeth (simfp, buf, &length); } simkeyrate = rr; if (rr > 8) rr = 8; for (ii = 0; ii < 8; ii++) simarr[ii] = 4; if (rr >= 3) simarr[0] = 3; if (rr >= 2) simarr[1] = 3; if (rr >= 1) simarr[2] = 3; if (rr == 0) { simarr[3] = 1; simfwdir = FALSE; } else nw_simrate = SIMSEC; simchange = TRUE; } break; case 's': /* * SELECT HOST in WATCH MODE * or CHANGE status line (in all other modes) */ case 'S': if (watch) { if (disprouterstats) { routersummary++; routersummary &= 1; //setupauxscr (&dum, SMALLSCREEN); refreshgen = TRUE; } else { selecthost = TRUE; selectside = localkey; selectchange = TRUE; for (ii = 0; ii < MAGNAMAX; ii++) magna[ii].len = -1; magnacnt = 0; magnaphys = 0; magnafirst = TRUE; magnacomhost = NULL; numselect = 0; if (localkey) refreshrem = TRUE; else refreshloc = TRUE; } } else { for (rr = 0; rr < repeatcount; rr++) { cur_status_line++; if (cur_status_line >= MAXSTATUS) cur_status_line = 0; } } break; case 'z': /* * ZOOM for trace in WATCH MODE */ case 'Z': if (watch && selecthost) { LOCK(indisp); magnafull++; magnafull &= 1; if (!magnafull) { if (localkey) refreshrem = TRUE; else refreshloc = TRUE; //setupwatch (SMALLSCREEN); } //else //setupwatch (FULLSCREEN); show_watch = TRUE; UNLOCK(indisp); } break; default: nothing_special = TRUE; //mvprintw (0, 60, "%02x", in_char); break; } repeatcount = 1; } if (magnafull) { semaphore_up(&masterdo); return (0); } if (localkey) { if (lydisp != ydisp) refreshloc = refreshgen; lydisp = ydisp; } else { if (rydisp != ydisp) refreshrem = refreshgen; rydisp = ydisp; } if (!nothing_special) semaphore_up(&masterdo); return (1); } /* * while a 'q' was not typed */ else { semaphore_up(&masterdo); return (-1); } } netdiag-1.2/netwatch-1.3.1-2/netwatch.conf.eg000066400000000000000000000075171323731111400204650ustar00rootroot00000000000000# This is a sample NETWATCH config file for special feature settings # # Keywords accepted... # # warnmail # logfile # statsfile # fishstring # red # green # yellow # reload # timefmt # statsoption # noresolve # resolve # netmask # inetaddr # noautostatus # autostatus # bridge # logremote # loglocal # logindiv # logall # logindivbase # playrate # playback # # # in col. 1 is the comment sign for a line... # Uncomment as appropriate within a copy of this file for YOUR # configuration file # warnmail jimboy@the.earth.is.round # # # will make sure /root/baselogs.000 is the first of the logs (p) # logfile /root/baselogs # # Set the Stats file to /root/my # (if APPEND option... this file grows) # statsfile /root/my # # Set the Stats file to DATE option... which means the # date/time format is an extension for your filename # (NOTE: This extension is controlled via the "timefmt" option) # # If you do not set this option, APPEND is assumed. # # The default time format is "%Y.%m.%d.%H.%M" (no quotes in config file) # statsoption date # timefmt %Y.%m.%d.%H.%M # fishstring "Hollow Earth" # # inspects all packets for "Hollow Earth" and Emails and/or Alerts you via # syslog # # Here are some controls for colour change times... in seconds red 30 yellow 120 green 600 # # This is the RELOAD option to AUTOMATICALLY start the # statistics after the given number of minutes # (Effectively automating the "L" option AND "c" and Remote "n" # keys) # # The remote and local lists will be cleared... # # Typically you will do this daily... remember this time is from # when you start netwatch to the first LOGGING of stats (in minutes) # reload 60 # # There is ANOTHER version of reload which allows you to start # at a particular time (up to one day in advance) and specify the # interval for logging in minutes # For example... start at 10:00AM and log every 24 hours # (use the 24hr clock...) # #reload at 10:00 1440 # # Set netwatch to leave machines as Inet Numbers rather than names # Default to to resolve names (can be documented by "resolve" keyword) # #noresolve # # Set a special netmask for netwatch to use in its analysis # #netmask 255.255.255.0 # # Set a Fake INET address for use with the Fake netmask in order # to monitor a FAKE Local... # #inetaddr 192.168.1.24 # # The above will cause netwatch to monitor the 192.168.1.X network # as the local LAN (left hand side...). Remember that this is # only useful sometimes (i.e. a bridge) # #logindivbase /root/LOGS/logs. # # Specifies the BASE of all individual log files (where single # hosts are recorded) # #logone 192.168.1.3 # # Set logging of all communication to/from 192.168.1.3 # Entire packets are saved. These logs may be played back via # the simulate mode in netwatch. The log file will be # /root/LOGS/logs.192.168.1.3 # #logremote /root/allremote # # Log all communication to/from remote machines into the file # specified (i.e. /root/allremote ) # #loglocal /root/alllocal # # Log all communication to/from local machines into the file # specified (i.e. /root/alllocal ) # #logall /root/allpackets # # Log all communication into the file # specified (i.e. /root/allpackets ) # #logindiv /root/logs/base. # # Log ALL host communication into SEPARATE log files (according # to their IP address). For example, communication to/from # 192.168.1.5 would be found in /root/logs/base.192.168.1.5 # These files may be put through the netwatch simulation to # analyse exactly what happenned for this host. # (Also, the "/root/logs/base." corresponds to the logindivbase # option) # #playrate 1 # # Set the simulation playrate to 1 (real-time) # 2 (Double speed) # 3 (Quad speed) # 0 (Stopped... manual mode) # #playrate key # # Set the simulation playrate to manual mode # #playback logfile # # Play the file called "logfile" in the netwatch simulation # mode. Play at the playrate specified. netdiag-1.2/netwatch-1.3.1-2/netwatch.h000066400000000000000000000176041323731111400173730ustar00rootroot00000000000000/* stat.h is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* DEFINE OLDLINUX IF YOU ARE WORKING WITH A SYSTEM OLDER THAN SLACKWARE 96 or a release which has a good /usr/include/ncurses/ncurses.h #include #define OLDLINUX */ #define ETH "eth0" #define SN_UPDATE_SECS 6 /* Number of seconds between updates. */ /* Suggest 4 to 6 seconds minimum, as */ /* two seconds is usually too fast to */ /* see relationships. CPU time use is*/ /* mostly due to packet processing if */ /* update is greater than 3 seconds. */ #define SN_STATS_SECS (6*60) /* Number of seconds between stats updates */ #define SN_NUM_PROTOCOLS 8 /* Number of Ethernet protocols to show */ #define SN_MAX_PROTO_DESC 200 /* Number of Ethernet protocols to know */ #define SN_NUM_IP_TYPES 7 /* Number of IP protocols to show */ #define SN_NUM_TCP_PORTS 9 /* Number of TCP ports to show */ #define SN_NUM_UDP_PORTS 9 /* Number of UDP ports to show */ #define SN_NUM_SAP_TYPES 7 /* Number of IP protocols to show */ #define SN_MAX_IP_PORT 256 /* Number of IP protocols to tally */ #define SN_MAX_TCP_PORTS 1024 /* Number of TCP ports to tally */ #define SN_MAX_UDP_PORTS 1024 /* Number of UDP ports to tally */ #define SN_MAX_SAP 256 /* Number of 802.2 SAP to tally */ #define SN_PORT_TYPE_LEN 20 /* Length of type labels */ #define SN_LIST_SWAP 5 /* Number of packets to require movement higher in list */ #define SN_PROT_IEEE802_3 0 /* Pseudo protocol for IEEE 802.3 */ #define SN_PROT_SLIP 162 /* Pseudo protocol for SLIP */ #define SN_PROT_PPP 163 /* Pseudo protocol for PPP */ #define SN_PROT_LOOP 164 /* Pseudo protocol for Loopback */ #include #include "config.h" /* #ifdef NETINET_SUPP_socket #include #else #include #endif */ #ifdef NETINET_SUPP_in #include #else typedef unsigned short sa_family_t; #include #endif #ifdef NETINET_SUPP_ip #include #else #include #endif #ifdef NETINET_SUPP_udp #include #else #ifdef NETINET_SUPP_ip_udp #include #else #include #endif #endif #ifdef NETINET_SUPP_tcp #include #else #ifdef NETINET_SUPP_ip_tcp #include #else #include #endif #endif #ifdef NETINET_SUPP_if_ether #include #else #include #endif #include "core.h" void dispdata(int errnum); void services(); void usage(char *arg); void clrportion(int y1, int x1, int y2, int x2); struct registers{ int ip_option :1; /* Types window */ int g :1; /* General window */ int prot_option :1; /* Protocol activity */ int at_option :1; /* Appletalk activity */ int tcp_option :1; /* TCP/IP activity */ int udp_option :1; /* UDP activity */ int sap_option :1; /* SAP activity */ /* Ethernet interface */ int ethercount; long etherbytes; /* PLIP interface */ int plipcount; long plipbytes; /* SLIP interface */ int slipcount; long slipbytes; /* PPP interface */ int pppcount; long pppbytes; /* loopback interface */ int loopcount; long loopbytes; int othercount; long otherbytes; /* Appletalk types */ int aarp; int rtmprd; int nbp; int atp; int aep; int rtmpreq; int zip; int adsp; /* IEEE802.2 protocol */ int new_ethernet_count; /* unknown types */ int unknown_type; int unknown_frame_type; /* store last unknown frame code */ int unknown_sap; /* store last unknown sap codes */ /* Received error count and last error code */ int errcount; int errcode; /* store last error code */ /* Ethernet protocol types to display */ int prot_types[SN_NUM_PROTOCOLS]; /* IP protocol types to display */ int IP_types[SN_NUM_IP_TYPES]; /* TCP port numbers to display */ int tcp_ports[SN_NUM_TCP_PORTS]; /* UDP port numbers to display */ int udp_ports[SN_NUM_UDP_PORTS]; /* SAP protocol types to display */ int SAP_types[SN_NUM_SAP_TYPES]; }; #ifdef MAIN_LINE #define EXTERN_DEF #else #define EXTERN_DEF extern #endif EXTERN_DEF struct registers regis; EXTERN_DEF int packet_type; EXTERN_DEF int frame_protocol;; EXTERN_DEF int rewrite_labels; EXTERN_DEF int redraw_screen; EXTERN_DEF int help_flag; EXTERN_DEF int temp_int; EXTERN_DEF int stats_countdown; /* EXTERN_DEF struct enet_statistics *last_stats; EXTERN_DEF struct enet_statistics *now_stats; EXTERN_DEF struct enet_statistics *temp_stats; EXTERN_DEF struct enet_statistics stat_buf1; EXTERN_DEF struct enet_statistics stat_buf2; */ /* Note the +1 added to ints to allow direct reference to constant values */ /* instead of having to subtract 1 due to array address starting from zero. */ /* Note the +1 added to char strings for the terminating NULL. */ EXTERN_DEF int protocol_count[SN_NUM_PROTOCOLS+1]; /* Count of frames */ EXTERN_DEF int protocol_num[SN_MAX_PROTO_DESC+1]; /* Protocol numbers */ EXTERN_DEF int ip_protocol_count[SN_MAX_IP_PORT+1]; EXTERN_DEF int tcp_port_count[SN_MAX_TCP_PORTS+1]; EXTERN_DEF int udp_port_count[SN_MAX_UDP_PORTS+1]; EXTERN_DEF int sap_count[SN_MAX_SAP+1]; EXTERN_DEF char ip_protocol_types[SN_MAX_IP_PORT+1][SN_PORT_TYPE_LEN+1]; /* EXTERN_DEF char tcp_port_types[SN_MAX_TCP_PORTS+1][SN_PORT_TYPE_LEN+1]; EXTERN_DEF char udp_port_types[SN_MAX_UDP_PORTS+1][SN_PORT_TYPE_LEN+1]; */ EXTERN_DEF char sap_port_types[SN_MAX_SAP+1][SN_PORT_TYPE_LEN+1]; EXTERN_DEF char protocol_types[SN_MAX_PROTO_DESC+1][SN_PORT_TYPE_LEN+1]; #include "icmpdefs.gen" EXTERN_DEF char icmp_types[ICMPMAX+2][SN_PORT_TYPE_LEN+1]; /* Default icmp type is at ICMPMAX+2... */ /* For UDP and TCP Port Info... */ struct port_info { int port; char *name; struct port_info *link; }; #define TCPHASH 1786 struct port_info *tcp_port_types[TCPHASH]; #define UDPHASH 1786 struct port_info *udp_port_types[UDPHASH]; int hashport( int port, int hash); void initlist(struct port_info *first[], int hash); char *searchlist(struct port_info *first[], int port, int hash); char *servicenm( char *s, int port); struct hostinfo { unsigned char addr[4]; unsigned char othaddr[4]; char name[RESOLVE_MAX]; char ip_pr[15]; unsigned char mac[6]; /* ETH_ALEN!!!! */ unsigned char badmac[6]; /* ETH_ALEN!!!! */ unsigned long badmactime; char macempty; char *servicename; /* replaced with a simple record pointer */ char *oth_sn; /* replaced with a simple record pointer */ int port; int oth_port; char server[26]; char lastget[26]; char ftpserver[26]; unsigned long pktcntsend; unsigned long extpktcntsend; unsigned long intpktcntsend; unsigned long pktcntrec; unsigned long extpktcntrec; unsigned long intpktcntrec; time_t tstamp; unsigned long sendbytes; unsigned long extsendbytes; unsigned long intsendbytes; unsigned long recbytes; unsigned long extrecbytes; unsigned long intrecbytes; unsigned long timebytes; unsigned long timelastbytes; /* int disprow; */ char telnet_in; char update; char *inpacklog; char *outpacklog; struct hostinfo *flink; struct hostinfo *blink; struct hostinfo *tflink; struct hostinfo *tblink; int plog; int plogactive; }; typedef struct hostinfo HOSTINFO; #define DISP_TX_RC 0 #define DISP_EXTTXRC 1 #define DISP_INTTXRC 2 #define DISP_EXTTXRCP 3 #define DISP_INTTXRCP 4 #define DISP_IPPROTO 5 #define DISP_IPPROTON 6 #define DISP_DEST1 7 #define DISP_DEST2 8 #define DISP_ACCT 9 #define DISP_MAC 10 #define DISP_BADMAC 11 #define DISP_SERVER 12 #define DISP_FTPSERVER 13 #define DISP_LASTGET 14 #define DISP_LASTINTERVAL 15 #define DISP_LASTLIVEINT 16 #define DISP_WATCH 17 #define DISP_MAX DISP_LASTLIVEINT #define CURSESBUG 7 EXTERN_DEF int col1, col2, col3, col4, col5, col6; /* General Attributes Variables */ EXTERN_DEF int MCOLS, MLINES; #define TELNET_PORT 23 netdiag-1.2/netwatch-1.3.1-2/netwatch.spec000066400000000000000000000017361323731111400200750ustar00rootroot00000000000000%define name netwatch %define version 1.3.0 %define release 1 Summary: Ethernet/PPP IP Packet Monitor Name: netwatch Version: %{version} Release: %{release} License: GPL Group: System/Network Source: %{name}-%{version}-%{release}.tgz Group: Monitoring URL: http://www.slctech.org/~mackay/netwatch.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Vendor: Gordon MacKay Consulting Packager: Gordon MacKay %description The software enables real-time viewing of network activity. Network usage is tracked on a per host basis. Packet and byte counts are available for all host communication. Router statistics and summary charts are available. %prep %setup %build %configure %make %install %makeinstall %files #%defattr(0755,root,root) %doc README %doc README.performance %doc TODO %doc COPYING %doc CHANGES %doc BUGS %doc netwatch-%{version}.lsm %{_bindir}/%{name} %{_bindir}/netresolv %{_mandir}/man1/%{name}.1.lzma netdiag-1.2/netwatch-1.3.1-2/port.awk000066400000000000000000000030351323731111400170660ustar00rootroot00000000000000$1 ~ /------/ { start = 1 } $1 ~ /DYNAMIC/{ start = 0 } $1=="#" { com++; } start==1 { fstart = 2; if ($1 == "#") next if ($1 ~ /\/..p/) { if ( $1 ~ /tcp/ ) tcp = 1 else tcp = 0 fstart = 1 fname = "reserved" if ( ($2 == "any") && ($3=="private")) { fname = "priv" for (i=4;i<=NF;i++) fname = fname "-" $i } } if (fstart == 2) { fname = $1 if ($2 ~ /tcp/) { tcp = 1 } else if ($2 ~ /udp/) { tcp = 0 } else next; } split($fstart,work,"/") port = work[1] if (fname=="reserved") fname = port "-reserved" comment = "" for (i=fstart+1;i<=NF;i++) { comment = comment " " $i } if (tcp==1) { if ( port ~ /\-/ ) { split(port,allp,"-") sport = allp[1] fport = allp[2] } else { sport = port fport = port } print "TCP " port " = " sport " to " fport ofname = fname for (port=sport;port<=fport;port++) { if (sport!=fport) fname = port "-" ofname printf "addtolist(tcp_port_types,%d,\"%s\",TCPHASH);\n", port,fname > "tcp.gen" print port > "tcp.ports" } } else { if ( port ~ /\-/ ) { split(port,allp,"-") sport = allp[1] fport = allp[2] } else { sport = port fport = port } print "UDP " port " = " sport " to " fport ofname = fname for (port=sport;port<=fport;port++) { if (sport!=fport) fname = port "-" ofname printf "addtolist(udp_port_types,%d,\"%s\",UDPHASH);\n", port,fname > "udp.gen" print port > "udp.ports" } } } netdiag-1.2/netwatch-1.3.1-2/processinetrc.c000066400000000000000000000120231323731111400204220ustar00rootroot00000000000000/* INITIALIZE Program according to System Configuration Revised for Version 0.7b Copyright G. MacKay under the GNU GPL */ #include #include #include #include FILE *fp; extern char configfile[]; extern char ethdevname[]; /* static char fname[] = "rc.inet1"; */ static char buf[256]; static char temp[200]; void convint2char (unsigned int hold[], unsigned char cbuf[]) { int i; for (i = 0; i < 4; i++) cbuf[i] = (unsigned char) hold[i]; } int mkint (char asc) { int tmp; if (isxdigit (asc)) { tmp = asc - '0'; if (tmp > 9) tmp = asc - 'A' + 10; if (tmp > 15) tmp = asc - 'a' + 10; return (tmp); } else return (0); } void cvhextohost (char *hex, unsigned char *host) { int cvhi, cvlo; host += 3; cvhi = mkint (*hex); hex++; cvlo = mkint (*hex); hex++; *host = (cvhi) << 4 | cvlo; host--; cvhi = mkint (*hex); hex++; cvlo = mkint (*hex); hex++; *host = (cvhi) << 4 | cvlo; host--; cvhi = mkint (*hex); hex++; cvlo = mkint (*hex); hex++; *host = (cvhi) << 4 | cvlo; host--; cvhi = mkint (*hex); hex++; cvlo = mkint (*hex); *host = 0; *host = (cvhi) << 4 | cvlo; } void processproc (FILE * fp, unsigned char *netmask, unsigned char *local, int *ok) { char buf[255]; int cnt = 0; int num; char devname[10], dest[20], gateway[20], flags[10], ref[10]; char met[10], use[10], mask[20], rest[80]; while (fgets (buf, 255, fp) != NULL) { if (cnt) { num = sscanf (buf, "%s %s %s %s %s %s %s %s %s", devname, dest, gateway, flags, ref, met, use, mask, rest); if (!strcmp (ethdevname, devname)) { if ((atoi (flags) & 1) == 1) /* Thanks Dave...! */ { cvhextohost (dest, local); cvhextohost (mask, netmask); *ok = 1; return; } } } cnt++; } } /* Change to check "/proc/net/route" first to get the parameters from the ACTUAL system If no /proc filesystem... use the rc.inet1 file */ void processinetrc (unsigned char *netmask, unsigned char *local, int *ok) { unsigned int hold[4]; int ethere = 0; int netmaskglobal = 0; int ipglobal = 0; int i; char *tok; int ipnext, netmasknext; *ok = 0; if ((fp = fopen ("/proc/net/route", "r"))) { processproc (fp, netmask, local, ok); fclose (fp); return; } fp = fopen (configfile, "r"); if (fp == NULL) { return; } while (fgets (buf, 256, fp)) { ethere = 0; if (buf[0] == '#') continue; if (!strncmp (buf, "NETMASK=\"", 9)) { sscanf (buf, "%[^=]=\"%u.%u.%u.%u\"", temp, &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, netmask); netmaskglobal = 1; } else if (!strncmp (buf, "NETMASK=", 8)) { sscanf (buf, "%[^=]=%u.%u.%u.%u", temp, &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, netmask); netmaskglobal = 1; } if (!strncmp (buf, "IPADDR=\"", 8)) { sscanf (buf, "%[^=]=\"%u.%u.%u.%u\"", temp, &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, local); ipglobal = 1; } else if (!strncmp (buf, "IPADDR=", 7)) { sscanf (buf, "%[^=]=%u.%u.%u.%u", temp, &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, local); ipglobal = 1; } if (strstr (buf, ethdevname)) { *ok = 1; ethere = 1; } if (strstr (buf, "ifconfig")) { if (ethere) { /* PARSE the IFCONFIG line */ ipnext = 0; netmasknext = 0; tok = strtok (buf, " "); i = 1; do { if (ipnext) { if (*tok != '$') /* IPGLOBAL NOT USED */ { if (*tok == '\"') { sscanf (tok + 1, "%u.%u.%u.%u", &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, local); } else { sscanf (tok, "%u.%u.%u.%u", &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, local); } } ipnext = 0; } else if (netmasknext) { if (*tok != '$') /* NETMASK GLOBAL NOT USED */ { if (*tok == '\"') { sscanf (tok + 1, "%u.%u.%u.%u", &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, netmask); } else { sscanf (tok, "%u.%u.%u.%u", &hold[0], &hold[1], &hold[2], &hold[3]); convint2char (hold, netmask); } } netmasknext = 0; } else if (!strcmp (tok, ethdevname)) ipnext = 1; else if (!strcmp (tok, "netmask")) netmasknext = 1; /* printf("%d=%s$\n",i,tok); */ i++; } while ((tok = strtok (NULL, " ")) != NULL); } } } fclose (fp); return; } /* TEST PROGRAM FOR ROUTINE char ethdevname[]="eth0"; char configfile[]="/etc/rc.d/rc.inet1"; int main() { int ok; unsigned char mask[4]; unsigned char loc[4]; processinetrc(mask,loc,&ok); printf("NETMASK=%d.%d.%d.%d\n",mask[0],mask[1],mask[2],mask[3]); printf("IPADDR=%d.%d.%d.%d\n",loc[0],loc[1],loc[2],loc[3]); return; } */ netdiag-1.2/netwatch-1.3.1-2/release.sh000077500000000000000000000005051323731111400173540ustar00rootroot00000000000000#!/bin/bash VER=`cat version` make clean make tar ./configure sed "s/Src/Bin/g" gh.c > ttt /bin/rm gh.c mv ttt gh.c make cp ../Makefile.netwatch.bin Makefile sed "s/XXXX/$VER/g" Makefile > ttt /bin/rm Makefile mv ttt Makefile /bin/rm *.in conf* *.o *.c *.awk *.gen *.ports *.h Mak*common /bin/rm -r IANA make tar cp *.lsm .. netdiag-1.2/netwatch-1.3.1-2/semaphore.c000066400000000000000000000125721323731111400175330ustar00rootroot00000000000000 /****************************************************************************\ * * Written by * Tom Wagner (wagner@cs.umass.edu) * at the Distributed Problem Solving Lab * Department of Computer Science, University of Massachusetts, * Amherst, MA 01003 * * Copyright (c) 1995 UMASS CS Dept. All rights are reserved. * * Development of this code was partially supported by: * ONR grant N00014-92-J-1450 * NSF contract CDA-8922572 * * --------------------------------------------------------------------------- * * This code is free software; you can redistribute it and/or modify it. * However, this header must remain intact and unchanged. Additional * information may be appended after this header. Publications based on * this code must also include an appropriate reference. * * This code is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. * \****************************************************************************/ #include "semaphore.h" #include /* * function must be called prior to semaphore use. * */ void semaphore_init (Semaphore * s) { s->v = 1; if (pthread_mutex_init (&(s->mutex), NULL) == -1) do_error ("Error setting up semaphore mutex"); if (pthread_cond_init (&(s->cond), NULL) == -1) do_error ("Error setting up semaphore condition signal"); } /* * function should be called when there is no longer a need for * the semaphore. * */ void semaphore_destroy (Semaphore * s) { if (pthread_mutex_destroy (&(s->mutex)) == -1) do_error ("Error destroying semaphore mutex"); if (pthread_cond_destroy (&(s->cond)) == -1) do_error ("Error destroying semaphore condition signal"); } /* * function increments the semaphore and signals any threads that * are blocked waiting a change in the semaphore. * */ int semaphore_up (Semaphore * s) { int value_after_op; pthread_mutex_lock (&(s->mutex)); (s->v)++; value_after_op = s->v; pthread_mutex_unlock (&(s->mutex)); pthread_cond_signal (&(s->cond)); return (value_after_op); } /* * function decrements the semaphore and blocks if the semaphore is * <= 0 until another thread signals a change. * */ int semaphore_down (Semaphore * s) { int value_after_op; pthread_mutex_lock (&(s->mutex)); while (s->v <= 0) { pthread_cond_wait (&(s->cond), &(s->mutex)); } (s->v)--; value_after_op = s->v; pthread_mutex_unlock (&(s->mutex)); return (value_after_op); } /* * function does NOT block but simply decrements the semaphore. * should not be used instead of down -- only for programs where * multiple threads must up on a semaphore before another thread * can go down, i.e., allows programmer to set the semaphore to * a negative value prior to using it for synchronization. * */ int semaphore_decrement (Semaphore * s) { int value_after_op; pthread_mutex_lock (&(s->mutex)); s->v--; value_after_op = s->v; pthread_mutex_unlock (&(s->mutex)); return (value_after_op); } /* * function returns the value of the semaphore at the time the * critical section is accessed. obviously the value is not guarenteed * after the function unlocks the critical section. provided only * for casual debugging, a better approach is for the programmar to * protect one semaphore with another and then check its value. * an alternative is to simply record the value returned by semaphore_up * or semaphore_down. * */ int semaphore_value (Semaphore * s) { /* not for sync */ int value_after_op; pthread_mutex_lock (&(s->mutex)); value_after_op = s->v; pthread_mutex_unlock (&(s->mutex)); return (value_after_op); } /* -------------------------------------------------------------------- */ /* The following functions replace standard library functions in that */ /* they exit on any error returned from the system calls. Saves us */ /* from having to check each and every call above. */ /* -------------------------------------------------------------------- */ int tw_pthread_mutex_unlock (pthread_mutex_t * m) { int return_value; if ((return_value = pthread_mutex_unlock (m)) == -1) do_error ("pthread_mutex_unlock"); return (return_value); } int tw_pthread_mutex_lock (pthread_mutex_t * m) { int return_value; if ((return_value = pthread_mutex_lock (m)) == -1) do_error ("pthread_mutex_lock"); return (return_value); } int tw_pthread_cond_wait (pthread_cond_t * c, pthread_mutex_t * m) { int return_value; if ((return_value = pthread_cond_wait (c, m)) == -1) do_error ("pthread_cond_wait"); return (return_value); } int tw_pthread_cond_signal (pthread_cond_t * c) { int return_value; if ((return_value = pthread_cond_signal (c)) == -1) do_error ("pthread_cond_signal"); return (return_value); } /* * function just prints an error message and exits * */ void do_error (char *msg) { perror (msg); exit (1); } netdiag-1.2/netwatch-1.3.1-2/semaphore.h000066400000000000000000000044661323731111400175430ustar00rootroot00000000000000 /****************************************************************************\ * * Written by * Tom Wagner (wagner@cs.umass.edu) * at the Distributed Problem Solving Lab * Department of Computer Science, University of Massachusetts, * Amherst, MA 01003 * * Copyright (c) 1995 UMASS CS Dept. All rights are reserved. * * Development of this code was partially supported by: * ONR grant N00014-92-J-1450 * NSF contract CDA-8922572 * * --------------------------------------------------------------------------- * * This code is free software; you can redistribute it and/or modify it. * However, this header must remain intact and unchanged. Additional * information may be appended after this header. Publications based on * this code must also include an appropriate reference. * * This code is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. * \****************************************************************************/ #ifndef SEMAPHORES #define SEMAPHORES #include #include typedef struct Semaphore { int v; pthread_mutex_t mutex; pthread_cond_t cond; } Semaphore; #define CREATE_LOCK(x) pthread_mutex_t x #define INIT_LOCK(x) pthread_mutex_init(& x,NULL) #define EXT_CREATE_LOCK(x) extern pthread_mutex_t x #define LOCK(x) pthread_mutex_lock(& x) #define UNLOCK(x) pthread_mutex_unlock(& x) int semaphore_down (Semaphore * s); int semaphore_decrement (Semaphore * s); int semaphore_up (Semaphore * s); void semaphore_destroy (Semaphore * s); void semaphore_init (Semaphore * s); int semaphore_value (Semaphore * s); int tw_pthread_cond_signal (pthread_cond_t * c); int tw_pthread_cond_wait (pthread_cond_t * c, pthread_mutex_t * m); int tw_pthread_mutex_unlock (pthread_mutex_t * m); int tw_pthread_mutex_lock (pthread_mutex_t * m); void do_error (char *msg); #endif netdiag-1.2/netwatch-1.3.1-2/services.c000066400000000000000000001023171323731111400173700ustar00rootroot00000000000000 /* services.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: 15DEC95: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* This routine initializes the names for port numbers. */ /* These are from RFC 1700, "Assigned Numbers", which are from hither and yon. */ #include #include #include #include "netwatch.h" int hashport( int port, int hash) { return(port % hash); } void initicmp() { int i; for (i=0;i<=ICMPMAX;i++) icmp_types[i][0]=0; strcpy(icmp_types[ICMPMAX+1],"UNK-ICMP"); } void initlist(struct port_info *first[], int hash) { int i; for (i=0;iport!=port) current=current->link; if (current) { return(current->name); } else return(NULL); } void addtolist(struct port_info *first[], int port, char *name, int hash) { int spot; struct port_info *place; spot = hashport(port,hash); place = (struct port_info *)malloc( sizeof(*first[spot])); place->name = malloc(strlen(name)+1); strcpy(place->name,name); place->port = port; if (first[spot]) place->link = first[spot]; else place->link = NULL; first[spot] = place; } void services () { int temp_int; initlist(tcp_port_types,TCPHASH); initlist(udp_port_types,UDPHASH); initicmp(); #include "tcp.gen" #include "udp.gen" #include "icmp.gen" #if( defined(SN_MAX_IP_PORT) ) for (temp_int = 0; temp_int <= SN_MAX_IP_PORT; temp_int++) { /* Put port number as default label for all ports */ sprintf (ip_protocol_types[temp_int], "%d:", temp_int); } /* Put port number as default label for all ports */ strncpy (ip_protocol_types[1], "ICMP:", SN_PORT_TYPE_LEN); /* Internet Control Message [RFC792,JBP] */ strncpy (ip_protocol_types[2], "IGMP:", SN_PORT_TYPE_LEN); /* Internet Group Management [RFC1112,JBP] */ strncpy (ip_protocol_types[3], "GGP:", SN_PORT_TYPE_LEN); /* Gateway-to-Gateway [RFC823,MB] */ strncpy (ip_protocol_types[4], "IP:", SN_PORT_TYPE_LEN); /* IP in IP (encasulation) [JBP] */ strncpy (ip_protocol_types[5], "ST:", SN_PORT_TYPE_LEN); /* Stream [RFC1190,IEN119,JWF] */ strncpy (ip_protocol_types[6], "TCP:", SN_PORT_TYPE_LEN); /* Transmission Control [RFC793,JBP] */ strncpy (ip_protocol_types[7], "UCL:", SN_PORT_TYPE_LEN); /* UCL [PK] */ strncpy (ip_protocol_types[8], "EGP:", SN_PORT_TYPE_LEN); /* Exterior Gateway Protocol [RFC888,DLM1] */ strncpy (ip_protocol_types[9], "IGP:", SN_PORT_TYPE_LEN); /* any private interior gateway [JBP] */ strncpy (ip_protocol_types[10], "BBN-RCC-MON:", SN_PORT_TYPE_LEN); /* BBN RCC Monitoring [SGC] */ strncpy (ip_protocol_types[11], "NVP-II:", SN_PORT_TYPE_LEN); /* Network Voice Protocol [RFC741,SC3] */ strncpy (ip_protocol_types[12], "PUP:", SN_PORT_TYPE_LEN); /* PUP [PUP,XEROX] */ strncpy (ip_protocol_types[13], "ARGUS:", SN_PORT_TYPE_LEN); /* ARGUS [RWS4] */ strncpy (ip_protocol_types[14], "EMCON:", SN_PORT_TYPE_LEN); /* EMCON [BN7] */ strncpy (ip_protocol_types[15], "XNET:", SN_PORT_TYPE_LEN); /* Cross Net Debugger [IEN158,JFH2] */ strncpy (ip_protocol_types[16], "CHAOS:", SN_PORT_TYPE_LEN); /* Chaos [NC3] */ strncpy (ip_protocol_types[17], "UDP:", SN_PORT_TYPE_LEN); /* User Datagram [RFC768,JBP] */ strncpy (ip_protocol_types[18], "MUX:", SN_PORT_TYPE_LEN); /* Multiplexing [IEN90,JBP] */ strncpy (ip_protocol_types[19], "DCN-MEAS:", SN_PORT_TYPE_LEN); /* DCN Measurement Subsystems [DLM1] */ strncpy (ip_protocol_types[20], "HMP:", SN_PORT_TYPE_LEN); /* Host Monitoring [RFC869,RH6] */ strncpy (ip_protocol_types[21], "PRM:", SN_PORT_TYPE_LEN); /* Packet Radio Measurement [ZSU] */ strncpy (ip_protocol_types[22], "XNS-IDP:", SN_PORT_TYPE_LEN); /* XEROX NS IDP [ETHERNET,XEROX] */ strncpy (ip_protocol_types[23], "TRUNK-1:", SN_PORT_TYPE_LEN); /* Trunk-1 [BWB6] */ strncpy (ip_protocol_types[24], "TRUNK-2:", SN_PORT_TYPE_LEN); /* Trunk-2 [BWB6] */ strncpy (ip_protocol_types[25], "LEAF-1:", SN_PORT_TYPE_LEN); /* Leaf-1 [BWB6] */ strncpy (ip_protocol_types[26], "LEAF-2:", SN_PORT_TYPE_LEN); /* Leaf-2 [BWB6] */ strncpy (ip_protocol_types[27], "RDP:", SN_PORT_TYPE_LEN); /* Reliable Data Protocol [RFC908,RH6] */ strncpy (ip_protocol_types[28], "IRTP:", SN_PORT_TYPE_LEN); /* Internet Reliable Transaction [RFC938,TXM] */ strncpy (ip_protocol_types[29], "ISO-TP4:", SN_PORT_TYPE_LEN); /* ISO Transport Protocol Class 4 [RFC905,RC77] */ strncpy (ip_protocol_types[30], "NETBLT:", SN_PORT_TYPE_LEN); /* Bulk Data Transfer Protocol [RFC969,DDC1] */ strncpy (ip_protocol_types[31], "MFE-NSP:", SN_PORT_TYPE_LEN); /* MFE Network Services Protocol [MFENET,BCH2] */ strncpy (ip_protocol_types[32], "MERIT-INP:", SN_PORT_TYPE_LEN); /* MERIT Internodal Protocol [HWB] */ strncpy (ip_protocol_types[33], "SEP:", SN_PORT_TYPE_LEN); /* Sequential Exchange Protocol [JC120] */ strncpy (ip_protocol_types[34], "PC:", SN_PORT_TYPE_LEN); /* Third Party Connect Protocol [SAF3] */ strncpy (ip_protocol_types[35], "IDPR:", SN_PORT_TYPE_LEN); /* Inter-Domain Policy Routing Protocol [MXS1] */ strncpy (ip_protocol_types[36], "XTP:", SN_PORT_TYPE_LEN); /* XTP [GXC] */ strncpy (ip_protocol_types[37], "DDP:", SN_PORT_TYPE_LEN); /* Datagram Delivery Protocol [WXC] */ strncpy (ip_protocol_types[38], "IDPR-CMTP:", SN_PORT_TYPE_LEN); /* IDPR Control Message Transport Proto [MXS1] */ strncpy (ip_protocol_types[39], "TP++:", SN_PORT_TYPE_LEN); /* TP++ Transport Protocol [DXF] */ strncpy (ip_protocol_types[40], "IL:", SN_PORT_TYPE_LEN); /* IL Transport Protocol [DXP2] */ strncpy (ip_protocol_types[41], "SIP:", SN_PORT_TYPE_LEN); /* Simple Internet Protocol [SXD] */ strncpy (ip_protocol_types[42], "SDRP:", SN_PORT_TYPE_LEN); /* Source Demand Routing Protocol [DXE1] */ strncpy (ip_protocol_types[43], "SIP-SR:", SN_PORT_TYPE_LEN); /* SIP Source Route [SXD] */ strncpy (ip_protocol_types[44], "SIP-FRAG:", SN_PORT_TYPE_LEN); /* SIP Fragment [SXD] */ strncpy (ip_protocol_types[45], "IDRP:", SN_PORT_TYPE_LEN); /* Inter-Domain Routing Protocol [Sue Hares] */ strncpy (ip_protocol_types[46], "RSVP:", SN_PORT_TYPE_LEN); /* Reservation Protocol [Bob Braden] */ strncpy (ip_protocol_types[47], "GRE:", SN_PORT_TYPE_LEN); /* General Routing Encapsulation [Tony Li] */ strncpy (ip_protocol_types[48], "MHRP:", SN_PORT_TYPE_LEN); /* Mobile Host Routing Protocol[David Johnson] */ strncpy (ip_protocol_types[49], "BNA:", SN_PORT_TYPE_LEN); /* BNA [Gary Salamon] */ strncpy (ip_protocol_types[50], "SIPP-ESP:", SN_PORT_TYPE_LEN); /* SIPP Encap Security Payload [Steve Deering] */ strncpy (ip_protocol_types[51], "SIPP-AH:", SN_PORT_TYPE_LEN); /* SIPP Authentication Header [Steve Deering] */ strncpy (ip_protocol_types[52], "I-NLSP:", SN_PORT_TYPE_LEN); /* Integrated Net Layer Security TUBA [GLENN] */ strncpy (ip_protocol_types[53], "SWIPE:", SN_PORT_TYPE_LEN); /* IP with Encryption [JI6] */ strncpy (ip_protocol_types[54], "NHRP:", SN_PORT_TYPE_LEN); /* NBMA Next Hop Resolution Protocol */ strncpy (ip_protocol_types[61], "anyhost:", SN_PORT_TYPE_LEN); /* any host internal protocol [JBP] */ strncpy (ip_protocol_types[62], "CFTP:", SN_PORT_TYPE_LEN); /* CFTP [CFTP,HCF2] */ strncpy (ip_protocol_types[63], "anylan:", SN_PORT_TYPE_LEN); /* any local network [JBP] */ strncpy (ip_protocol_types[64], "SAT-EXPAK:", SN_PORT_TYPE_LEN); /* SATNET and Backroom EXPAK [SHB] */ strncpy (ip_protocol_types[65], "KRYPTOLAN:", SN_PORT_TYPE_LEN); /* Kryptolan [PXL1] */ strncpy (ip_protocol_types[66], "RVD:", SN_PORT_TYPE_LEN); /* MIT Remote Virtual Disk Protocol [MBG] */ strncpy (ip_protocol_types[67], "IPPC:", SN_PORT_TYPE_LEN); /* Internet Pluribus Packet Core [SHB] */ strncpy (ip_protocol_types[68], "dfs:", SN_PORT_TYPE_LEN); /* any distributed file system [JBP] */ strncpy (ip_protocol_types[69], "SAT-MON:", SN_PORT_TYPE_LEN); /* SATNET Monitoring [SHB] */ strncpy (ip_protocol_types[70], "VISA:", SN_PORT_TYPE_LEN); /* VISA Protocol [GXT1] */ strncpy (ip_protocol_types[71], "IPCV:", SN_PORT_TYPE_LEN); /* Internet Packet Core Utility [SHB] */ strncpy (ip_protocol_types[72], "CPNX:", SN_PORT_TYPE_LEN); /* Computer Protocol Network Executive [DXM2] */ strncpy (ip_protocol_types[73], "CPHB:", SN_PORT_TYPE_LEN); /* Computer Protocol Heart Beat [DXM2] */ strncpy (ip_protocol_types[74], "WSN:", SN_PORT_TYPE_LEN); /* Wang Span Network [VXD] */ strncpy (ip_protocol_types[75], "PVP:", SN_PORT_TYPE_LEN); /* Packet Video Protocol [SC3] */ strncpy (ip_protocol_types[76], "BR-SAT-MON:", SN_PORT_TYPE_LEN); /* Backroom SATNET Monitoring [SHB] */ strncpy (ip_protocol_types[77], "SUN-ND:", SN_PORT_TYPE_LEN); /* SUN ND PROTOCOL-Temporary [WM3] */ strncpy (ip_protocol_types[78], "WB-MON:", SN_PORT_TYPE_LEN); /* WIDEBAND Monitoring [SHB] */ strncpy (ip_protocol_types[79], "WB-EXPAK:", SN_PORT_TYPE_LEN); /* WIDEBAND EXPAK [SHB] */ strncpy (ip_protocol_types[80], "ISO-IP:", SN_PORT_TYPE_LEN); /* ISO Internet Protocol [MTR] */ strncpy (ip_protocol_types[81], "VMTP:", SN_PORT_TYPE_LEN); /* VMTP [DRC3] */ strncpy (ip_protocol_types[82], "SECURE-VMTP:", SN_PORT_TYPE_LEN); /* SECURE-VMTP [DRC3] */ strncpy (ip_protocol_types[83], "VINES:", SN_PORT_TYPE_LEN); /* VINES [BXH] */ strncpy (ip_protocol_types[84], "TTP:", SN_PORT_TYPE_LEN); /* TTP [JXS] */ strncpy (ip_protocol_types[85], "NSFNET-IGP:", SN_PORT_TYPE_LEN); /* NSFNET-IGP [HWB] */ strncpy (ip_protocol_types[86], "DGP:", SN_PORT_TYPE_LEN); /* Dissimilar Gateway Protocol [DGP,ML109] */ strncpy (ip_protocol_types[87], "TCF:", SN_PORT_TYPE_LEN); /* TCF [GAL5] */ strncpy (ip_protocol_types[88], "IGRP:", SN_PORT_TYPE_LEN); /* IGRP [CISCO,GXS] */ strncpy (ip_protocol_types[89], "OSPFIGP:", SN_PORT_TYPE_LEN); /* OSPFIGP [RFC1583,JTM4] */ strncpy (ip_protocol_types[90], "Sprite-RPC:", SN_PORT_TYPE_LEN); /* Sprite RPC Protocol [SPRITE,BXW] */ strncpy (ip_protocol_types[91], "LARP:", SN_PORT_TYPE_LEN); /* Locus Address Resolution Protocol [BXH] */ strncpy (ip_protocol_types[92], "MTP:", SN_PORT_TYPE_LEN); /* Multicast Transport Protocol [SXA] */ strncpy (ip_protocol_types[93], "AX.25:", SN_PORT_TYPE_LEN); /* AX.25 Frames [BK29] */ strncpy (ip_protocol_types[94], "IPIP:", SN_PORT_TYPE_LEN); /* IP-within-IP Encapsulation Protocol [JI6] */ strncpy (ip_protocol_types[95], "MICP:", SN_PORT_TYPE_LEN); /* Mobile Internetworking Control Pro. [JI6] */ strncpy (ip_protocol_types[96], "SCC-SP:", SN_PORT_TYPE_LEN); /* Semaphore Communications Sec. Pro. [HXH] */ strncpy (ip_protocol_types[97], "ETHERIP:", SN_PORT_TYPE_LEN); /* Ethernet-within-IP Encapsulation [RXH1] */ strncpy (ip_protocol_types[98], "ENCAP:", SN_PORT_TYPE_LEN); /* Encapsulation Header [RFC1241,RXB3] */ strncpy (ip_protocol_types[99], "encrypt:", SN_PORT_TYPE_LEN); /* any private encryption scheme [JBP] */ strncpy (ip_protocol_types[100], "GMTP:", SN_PORT_TYPE_LEN); /* GMTP [RXB5] */ #endif #if( defined(SN_MAX_SAP) ) #if( SN_MAX_SAP >= 256 ) for (temp_int = 0; temp_int < SN_MAX_SAP + 1; temp_int++) { /* Put number as default label for all */ sprintf (sap_port_types[temp_int], "0x%02X:", temp_int); } /* Put number as default label for all */ /* The SAP numbers came from someplace on the Web, called */ /* cisco-lsap-list.txt */ /* ieee-lsap-list.txt */ /* The low bit is a group address flag, and odd-numbered addresses */ /* have been added to allow clearer labeling of what's seen. */ /* IEEE - Administered LSAPs */ strncpy (sap_port_types[0x00], "Null:", SN_PORT_TYPE_LEN); /* Null LSAP */ strncpy (sap_port_types[0x01], "Null grp:", SN_PORT_TYPE_LEN); strncpy (sap_port_types[0x02], "LLC Mgt:", SN_PORT_TYPE_LEN); /* Individual LLC Sublayer Mgmt Function */ strncpy (sap_port_types[0x03], "LLCgMgt:", SN_PORT_TYPE_LEN); /* Group LLC Sublayer Mgmt Function */ strncpy (sap_port_types[0x06], "IP:", SN_PORT_TYPE_LEN); /* ARPANET Internet Protocol (IP) */ strncpy (sap_port_types[0x07], "IP grp:", SN_PORT_TYPE_LEN); /* ARPANET Internet Protocol (IP) */ strncpy (sap_port_types[0x0E], "PROWAY Mgt:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Network Mgmt & Initialization */ strncpy (sap_port_types[0x0F], "PROWAYgMgt:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Network Mgmt & Initialization */ strncpy (sap_port_types[0x42], "SpanTree:", SN_PORT_TYPE_LEN); /* IEEE 802.1 Bridge Spanning Tree Protocol */ strncpy (sap_port_types[0x43], "SpanT grp:", SN_PORT_TYPE_LEN); /* IEEE 802.1 Bridge Spanning Tree Protocol */ strncpy (sap_port_types[0x4E], "ManMsg:", SN_PORT_TYPE_LEN); /* EIA RS-511 Manufacturing Message Service */ strncpy (sap_port_types[0x4F], "ManMsg grp:", SN_PORT_TYPE_LEN); /* EIA RS-511 Manufacturing Message Service */ strncpy (sap_port_types[0x7E], "X.25:", SN_PORT_TYPE_LEN); /* ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) */ strncpy (sap_port_types[0x7F], "X.25 grp:", SN_PORT_TYPE_LEN); /* ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) */ strncpy (sap_port_types[0x8E], "POWAY Stn:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Active Station List Maintenance */ strncpy (sap_port_types[0x8F], "POWAYgStn:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Active Station List Maintenance */ strncpy (sap_port_types[0xAA], "SNAP:", SN_PORT_TYPE_LEN); /* Sub-Network Access Protocol (SNAP) */ strncpy (sap_port_types[0xAB], "SNAP grp:", SN_PORT_TYPE_LEN); /* Sub-Network Access Protocol (SNAP) */ strncpy (sap_port_types[0xFE], "ISO Net:", SN_PORT_TYPE_LEN); /* ISO Network Layer Protocol */ strncpy (sap_port_types[0xFF], "Global:", SN_PORT_TYPE_LEN); /* Global LSAP */ /* Manufacturer-Implemented LSAPs */ strncpy (sap_port_types[0x04], "SNA:", SN_PORT_TYPE_LEN); /* IBM SNA Path Control (individual) */ strncpy (sap_port_types[0x05], "SNA grp:", SN_PORT_TYPE_LEN); /* IBM SNA Path Control (group) */ strncpy (sap_port_types[0x18], "TI:", SN_PORT_TYPE_LEN); /* Texas Instruments */ strncpy (sap_port_types[0x19], "TI grp:", SN_PORT_TYPE_LEN); /* Texas Instruments */ strncpy (sap_port_types[0x80], "XNS:", SN_PORT_TYPE_LEN); /* Xerox Network Systems (XNS) */ strncpy (sap_port_types[0x81], "XNS grp:", SN_PORT_TYPE_LEN); /* Xerox Network Systems (XNS) */ strncpy (sap_port_types[0x86], "Nestar:", SN_PORT_TYPE_LEN); /* Nestar */ strncpy (sap_port_types[0x87], "Nestar grp:", SN_PORT_TYPE_LEN); /* Nestar */ strncpy (sap_port_types[0x98], "ARP:", SN_PORT_TYPE_LEN); /* ARPANET Address Resolution Protocol (ARP) */ strncpy (sap_port_types[0x99], "ARP grp:", SN_PORT_TYPE_LEN); /* ARPANET Address Resolution Protocol (ARP) */ strncpy (sap_port_types[0xBC], "VINES:", SN_PORT_TYPE_LEN); /* Banyan VINES */ strncpy (sap_port_types[0xBD], "VINES grp:", SN_PORT_TYPE_LEN); /* Banyan VINES */ strncpy (sap_port_types[0xE0], "NetWare:", SN_PORT_TYPE_LEN); /* Novell Netware */ strncpy (sap_port_types[0xE1], "NetW grp:", SN_PORT_TYPE_LEN); /* Novell Netware */ strncpy (sap_port_types[0xF0], "NetBIOS:", SN_PORT_TYPE_LEN); /* IBM NetBIOS */ strncpy (sap_port_types[0xF1], "NetB grp:", SN_PORT_TYPE_LEN); /* IBM NetBIOS */ strncpy (sap_port_types[0xF4], "LAN Mgt:", SN_PORT_TYPE_LEN); /* IBM LAN Management (individual) */ strncpy (sap_port_types[0xF5], "LANgMgt:", SN_PORT_TYPE_LEN); /* IBM LAN Management (group) */ strncpy (sap_port_types[0xF8], "RPL:", SN_PORT_TYPE_LEN); /* IBM Remote Program Load (RPL) */ strncpy (sap_port_types[0xF9], "RPL grp:", SN_PORT_TYPE_LEN); /* IBM Remote Program Load (RPL) */ strncpy (sap_port_types[0xFA], "UB:", SN_PORT_TYPE_LEN); /* Ungermann-Bass */ strncpy (sap_port_types[0xFB], "UB grp:", SN_PORT_TYPE_LEN); /* Ungermann-Bass */ /* further mysteries... */ strncpy (sap_port_types[0x0C], "xSNA:", SN_PORT_TYPE_LEN); /* SNA */ strncpy (sap_port_types[0x0D], "xSNA grp:", SN_PORT_TYPE_LEN); /* SNA */ strncpy (sap_port_types[0x10], "xNetWare:", SN_PORT_TYPE_LEN); /* Netware */ strncpy (sap_port_types[0x11], "xNetW grp:", SN_PORT_TYPE_LEN); /* Netware */ strncpy (sap_port_types[0xFC], "xRPL:", SN_PORT_TYPE_LEN); /* RPL */ strncpy (sap_port_types[0xFD], "xRPL grp:", SN_PORT_TYPE_LEN); /* RPL */ #endif #endif #if( defined(SN_MAX_PROTO_DESC) ) #if( SN_MAX_PROTO_DESC >= 200 ) for (temp_int = 0; temp_int < SN_MAX_PROTO_DESC + 1; temp_int++) { /* Put number as default label for all */ protocol_num[temp_int] = 0; sprintf (protocol_types[temp_int], "%d", temp_int); } /* Put number as default label for all */ protocol_num[0] = 0x0000; strncpy (protocol_types[0], "IEEE802.3", SN_PORT_TYPE_LEN); protocol_num[1] = 0x0101; strncpy (protocol_types[1], "Experimental", SN_PORT_TYPE_LEN); protocol_num[2] = 0x0200; strncpy (protocol_types[2], "XEROX PUP", SN_PORT_TYPE_LEN); protocol_num[3] = 0x0201; strncpy (protocol_types[3], "PUP Addr Trans", SN_PORT_TYPE_LEN); protocol_num[4] = 0x0400; strncpy (protocol_types[4], "Nixdorf", SN_PORT_TYPE_LEN); protocol_num[5] = 0x0600; strncpy (protocol_types[5], "XEROX NS IDP", SN_PORT_TYPE_LEN); protocol_num[6] = 0x0660; strncpy (protocol_types[6], "DLOG", SN_PORT_TYPE_LEN); protocol_num[7] = 0x0661; strncpy (protocol_types[7], "DLOG", SN_PORT_TYPE_LEN); protocol_num[8] = 0x0800; strncpy (protocol_types[8], "Ethernet", SN_PORT_TYPE_LEN); protocol_num[9] = 0x0801; strncpy (protocol_types[9], "X.75", SN_PORT_TYPE_LEN); protocol_num[10] = 0x0802; strncpy (protocol_types[10], "NBS", SN_PORT_TYPE_LEN); protocol_num[11] = 0x0803; strncpy (protocol_types[11], "ECMA", SN_PORT_TYPE_LEN); protocol_num[12] = 0x0804; strncpy (protocol_types[12], "Chaosnet", SN_PORT_TYPE_LEN); protocol_num[13] = 0x0805; strncpy (protocol_types[13], "X.25", SN_PORT_TYPE_LEN); protocol_num[14] = 0x0806; strncpy (protocol_types[14], "ARP", SN_PORT_TYPE_LEN); protocol_num[15] = 0x0807; strncpy (protocol_types[15], "XNS Compat", SN_PORT_TYPE_LEN); protocol_num[16] = 0x081C; strncpy (protocol_types[16], "Symbolics", SN_PORT_TYPE_LEN); protocol_num[17] = 0x0888; strncpy (protocol_types[17], "Xyplex", SN_PORT_TYPE_LEN); protocol_num[18] = 0x0900; strncpy (protocol_types[18], "UB netdebug", SN_PORT_TYPE_LEN); protocol_num[19] = 0x0A00; strncpy (protocol_types[19], "IEEE802.3 PUP", SN_PORT_TYPE_LEN); protocol_num[20] = 0x0A01; strncpy (protocol_types[20], "PUP Addr Trans", SN_PORT_TYPE_LEN); protocol_num[21] = 0x0BAD; strncpy (protocol_types[21], "VINES", SN_PORT_TYPE_LEN); protocol_num[22] = 0x1000; strncpy (protocol_types[22], "Berk Trailer neg", SN_PORT_TYPE_LEN); protocol_num[23] = 0x1001; strncpy (protocol_types[23], "Berk Trailer encap/IP", SN_PORT_TYPE_LEN); protocol_num[24] = 0x1600; strncpy (protocol_types[24], "Valid Sys", SN_PORT_TYPE_LEN); protocol_num[25] = 0x4242; strncpy (protocol_types[25], "PCS Basic Block Protocol", SN_PORT_TYPE_LEN); protocol_num[26] = 0x5208; strncpy (protocol_types[26], "BBN Simnet", SN_PORT_TYPE_LEN); protocol_num[27] = 0x6000; strncpy (protocol_types[27], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[28] = 0x6001; strncpy (protocol_types[28], "DEC MOP Dump/Load", SN_PORT_TYPE_LEN); protocol_num[29] = 0x6002; strncpy (protocol_types[29], "DEC MOP Remote Console", SN_PORT_TYPE_LEN); protocol_num[30] = 0x6003; strncpy (protocol_types[30], "DEC DECNET Phase IV Route", SN_PORT_TYPE_LEN); protocol_num[31] = 0x6004; strncpy (protocol_types[31], "DEC LAT", SN_PORT_TYPE_LEN); protocol_num[32] = 0x6005; strncpy (protocol_types[32], "DEC Diag", SN_PORT_TYPE_LEN); protocol_num[33] = 0x6006; strncpy (protocol_types[33], "DEC Customer", SN_PORT_TYPE_LEN); protocol_num[34] = 0x6007; strncpy (protocol_types[34], "DEC LAVC, SCA", SN_PORT_TYPE_LEN); protocol_num[35] = 0x6008; strncpy (protocol_types[35], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[36] = 0x6010; strncpy (protocol_types[36], "3Com", SN_PORT_TYPE_LEN); protocol_num[37] = 0x7000; strncpy (protocol_types[37], "UB downld", SN_PORT_TYPE_LEN); protocol_num[38] = 0x7002; strncpy (protocol_types[38], "UB dia/loop", SN_PORT_TYPE_LEN); protocol_num[39] = 0x7020; strncpy (protocol_types[39], "LRT", SN_PORT_TYPE_LEN); protocol_num[40] = 0x7030; strncpy (protocol_types[40], "Proteon", SN_PORT_TYPE_LEN); protocol_num[41] = 0x7034; strncpy (protocol_types[41], "Cabletron", SN_PORT_TYPE_LEN); protocol_num[42] = 0x8003; strncpy (protocol_types[42], "Cronus VLN", SN_PORT_TYPE_LEN); protocol_num[43] = 0x8004; strncpy (protocol_types[43], "Cronus Direct", SN_PORT_TYPE_LEN); protocol_num[44] = 0x8005; strncpy (protocol_types[44], "HP Probe", SN_PORT_TYPE_LEN); protocol_num[45] = 0x8006; strncpy (protocol_types[45], "Nestar", SN_PORT_TYPE_LEN); protocol_num[46] = 0x8008; strncpy (protocol_types[46], "AT&T", SN_PORT_TYPE_LEN); protocol_num[47] = 0x8010; strncpy (protocol_types[47], "Excelan", SN_PORT_TYPE_LEN); protocol_num[48] = 0x8013; strncpy (protocol_types[48], "SGI diagnostics", SN_PORT_TYPE_LEN); protocol_num[49] = 0x8014; strncpy (protocol_types[49], "SGI net games", SN_PORT_TYPE_LEN); protocol_num[50] = 0x8015; strncpy (protocol_types[50], "SGI reserved", SN_PORT_TYPE_LEN); protocol_num[51] = 0x8016; strncpy (protocol_types[51], "SGI bounce server", SN_PORT_TYPE_LEN); protocol_num[52] = 0x8019; strncpy (protocol_types[52], "Apollo", SN_PORT_TYPE_LEN); protocol_num[53] = 0x802E; strncpy (protocol_types[53], "Tymshare", SN_PORT_TYPE_LEN); protocol_num[54] = 0x802F; strncpy (protocol_types[54], "Tigan", SN_PORT_TYPE_LEN); protocol_num[55] = 0x8035; strncpy (protocol_types[55], "RARP", SN_PORT_TYPE_LEN); protocol_num[56] = 0x8036; strncpy (protocol_types[56], "Aeonic Systems", SN_PORT_TYPE_LEN); protocol_num[57] = 0x8038; strncpy (protocol_types[57], "DEC LANBridge", SN_PORT_TYPE_LEN); protocol_num[58] = 0x8039; strncpy (protocol_types[58], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[59] = 0x803D; strncpy (protocol_types[59], "DEC Encryption", SN_PORT_TYPE_LEN); protocol_num[60] = 0x803E; strncpy (protocol_types[60], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[61] = 0x803F; strncpy (protocol_types[61], "DEC LAN Monitor", SN_PORT_TYPE_LEN); protocol_num[62] = 0x8040; strncpy (protocol_types[62], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[63] = 0x8044; strncpy (protocol_types[63], "Planning Research", SN_PORT_TYPE_LEN); protocol_num[64] = 0x8046; strncpy (protocol_types[64], "AT&T", SN_PORT_TYPE_LEN); protocol_num[65] = 0x8047; strncpy (protocol_types[65], "AT&T", SN_PORT_TYPE_LEN); protocol_num[66] = 0x8049; strncpy (protocol_types[66], "ExperData", SN_PORT_TYPE_LEN); protocol_num[67] = 0x805B; strncpy (protocol_types[67], "Stanford V Kernel exp.", SN_PORT_TYPE_LEN); protocol_num[68] = 0x805C; strncpy (protocol_types[68], "Stanford V Kernel prod.", SN_PORT_TYPE_LEN); protocol_num[69] = 0x805D; strncpy (protocol_types[69], "Evans & Sutherland", SN_PORT_TYPE_LEN); protocol_num[70] = 0x8060; strncpy (protocol_types[70], "Little Machines", SN_PORT_TYPE_LEN); protocol_num[71] = 0x8062; strncpy (protocol_types[71], "Counterpoint", SN_PORT_TYPE_LEN); protocol_num[72] = 0x8065; strncpy (protocol_types[72], "Univ. of Mass. @ Amherst", SN_PORT_TYPE_LEN); protocol_num[73] = 0x8066; strncpy (protocol_types[73], "Univ. of Mass. @ Amherst", SN_PORT_TYPE_LEN); protocol_num[74] = 0x8067; strncpy (protocol_types[74], "Veeco Integrated Auto.", SN_PORT_TYPE_LEN); protocol_num[75] = 0x8068; strncpy (protocol_types[75], "General Dynamics", SN_PORT_TYPE_LEN); protocol_num[76] = 0x8069; strncpy (protocol_types[76], "AT&T", SN_PORT_TYPE_LEN); protocol_num[77] = 0x806A; strncpy (protocol_types[77], "Autophon", SN_PORT_TYPE_LEN); protocol_num[78] = 0x806C; strncpy (protocol_types[78], "ComDesign", SN_PORT_TYPE_LEN); protocol_num[79] = 0x806D; strncpy (protocol_types[79], "Computgraphic", SN_PORT_TYPE_LEN); protocol_num[80] = 0x806E; strncpy (protocol_types[80], "Landmark Graphics", SN_PORT_TYPE_LEN); protocol_num[81] = 0x807A; strncpy (protocol_types[81], "Matra", SN_PORT_TYPE_LEN); protocol_num[82] = 0x807B; strncpy (protocol_types[82], "Dansk Data Elektronik", SN_PORT_TYPE_LEN); protocol_num[83] = 0x807C; strncpy (protocol_types[83], "Merit Internodal", SN_PORT_TYPE_LEN); protocol_num[84] = 0x807D; strncpy (protocol_types[84], "Vitalink Communications", SN_PORT_TYPE_LEN); protocol_num[85] = 0x8080; strncpy (protocol_types[85], "Vitalink TransLAN III", SN_PORT_TYPE_LEN); protocol_num[86] = 0x8081; strncpy (protocol_types[86], "Counterpoint", SN_PORT_TYPE_LEN); protocol_num[87] = 0x809B; strncpy (protocol_types[87], "Appletalk", SN_PORT_TYPE_LEN); protocol_num[88] = 0x809C; strncpy (protocol_types[88], "Datability", SN_PORT_TYPE_LEN); protocol_num[89] = 0x809F; strncpy (protocol_types[89], "Spider Systems", SN_PORT_TYPE_LEN); protocol_num[90] = 0x80A3; strncpy (protocol_types[90], "Nixdorf2", SN_PORT_TYPE_LEN); protocol_num[91] = 0x80A4; strncpy (protocol_types[91], "Siemens Gammasonics", SN_PORT_TYPE_LEN); protocol_num[92] = 0x80C0; strncpy (protocol_types[92], "DCA Data Exchange Cluster", SN_PORT_TYPE_LEN); protocol_num[93] = 0x80C4; strncpy (protocol_types[93], "Banyan", SN_PORT_TYPE_LEN); protocol_num[94] = 0x80C5; strncpy (protocol_types[94], "Banyan", SN_PORT_TYPE_LEN); protocol_num[95] = 0x80C6; strncpy (protocol_types[95], "Pacer Software", SN_PORT_TYPE_LEN); protocol_num[96] = 0x80C7; strncpy (protocol_types[96], "Applitek", SN_PORT_TYPE_LEN); protocol_num[97] = 0x80C8; strncpy (protocol_types[97], "Intergraph", SN_PORT_TYPE_LEN); protocol_num[98] = 0x80CD; strncpy (protocol_types[98], "Harris", SN_PORT_TYPE_LEN); protocol_num[99] = 0x80CF; strncpy (protocol_types[99], "Taylor Instrument", SN_PORT_TYPE_LEN); protocol_num[100] = 0x80D3; strncpy (protocol_types[100], "Rosemount Corporation", SN_PORT_TYPE_LEN); protocol_num[101] = 0x80D5; strncpy (protocol_types[101], "SNA/Ether", SN_PORT_TYPE_LEN); protocol_num[102] = 0x80DD; strncpy (protocol_types[102], "Varian Associates", SN_PORT_TYPE_LEN); protocol_num[103] = 0x80DE; strncpy (protocol_types[103], "Integrated Solutions TRFS", SN_PORT_TYPE_LEN); protocol_num[104] = 0x80E0; strncpy (protocol_types[104], "Allen-Bradley", SN_PORT_TYPE_LEN); protocol_num[105] = 0x80E4; strncpy (protocol_types[105], "Datability", SN_PORT_TYPE_LEN); protocol_num[106] = 0x80F2; strncpy (protocol_types[106], "Retix", SN_PORT_TYPE_LEN); protocol_num[107] = 0x80F3; strncpy (protocol_types[107], "AppleTalk AARP (Kinetics)", SN_PORT_TYPE_LEN); protocol_num[108] = 0x80F4; strncpy (protocol_types[108], "Kinetics", SN_PORT_TYPE_LEN); protocol_num[109] = 0x80F7; strncpy (protocol_types[109], "Apollo", SN_PORT_TYPE_LEN); protocol_num[110] = 0x80FF; strncpy (protocol_types[110], "Wellfleet", SN_PORT_TYPE_LEN); protocol_num[111] = 0x8107; strncpy (protocol_types[111], "Symbolics Private", SN_PORT_TYPE_LEN); protocol_num[112] = 0x8130; strncpy (protocol_types[112], "Hayes", SN_PORT_TYPE_LEN); protocol_num[113] = 0x8131; strncpy (protocol_types[113], "VG Laboratory Systems", SN_PORT_TYPE_LEN); protocol_num[114] = 0x8132; strncpy (protocol_types[114], "Bridge Communications", SN_PORT_TYPE_LEN); protocol_num[115] = 0x8137; strncpy (protocol_types[115], "Novell", SN_PORT_TYPE_LEN); protocol_num[116] = 0x8139; strncpy (protocol_types[116], "KTI", SN_PORT_TYPE_LEN); protocol_num[117] = 0x8148; strncpy (protocol_types[117], "Logicraft", SN_PORT_TYPE_LEN); protocol_num[118] = 0x8149; strncpy (protocol_types[118], "NCD", SN_PORT_TYPE_LEN); protocol_num[119] = 0x814A; strncpy (protocol_types[119], "Alpha Micro", SN_PORT_TYPE_LEN); protocol_num[120] = 0x814C; strncpy (protocol_types[120], "SNMP", SN_PORT_TYPE_LEN); protocol_num[121] = 0x814D; strncpy (protocol_types[121], "BIIN", SN_PORT_TYPE_LEN); protocol_num[122] = 0x814E; strncpy (protocol_types[122], "BIIN", SN_PORT_TYPE_LEN); protocol_num[123] = 0x814F; strncpy (protocol_types[123], "Technically Elite Concept", SN_PORT_TYPE_LEN); protocol_num[124] = 0x8150; strncpy (protocol_types[124], "Rational", SN_PORT_TYPE_LEN); protocol_num[125] = 0x8151; strncpy (protocol_types[125], "Qualcomm", SN_PORT_TYPE_LEN); protocol_num[126] = 0x815C; strncpy (protocol_types[126], "Computer Protocol Pty", SN_PORT_TYPE_LEN); protocol_num[127] = 0x8164; strncpy (protocol_types[127], "Charles River", SN_PORT_TYPE_LEN); protocol_num[128] = 0x817D; strncpy (protocol_types[128], "Protocol Engines", SN_PORT_TYPE_LEN); protocol_num[129] = 0x818D; strncpy (protocol_types[129], "Motorola", SN_PORT_TYPE_LEN); protocol_num[130] = 0x819A; strncpy (protocol_types[130], "Qualcomm", SN_PORT_TYPE_LEN); protocol_num[131] = 0x81A4; strncpy (protocol_types[131], "ARAI Bunkichi", SN_PORT_TYPE_LEN); protocol_num[132] = 0x81A5; strncpy (protocol_types[132], "RAD Network Devices", SN_PORT_TYPE_LEN); protocol_num[133] = 0x81B7; strncpy (protocol_types[133], "Xyplex", SN_PORT_TYPE_LEN); protocol_num[134] = 0x81CC; strncpy (protocol_types[134], "Apricot", SN_PORT_TYPE_LEN); protocol_num[135] = 0x81D6; strncpy (protocol_types[135], "Artisoft", SN_PORT_TYPE_LEN); protocol_num[136] = 0x81E6; strncpy (protocol_types[136], "Polygon", SN_PORT_TYPE_LEN); protocol_num[137] = 0x81F0; strncpy (protocol_types[137], "Comsat Labs", SN_PORT_TYPE_LEN); protocol_num[138] = 0x81F3; strncpy (protocol_types[138], "SAIC", SN_PORT_TYPE_LEN); protocol_num[139] = 0x81F6; strncpy (protocol_types[139], "VG Analytical", SN_PORT_TYPE_LEN); protocol_num[140] = 0x8203; strncpy (protocol_types[140], "Quantum Software", SN_PORT_TYPE_LEN); protocol_num[141] = 0x8221; strncpy (protocol_types[141], "Ascom Banking", SN_PORT_TYPE_LEN); protocol_num[142] = 0x823E; strncpy (protocol_types[142], "AdvEncrypSys", SN_PORT_TYPE_LEN); protocol_num[143] = 0x827F; strncpy (protocol_types[143], "Athena Programming", SN_PORT_TYPE_LEN); protocol_num[144] = 0x8263; strncpy (protocol_types[144], "Charles River Data System", SN_PORT_TYPE_LEN); protocol_num[145] = 0x829A; strncpy (protocol_types[145], "Inst Ind Info Tech", SN_PORT_TYPE_LEN); protocol_num[146] = 0x829C; strncpy (protocol_types[146], "Taurus Controls", SN_PORT_TYPE_LEN); protocol_num[147] = 0x82AC; strncpy (protocol_types[147], "Walker Richer & Quinn", SN_PORT_TYPE_LEN); protocol_num[148] = 0x8694; strncpy (protocol_types[148], "Idea Courier", SN_PORT_TYPE_LEN); protocol_num[149] = 0x869E; strncpy (protocol_types[149], "Computer Network Tech", SN_PORT_TYPE_LEN); protocol_num[150] = 0x86A3; strncpy (protocol_types[150], "Gateway Comm", SN_PORT_TYPE_LEN); protocol_num[151] = 0x86DB; strncpy (protocol_types[151], "SECTRA", SN_PORT_TYPE_LEN); protocol_num[152] = 0x86DE; strncpy (protocol_types[152], "Delta Controls", SN_PORT_TYPE_LEN); protocol_num[153] = 0x86DF; strncpy (protocol_types[153], "ATOMIC", SN_PORT_TYPE_LEN); protocol_num[154] = 0x86E0; strncpy (protocol_types[154], "Landis & Gyr Powers", SN_PORT_TYPE_LEN); protocol_num[155] = 0x8700; strncpy (protocol_types[155], "Motorola", SN_PORT_TYPE_LEN); protocol_num[156] = 0x8A96; strncpy (protocol_types[156], "Invisible Software", SN_PORT_TYPE_LEN); protocol_num[157] = 0x9000; strncpy (protocol_types[157], "Loopback", SN_PORT_TYPE_LEN); protocol_num[158] = 0x9001; strncpy (protocol_types[158], "3Com(Bridge) XNS Sys Mgmt", SN_PORT_TYPE_LEN); protocol_num[159] = 0x9002; strncpy (protocol_types[159], "3Com(Bridge) TCP-IP Sys", SN_PORT_TYPE_LEN); protocol_num[160] = 0x9003; strncpy (protocol_types[160], "3Com(Bridge) loop detect", SN_PORT_TYPE_LEN); protocol_num[161] = 0xFF00; strncpy (protocol_types[161], "BBN VITAL-LanBridge cache", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_IEEE802_3] = SN_PROT_IEEE802_3; strncpy (protocol_types[SN_PROT_IEEE802_3], "IEEE802.3", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_SLIP] = SN_PROT_SLIP; strncpy (protocol_types[SN_PROT_SLIP], "SLIP", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_PPP] = SN_PROT_PPP; strncpy (protocol_types[SN_PROT_PPP], "PPP", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_LOOP] = SN_PROT_LOOP; strncpy (protocol_types[SN_PROT_LOOP], "Loop int", SN_PORT_TYPE_LEN); #endif #endif } netdiag-1.2/netwatch-1.3.1-2/tcp.gen000066400000000000000000005135211323731111400166650ustar00rootroot00000000000000addtolist(tcp_port_types,0,"0-reserved",TCPHASH); addtolist(tcp_port_types,1,"tcpmux",TCPHASH); addtolist(tcp_port_types,2,"compressnet",TCPHASH); addtolist(tcp_port_types,3,"compressnet",TCPHASH); addtolist(tcp_port_types,5,"rje",TCPHASH); addtolist(tcp_port_types,7,"echo",TCPHASH); addtolist(tcp_port_types,9,"discard",TCPHASH); addtolist(tcp_port_types,11,"systat",TCPHASH); addtolist(tcp_port_types,13,"daytime",TCPHASH); addtolist(tcp_port_types,17,"qotd",TCPHASH); addtolist(tcp_port_types,18,"msp",TCPHASH); addtolist(tcp_port_types,19,"chargen",TCPHASH); addtolist(tcp_port_types,20,"ftp-data",TCPHASH); addtolist(tcp_port_types,21,"ftp",TCPHASH); addtolist(tcp_port_types,22,"ssh",TCPHASH); addtolist(tcp_port_types,23,"telnet",TCPHASH); addtolist(tcp_port_types,24,"priv-mail-system",TCPHASH); addtolist(tcp_port_types,25,"smtp",TCPHASH); addtolist(tcp_port_types,27,"nsw-fe",TCPHASH); addtolist(tcp_port_types,29,"msg-icp",TCPHASH); addtolist(tcp_port_types,31,"msg-auth",TCPHASH); addtolist(tcp_port_types,33,"dsp",TCPHASH); addtolist(tcp_port_types,35,"priv-printer-server",TCPHASH); addtolist(tcp_port_types,37,"time",TCPHASH); addtolist(tcp_port_types,38,"rap",TCPHASH); addtolist(tcp_port_types,39,"rlp",TCPHASH); addtolist(tcp_port_types,41,"graphics",TCPHASH); addtolist(tcp_port_types,42,"name",TCPHASH); addtolist(tcp_port_types,42,"nameserver",TCPHASH); addtolist(tcp_port_types,43,"nicname",TCPHASH); addtolist(tcp_port_types,44,"mpm-flags",TCPHASH); addtolist(tcp_port_types,45,"mpm",TCPHASH); addtolist(tcp_port_types,46,"mpm-snd",TCPHASH); addtolist(tcp_port_types,47,"ni-ftp",TCPHASH); addtolist(tcp_port_types,48,"auditd",TCPHASH); addtolist(tcp_port_types,49,"tacacs",TCPHASH); addtolist(tcp_port_types,50,"re-mail-ck",TCPHASH); addtolist(tcp_port_types,51,"la-maint",TCPHASH); addtolist(tcp_port_types,52,"xns-time",TCPHASH); addtolist(tcp_port_types,53,"domain",TCPHASH); addtolist(tcp_port_types,54,"xns-ch",TCPHASH); addtolist(tcp_port_types,55,"isi-gl",TCPHASH); addtolist(tcp_port_types,56,"xns-auth",TCPHASH); addtolist(tcp_port_types,57,"priv-terminal-access",TCPHASH); addtolist(tcp_port_types,58,"xns-mail",TCPHASH); addtolist(tcp_port_types,59,"priv-file-service",TCPHASH); addtolist(tcp_port_types,60,"60-reserved",TCPHASH); addtolist(tcp_port_types,61,"ni-mail",TCPHASH); addtolist(tcp_port_types,62,"acas",TCPHASH); addtolist(tcp_port_types,63,"whois++",TCPHASH); addtolist(tcp_port_types,64,"covia",TCPHASH); addtolist(tcp_port_types,65,"tacacs-ds",TCPHASH); addtolist(tcp_port_types,66,"sql*net",TCPHASH); addtolist(tcp_port_types,67,"bootps",TCPHASH); addtolist(tcp_port_types,68,"bootpc",TCPHASH); addtolist(tcp_port_types,69,"tftp",TCPHASH); addtolist(tcp_port_types,70,"gopher",TCPHASH); addtolist(tcp_port_types,71,"netrjs-1",TCPHASH); addtolist(tcp_port_types,72,"netrjs-2",TCPHASH); addtolist(tcp_port_types,73,"netrjs-3",TCPHASH); addtolist(tcp_port_types,74,"netrjs-4",TCPHASH); addtolist(tcp_port_types,75,"priv-dial-out-service",TCPHASH); addtolist(tcp_port_types,76,"deos",TCPHASH); addtolist(tcp_port_types,77,"priv-RJE-service",TCPHASH); addtolist(tcp_port_types,78,"vettcp",TCPHASH); addtolist(tcp_port_types,79,"finger",TCPHASH); addtolist(tcp_port_types,80,"http",TCPHASH); addtolist(tcp_port_types,80,"www",TCPHASH); addtolist(tcp_port_types,80,"www-http",TCPHASH); addtolist(tcp_port_types,81,"hosts2-ns",TCPHASH); addtolist(tcp_port_types,82,"xfer",TCPHASH); addtolist(tcp_port_types,83,"mit-ml-dev",TCPHASH); addtolist(tcp_port_types,84,"ctf",TCPHASH); addtolist(tcp_port_types,85,"mit-ml-dev",TCPHASH); addtolist(tcp_port_types,86,"mfcobol",TCPHASH); addtolist(tcp_port_types,87,"priv-terminal-link",TCPHASH); addtolist(tcp_port_types,88,"kerberos",TCPHASH); addtolist(tcp_port_types,89,"su-mit-tg",TCPHASH); addtolist(tcp_port_types,90,"dnsix",TCPHASH); addtolist(tcp_port_types,91,"mit-dov",TCPHASH); addtolist(tcp_port_types,92,"npp",TCPHASH); addtolist(tcp_port_types,93,"dcp",TCPHASH); addtolist(tcp_port_types,94,"objcall",TCPHASH); addtolist(tcp_port_types,95,"supdup",TCPHASH); addtolist(tcp_port_types,96,"dixie",TCPHASH); addtolist(tcp_port_types,97,"swift-rvf",TCPHASH); addtolist(tcp_port_types,98,"tacnews",TCPHASH); addtolist(tcp_port_types,99,"metagram",TCPHASH); addtolist(tcp_port_types,100,"newacct",TCPHASH); addtolist(tcp_port_types,101,"hostname",TCPHASH); addtolist(tcp_port_types,102,"iso-tsap",TCPHASH); addtolist(tcp_port_types,103,"gppitnp",TCPHASH); addtolist(tcp_port_types,104,"acr-nema",TCPHASH); addtolist(tcp_port_types,105,"cso",TCPHASH); addtolist(tcp_port_types,105,"csnet-ns",TCPHASH); addtolist(tcp_port_types,106,"3com-tsmux",TCPHASH); addtolist(tcp_port_types,107,"rtelnet",TCPHASH); addtolist(tcp_port_types,108,"snagas",TCPHASH); addtolist(tcp_port_types,109,"pop2",TCPHASH); addtolist(tcp_port_types,110,"pop3",TCPHASH); addtolist(tcp_port_types,111,"sunrpc",TCPHASH); addtolist(tcp_port_types,112,"mcidas",TCPHASH); addtolist(tcp_port_types,113,"ident",TCPHASH); addtolist(tcp_port_types,113,"auth",TCPHASH); addtolist(tcp_port_types,114,"audionews",TCPHASH); addtolist(tcp_port_types,115,"sftp",TCPHASH); addtolist(tcp_port_types,116,"ansanotify",TCPHASH); addtolist(tcp_port_types,117,"uucp-path",TCPHASH); addtolist(tcp_port_types,118,"sqlserv",TCPHASH); addtolist(tcp_port_types,119,"nntp",TCPHASH); addtolist(tcp_port_types,120,"cfdptkt",TCPHASH); addtolist(tcp_port_types,121,"erpc",TCPHASH); addtolist(tcp_port_types,122,"smakynet",TCPHASH); addtolist(tcp_port_types,123,"ntp",TCPHASH); addtolist(tcp_port_types,124,"ansatrader",TCPHASH); addtolist(tcp_port_types,125,"locus-map",TCPHASH); addtolist(tcp_port_types,126,"nxedit",TCPHASH); addtolist(tcp_port_types,126,"#unitary",TCPHASH); addtolist(tcp_port_types,127,"locus-con",TCPHASH); addtolist(tcp_port_types,128,"gss-xlicen",TCPHASH); addtolist(tcp_port_types,129,"pwdgen",TCPHASH); addtolist(tcp_port_types,130,"cisco-fna",TCPHASH); addtolist(tcp_port_types,131,"cisco-tna",TCPHASH); addtolist(tcp_port_types,132,"cisco-sys",TCPHASH); addtolist(tcp_port_types,133,"statsrv",TCPHASH); addtolist(tcp_port_types,134,"ingres-net",TCPHASH); addtolist(tcp_port_types,135,"epmap",TCPHASH); addtolist(tcp_port_types,136,"profile",TCPHASH); addtolist(tcp_port_types,137,"netbios-ns",TCPHASH); addtolist(tcp_port_types,138,"netbios-dgm",TCPHASH); addtolist(tcp_port_types,139,"netbios-ssn",TCPHASH); addtolist(tcp_port_types,140,"emfis-data",TCPHASH); addtolist(tcp_port_types,141,"emfis-cntl",TCPHASH); addtolist(tcp_port_types,142,"bl-idm",TCPHASH); addtolist(tcp_port_types,143,"imap",TCPHASH); addtolist(tcp_port_types,144,"uma",TCPHASH); addtolist(tcp_port_types,145,"uaac",TCPHASH); addtolist(tcp_port_types,146,"iso-tp0",TCPHASH); addtolist(tcp_port_types,147,"iso-ip",TCPHASH); addtolist(tcp_port_types,148,"jargon",TCPHASH); addtolist(tcp_port_types,149,"aed-512",TCPHASH); addtolist(tcp_port_types,150,"sql-net",TCPHASH); addtolist(tcp_port_types,151,"hems",TCPHASH); addtolist(tcp_port_types,152,"bftp",TCPHASH); addtolist(tcp_port_types,153,"sgmp",TCPHASH); addtolist(tcp_port_types,154,"netsc-prod",TCPHASH); addtolist(tcp_port_types,155,"netsc-dev",TCPHASH); addtolist(tcp_port_types,156,"sqlsrv",TCPHASH); addtolist(tcp_port_types,157,"knet-cmp",TCPHASH); addtolist(tcp_port_types,158,"pcmail-srv",TCPHASH); addtolist(tcp_port_types,159,"nss-routing",TCPHASH); addtolist(tcp_port_types,160,"sgmp-traps",TCPHASH); addtolist(tcp_port_types,161,"snmp",TCPHASH); addtolist(tcp_port_types,162,"snmptrap",TCPHASH); addtolist(tcp_port_types,163,"cmip-man",TCPHASH); addtolist(tcp_port_types,164,"cmip-agent",TCPHASH); addtolist(tcp_port_types,165,"xns-courier",TCPHASH); addtolist(tcp_port_types,166,"s-net",TCPHASH); addtolist(tcp_port_types,167,"namp",TCPHASH); addtolist(tcp_port_types,168,"rsvd",TCPHASH); addtolist(tcp_port_types,169,"send",TCPHASH); addtolist(tcp_port_types,170,"print-srv",TCPHASH); addtolist(tcp_port_types,171,"multiplex",TCPHASH); addtolist(tcp_port_types,172,"cl/1",TCPHASH); addtolist(tcp_port_types,173,"xyplex-mux",TCPHASH); addtolist(tcp_port_types,174,"mailq",TCPHASH); addtolist(tcp_port_types,175,"vmnet",TCPHASH); addtolist(tcp_port_types,176,"genrad-mux",TCPHASH); addtolist(tcp_port_types,177,"xdmcp",TCPHASH); addtolist(tcp_port_types,178,"nextstep",TCPHASH); addtolist(tcp_port_types,179,"bgp",TCPHASH); addtolist(tcp_port_types,180,"ris",TCPHASH); addtolist(tcp_port_types,181,"unify",TCPHASH); addtolist(tcp_port_types,182,"audit",TCPHASH); addtolist(tcp_port_types,183,"ocbinder",TCPHASH); addtolist(tcp_port_types,184,"ocserver",TCPHASH); addtolist(tcp_port_types,185,"remote-kis",TCPHASH); addtolist(tcp_port_types,186,"kis",TCPHASH); addtolist(tcp_port_types,187,"aci",TCPHASH); addtolist(tcp_port_types,188,"mumps",TCPHASH); addtolist(tcp_port_types,189,"qft",TCPHASH); addtolist(tcp_port_types,190,"gacp",TCPHASH); addtolist(tcp_port_types,191,"prospero",TCPHASH); addtolist(tcp_port_types,192,"osu-nms",TCPHASH); addtolist(tcp_port_types,193,"srmp",TCPHASH); addtolist(tcp_port_types,194,"irc",TCPHASH); addtolist(tcp_port_types,195,"dn6-nlm-aud",TCPHASH); addtolist(tcp_port_types,196,"dn6-smm-red",TCPHASH); addtolist(tcp_port_types,197,"dls",TCPHASH); addtolist(tcp_port_types,198,"dls-mon",TCPHASH); addtolist(tcp_port_types,199,"smux",TCPHASH); addtolist(tcp_port_types,200,"src",TCPHASH); addtolist(tcp_port_types,201,"at-rtmp",TCPHASH); addtolist(tcp_port_types,202,"at-nbp",TCPHASH); addtolist(tcp_port_types,203,"at-3",TCPHASH); addtolist(tcp_port_types,204,"at-echo",TCPHASH); addtolist(tcp_port_types,205,"at-5",TCPHASH); addtolist(tcp_port_types,206,"at-zis",TCPHASH); addtolist(tcp_port_types,207,"at-7",TCPHASH); addtolist(tcp_port_types,208,"at-8",TCPHASH); addtolist(tcp_port_types,209,"qmtp",TCPHASH); addtolist(tcp_port_types,210,"z39.50",TCPHASH); addtolist(tcp_port_types,211,"914c/g",TCPHASH); addtolist(tcp_port_types,212,"anet",TCPHASH); addtolist(tcp_port_types,213,"ipx",TCPHASH); addtolist(tcp_port_types,214,"vmpwscs",TCPHASH); addtolist(tcp_port_types,215,"softpc",TCPHASH); addtolist(tcp_port_types,216,"CAIlic",TCPHASH); addtolist(tcp_port_types,217,"dbase",TCPHASH); addtolist(tcp_port_types,218,"mpp",TCPHASH); addtolist(tcp_port_types,219,"uarps",TCPHASH); addtolist(tcp_port_types,220,"imap3",TCPHASH); addtolist(tcp_port_types,221,"fln-spx",TCPHASH); addtolist(tcp_port_types,222,"rsh-spx",TCPHASH); addtolist(tcp_port_types,223,"cdc",TCPHASH); addtolist(tcp_port_types,224,"masqdialer",TCPHASH); addtolist(tcp_port_types,242,"direct",TCPHASH); addtolist(tcp_port_types,243,"sur-meas",TCPHASH); addtolist(tcp_port_types,244,"inbusiness",TCPHASH); addtolist(tcp_port_types,245,"link",TCPHASH); addtolist(tcp_port_types,246,"dsp3270",TCPHASH); addtolist(tcp_port_types,247,"subntbcst_tftp",TCPHASH); addtolist(tcp_port_types,248,"bhfhs",TCPHASH); addtolist(tcp_port_types,256,"rap",TCPHASH); addtolist(tcp_port_types,257,"set",TCPHASH); addtolist(tcp_port_types,258,"yak-chat",TCPHASH); addtolist(tcp_port_types,259,"esro-gen",TCPHASH); addtolist(tcp_port_types,260,"openport",TCPHASH); addtolist(tcp_port_types,261,"nsiiops",TCPHASH); addtolist(tcp_port_types,262,"arcisdms",TCPHASH); addtolist(tcp_port_types,263,"hdap",TCPHASH); addtolist(tcp_port_types,264,"bgmp",TCPHASH); addtolist(tcp_port_types,265,"x-bone-ctl",TCPHASH); addtolist(tcp_port_types,266,"sst",TCPHASH); addtolist(tcp_port_types,267,"td-service",TCPHASH); addtolist(tcp_port_types,268,"td-replica",TCPHASH); addtolist(tcp_port_types,280,"http-mgmt",TCPHASH); addtolist(tcp_port_types,281,"personal-link",TCPHASH); addtolist(tcp_port_types,282,"cableport-ax",TCPHASH); addtolist(tcp_port_types,283,"rescap",TCPHASH); addtolist(tcp_port_types,284,"corerjd",TCPHASH); addtolist(tcp_port_types,286,"fxp-1",TCPHASH); addtolist(tcp_port_types,287,"k-block",TCPHASH); addtolist(tcp_port_types,308,"novastorbakcup",TCPHASH); addtolist(tcp_port_types,309,"entrusttime",TCPHASH); addtolist(tcp_port_types,310,"bhmds",TCPHASH); addtolist(tcp_port_types,311,"asip-webadmin",TCPHASH); addtolist(tcp_port_types,312,"vslmp",TCPHASH); addtolist(tcp_port_types,313,"magenta-logic",TCPHASH); addtolist(tcp_port_types,314,"opalis-robot",TCPHASH); addtolist(tcp_port_types,315,"dpsi",TCPHASH); addtolist(tcp_port_types,316,"decauth",TCPHASH); addtolist(tcp_port_types,317,"zannet",TCPHASH); addtolist(tcp_port_types,318,"pkix-timestamp",TCPHASH); addtolist(tcp_port_types,319,"ptp-event",TCPHASH); addtolist(tcp_port_types,320,"ptp-general",TCPHASH); addtolist(tcp_port_types,321,"pip",TCPHASH); addtolist(tcp_port_types,322,"rtsps",TCPHASH); addtolist(tcp_port_types,333,"texar",TCPHASH); addtolist(tcp_port_types,344,"pdap",TCPHASH); addtolist(tcp_port_types,345,"pawserv",TCPHASH); addtolist(tcp_port_types,346,"zserv",TCPHASH); addtolist(tcp_port_types,347,"fatserv",TCPHASH); addtolist(tcp_port_types,348,"csi-sgwp",TCPHASH); addtolist(tcp_port_types,349,"mftp",TCPHASH); addtolist(tcp_port_types,350,"matip-type-a",TCPHASH); addtolist(tcp_port_types,351,"matip-type-b",TCPHASH); addtolist(tcp_port_types,351,"bhoetty",TCPHASH); addtolist(tcp_port_types,352,"dtag-ste-sb",TCPHASH); addtolist(tcp_port_types,352,"bhoedap4",TCPHASH); addtolist(tcp_port_types,353,"ndsauth",TCPHASH); addtolist(tcp_port_types,354,"bh611",TCPHASH); addtolist(tcp_port_types,355,"datex-asn",TCPHASH); addtolist(tcp_port_types,356,"cloanto-net-1",TCPHASH); addtolist(tcp_port_types,357,"bhevent",TCPHASH); addtolist(tcp_port_types,358,"shrinkwrap",TCPHASH); addtolist(tcp_port_types,359,"tenebris_nts",TCPHASH); addtolist(tcp_port_types,360,"scoi2odialog",TCPHASH); addtolist(tcp_port_types,361,"semantix",TCPHASH); addtolist(tcp_port_types,362,"srssend",TCPHASH); addtolist(tcp_port_types,363,"rsvp_tunnel",TCPHASH); addtolist(tcp_port_types,364,"aurora-cmgr",TCPHASH); addtolist(tcp_port_types,365,"dtk",TCPHASH); addtolist(tcp_port_types,366,"odmr",TCPHASH); addtolist(tcp_port_types,367,"mortgageware",TCPHASH); addtolist(tcp_port_types,368,"qbikgdp",TCPHASH); addtolist(tcp_port_types,369,"rpc2portmap",TCPHASH); addtolist(tcp_port_types,370,"codaauth2",TCPHASH); addtolist(tcp_port_types,371,"clearcase",TCPHASH); addtolist(tcp_port_types,372,"ulistproc",TCPHASH); addtolist(tcp_port_types,373,"legent-1",TCPHASH); addtolist(tcp_port_types,374,"legent-2",TCPHASH); addtolist(tcp_port_types,375,"hassle",TCPHASH); addtolist(tcp_port_types,376,"nip",TCPHASH); addtolist(tcp_port_types,377,"tnETOS",TCPHASH); addtolist(tcp_port_types,378,"dsETOS",TCPHASH); addtolist(tcp_port_types,379,"is99c",TCPHASH); addtolist(tcp_port_types,380,"is99s",TCPHASH); addtolist(tcp_port_types,381,"hp-collector",TCPHASH); addtolist(tcp_port_types,382,"hp-managed-node",TCPHASH); addtolist(tcp_port_types,383,"hp-alarm-mgr",TCPHASH); addtolist(tcp_port_types,384,"arns",TCPHASH); addtolist(tcp_port_types,385,"ibm-app",TCPHASH); addtolist(tcp_port_types,386,"asa",TCPHASH); addtolist(tcp_port_types,387,"aurp",TCPHASH); addtolist(tcp_port_types,388,"unidata-ldm",TCPHASH); addtolist(tcp_port_types,390,"uis",TCPHASH); addtolist(tcp_port_types,391,"synotics-relay",TCPHASH); addtolist(tcp_port_types,392,"synotics-broker",TCPHASH); addtolist(tcp_port_types,393,"meta5",TCPHASH); addtolist(tcp_port_types,394,"embl-ndt",TCPHASH); addtolist(tcp_port_types,395,"netcp",TCPHASH); addtolist(tcp_port_types,396,"netware-ip",TCPHASH); addtolist(tcp_port_types,397,"mptn",TCPHASH); addtolist(tcp_port_types,398,"kryptolan",TCPHASH); addtolist(tcp_port_types,399,"iso-tsap-c2",TCPHASH); addtolist(tcp_port_types,400,"work-sol",TCPHASH); addtolist(tcp_port_types,401,"ups",TCPHASH); addtolist(tcp_port_types,402,"genie",TCPHASH); addtolist(tcp_port_types,403,"decap",TCPHASH); addtolist(tcp_port_types,404,"nced",TCPHASH); addtolist(tcp_port_types,405,"ncld",TCPHASH); addtolist(tcp_port_types,406,"imsp",TCPHASH); addtolist(tcp_port_types,407,"timbuktu",TCPHASH); addtolist(tcp_port_types,408,"prm-sm",TCPHASH); addtolist(tcp_port_types,409,"prm-nm",TCPHASH); addtolist(tcp_port_types,410,"decladebug",TCPHASH); addtolist(tcp_port_types,411,"rmt",TCPHASH); addtolist(tcp_port_types,412,"synoptics-trap",TCPHASH); addtolist(tcp_port_types,413,"smsp",TCPHASH); addtolist(tcp_port_types,414,"infoseek",TCPHASH); addtolist(tcp_port_types,415,"bnet",TCPHASH); addtolist(tcp_port_types,416,"silverplatter",TCPHASH); addtolist(tcp_port_types,417,"onmux",TCPHASH); addtolist(tcp_port_types,418,"hyper-g",TCPHASH); addtolist(tcp_port_types,419,"ariel1",TCPHASH); addtolist(tcp_port_types,420,"smpte",TCPHASH); addtolist(tcp_port_types,421,"ariel2",TCPHASH); addtolist(tcp_port_types,422,"ariel3",TCPHASH); addtolist(tcp_port_types,423,"opc-job-start",TCPHASH); addtolist(tcp_port_types,424,"opc-job-track",TCPHASH); addtolist(tcp_port_types,425,"icad-el",TCPHASH); addtolist(tcp_port_types,426,"smartsdp",TCPHASH); addtolist(tcp_port_types,427,"svrloc",TCPHASH); addtolist(tcp_port_types,428,"ocs_cmu",TCPHASH); addtolist(tcp_port_types,429,"ocs_amu",TCPHASH); addtolist(tcp_port_types,430,"utmpsd",TCPHASH); addtolist(tcp_port_types,431,"utmpcd",TCPHASH); addtolist(tcp_port_types,432,"iasd",TCPHASH); addtolist(tcp_port_types,433,"nnsp",TCPHASH); addtolist(tcp_port_types,434,"mobileip-agent",TCPHASH); addtolist(tcp_port_types,435,"mobilip-mn",TCPHASH); addtolist(tcp_port_types,436,"dna-cml",TCPHASH); addtolist(tcp_port_types,437,"comscm",TCPHASH); addtolist(tcp_port_types,438,"dsfgw",TCPHASH); addtolist(tcp_port_types,439,"dasp",TCPHASH); addtolist(tcp_port_types,440,"sgcp",TCPHASH); addtolist(tcp_port_types,441,"decvms-sysmgt",TCPHASH); addtolist(tcp_port_types,442,"cvc_hostd",TCPHASH); addtolist(tcp_port_types,443,"https",TCPHASH); addtolist(tcp_port_types,444,"snpp",TCPHASH); addtolist(tcp_port_types,445,"microsoft-ds",TCPHASH); addtolist(tcp_port_types,446,"ddm-rdb",TCPHASH); addtolist(tcp_port_types,447,"ddm-dfm",TCPHASH); addtolist(tcp_port_types,448,"ddm-ssl",TCPHASH); addtolist(tcp_port_types,449,"as-servermap",TCPHASH); addtolist(tcp_port_types,450,"tserver",TCPHASH); addtolist(tcp_port_types,451,"sfs-smp-net",TCPHASH); addtolist(tcp_port_types,452,"sfs-config",TCPHASH); addtolist(tcp_port_types,453,"creativeserver",TCPHASH); addtolist(tcp_port_types,454,"contentserver",TCPHASH); addtolist(tcp_port_types,455,"creativepartnr",TCPHASH); addtolist(tcp_port_types,456,"macon-tcp",TCPHASH); addtolist(tcp_port_types,457,"scohelp",TCPHASH); addtolist(tcp_port_types,458,"appleqtc",TCPHASH); addtolist(tcp_port_types,459,"ampr-rcmd",TCPHASH); addtolist(tcp_port_types,460,"skronk",TCPHASH); addtolist(tcp_port_types,461,"datasurfsrv",TCPHASH); addtolist(tcp_port_types,462,"datasurfsrvsec",TCPHASH); addtolist(tcp_port_types,463,"alpes",TCPHASH); addtolist(tcp_port_types,464,"kpasswd",TCPHASH); addtolist(tcp_port_types,466,"digital-vrc",TCPHASH); addtolist(tcp_port_types,467,"mylex-mapd",TCPHASH); addtolist(tcp_port_types,468,"photuris",TCPHASH); addtolist(tcp_port_types,469,"rcp",TCPHASH); addtolist(tcp_port_types,470,"scx-proxy",TCPHASH); addtolist(tcp_port_types,471,"mondex",TCPHASH); addtolist(tcp_port_types,472,"ljk-login",TCPHASH); addtolist(tcp_port_types,473,"hybrid-pop",TCPHASH); addtolist(tcp_port_types,474,"tn-tl-w1",TCPHASH); addtolist(tcp_port_types,475,"tcpnethaspsrv",TCPHASH); addtolist(tcp_port_types,476,"tn-tl-fd1",TCPHASH); addtolist(tcp_port_types,477,"ss7ns",TCPHASH); addtolist(tcp_port_types,478,"spsc",TCPHASH); addtolist(tcp_port_types,479,"iafserver",TCPHASH); addtolist(tcp_port_types,480,"iafdbase",TCPHASH); addtolist(tcp_port_types,481,"ph",TCPHASH); addtolist(tcp_port_types,482,"bgs-nsi",TCPHASH); addtolist(tcp_port_types,483,"ulpnet",TCPHASH); addtolist(tcp_port_types,484,"integra-sme",TCPHASH); addtolist(tcp_port_types,485,"powerburst",TCPHASH); addtolist(tcp_port_types,486,"avian",TCPHASH); addtolist(tcp_port_types,487,"saft",TCPHASH); addtolist(tcp_port_types,488,"gss-http",TCPHASH); addtolist(tcp_port_types,489,"nest-protocol",TCPHASH); addtolist(tcp_port_types,490,"micom-pfs",TCPHASH); addtolist(tcp_port_types,491,"go-login",TCPHASH); addtolist(tcp_port_types,492,"ticf-1",TCPHASH); addtolist(tcp_port_types,493,"ticf-2",TCPHASH); addtolist(tcp_port_types,494,"pov-ray",TCPHASH); addtolist(tcp_port_types,495,"intecourier",TCPHASH); addtolist(tcp_port_types,496,"pim-rp-disc",TCPHASH); addtolist(tcp_port_types,497,"dantz",TCPHASH); addtolist(tcp_port_types,498,"siam",TCPHASH); addtolist(tcp_port_types,499,"iso-ill",TCPHASH); addtolist(tcp_port_types,500,"isakmp",TCPHASH); addtolist(tcp_port_types,501,"stmf",TCPHASH); addtolist(tcp_port_types,502,"asa-appl-proto",TCPHASH); addtolist(tcp_port_types,503,"intrinsa",TCPHASH); addtolist(tcp_port_types,504,"citadel",TCPHASH); addtolist(tcp_port_types,505,"mailbox-lm",TCPHASH); addtolist(tcp_port_types,506,"ohimsrv",TCPHASH); addtolist(tcp_port_types,507,"crs",TCPHASH); addtolist(tcp_port_types,508,"xvttp",TCPHASH); addtolist(tcp_port_types,509,"snare",TCPHASH); addtolist(tcp_port_types,510,"fcp",TCPHASH); addtolist(tcp_port_types,511,"passgo",TCPHASH); addtolist(tcp_port_types,512,"exec",TCPHASH); addtolist(tcp_port_types,513,"login",TCPHASH); addtolist(tcp_port_types,514,"shell",TCPHASH); addtolist(tcp_port_types,515,"printer",TCPHASH); addtolist(tcp_port_types,516,"videotex",TCPHASH); addtolist(tcp_port_types,517,"talk",TCPHASH); addtolist(tcp_port_types,518,"ntalk",TCPHASH); addtolist(tcp_port_types,519,"utime",TCPHASH); addtolist(tcp_port_types,520,"efs",TCPHASH); addtolist(tcp_port_types,521,"ripng",TCPHASH); addtolist(tcp_port_types,522,"ulp",TCPHASH); addtolist(tcp_port_types,523,"ibm-db2",TCPHASH); addtolist(tcp_port_types,524,"ncp",TCPHASH); addtolist(tcp_port_types,525,"timed",TCPHASH); addtolist(tcp_port_types,526,"tempo",TCPHASH); addtolist(tcp_port_types,527,"stx",TCPHASH); addtolist(tcp_port_types,528,"custix",TCPHASH); addtolist(tcp_port_types,529,"irc-serv",TCPHASH); addtolist(tcp_port_types,530,"courier",TCPHASH); addtolist(tcp_port_types,531,"conference",TCPHASH); addtolist(tcp_port_types,532,"netnews",TCPHASH); addtolist(tcp_port_types,533,"netwall",TCPHASH); addtolist(tcp_port_types,534,"mm-admin",TCPHASH); addtolist(tcp_port_types,535,"iiop",TCPHASH); addtolist(tcp_port_types,536,"opalis-rdv",TCPHASH); addtolist(tcp_port_types,537,"nmsp",TCPHASH); addtolist(tcp_port_types,538,"gdomap",TCPHASH); addtolist(tcp_port_types,539,"apertus-ldp",TCPHASH); addtolist(tcp_port_types,540,"uucp",TCPHASH); addtolist(tcp_port_types,541,"uucp-rlogin",TCPHASH); addtolist(tcp_port_types,542,"commerce",TCPHASH); addtolist(tcp_port_types,543,"klogin",TCPHASH); addtolist(tcp_port_types,544,"kshell",TCPHASH); addtolist(tcp_port_types,545,"appleqtcsrvr",TCPHASH); addtolist(tcp_port_types,546,"dhcpv6-client",TCPHASH); addtolist(tcp_port_types,547,"dhcpv6-server",TCPHASH); addtolist(tcp_port_types,548,"afpovertcp",TCPHASH); addtolist(tcp_port_types,549,"idfp",TCPHASH); addtolist(tcp_port_types,550,"new-rwho",TCPHASH); addtolist(tcp_port_types,551,"cybercash",TCPHASH); addtolist(tcp_port_types,552,"deviceshare",TCPHASH); addtolist(tcp_port_types,553,"pirp",TCPHASH); addtolist(tcp_port_types,554,"rtsp",TCPHASH); addtolist(tcp_port_types,555,"dsf",TCPHASH); addtolist(tcp_port_types,556,"remotefs",TCPHASH); addtolist(tcp_port_types,557,"openvms-sysipc",TCPHASH); addtolist(tcp_port_types,558,"sdnskmp",TCPHASH); addtolist(tcp_port_types,559,"teedtap",TCPHASH); addtolist(tcp_port_types,560,"rmonitor",TCPHASH); addtolist(tcp_port_types,561,"monitor",TCPHASH); addtolist(tcp_port_types,562,"chshell",TCPHASH); addtolist(tcp_port_types,563,"nntps",TCPHASH); addtolist(tcp_port_types,564,"9pfs",TCPHASH); addtolist(tcp_port_types,565,"whoami",TCPHASH); addtolist(tcp_port_types,566,"streettalk",TCPHASH); addtolist(tcp_port_types,567,"banyan-rpc",TCPHASH); addtolist(tcp_port_types,568,"ms-shuttle",TCPHASH); addtolist(tcp_port_types,569,"ms-rome",TCPHASH); addtolist(tcp_port_types,570,"meter",TCPHASH); addtolist(tcp_port_types,571,"meter",TCPHASH); addtolist(tcp_port_types,572,"sonar",TCPHASH); addtolist(tcp_port_types,573,"banyan-vip",TCPHASH); addtolist(tcp_port_types,574,"ftp-agent",TCPHASH); addtolist(tcp_port_types,575,"vemmi",TCPHASH); addtolist(tcp_port_types,576,"ipcd",TCPHASH); addtolist(tcp_port_types,577,"vnas",TCPHASH); addtolist(tcp_port_types,578,"ipdd",TCPHASH); addtolist(tcp_port_types,579,"decbsrv",TCPHASH); addtolist(tcp_port_types,580,"sntp-heartbeat",TCPHASH); addtolist(tcp_port_types,581,"bdp",TCPHASH); addtolist(tcp_port_types,582,"scc-security",TCPHASH); addtolist(tcp_port_types,583,"philips-vc",TCPHASH); addtolist(tcp_port_types,584,"keyserver",TCPHASH); addtolist(tcp_port_types,585,"imap4-ssl",TCPHASH); addtolist(tcp_port_types,586,"password-chg",TCPHASH); addtolist(tcp_port_types,587,"submission",TCPHASH); addtolist(tcp_port_types,588,"cal",TCPHASH); addtolist(tcp_port_types,589,"eyelink",TCPHASH); addtolist(tcp_port_types,590,"tns-cml",TCPHASH); addtolist(tcp_port_types,591,"http-alt",TCPHASH); addtolist(tcp_port_types,592,"eudora-set",TCPHASH); addtolist(tcp_port_types,593,"http-rpc-epmap",TCPHASH); addtolist(tcp_port_types,594,"tpip",TCPHASH); addtolist(tcp_port_types,595,"cab-protocol",TCPHASH); addtolist(tcp_port_types,596,"smsd",TCPHASH); addtolist(tcp_port_types,597,"ptcnameservice",TCPHASH); addtolist(tcp_port_types,598,"sco-websrvrmg3",TCPHASH); addtolist(tcp_port_types,599,"acp",TCPHASH); addtolist(tcp_port_types,600,"ipcserver",TCPHASH); addtolist(tcp_port_types,606,"urm",TCPHASH); addtolist(tcp_port_types,607,"nqs",TCPHASH); addtolist(tcp_port_types,608,"sift-uft",TCPHASH); addtolist(tcp_port_types,609,"npmp-trap",TCPHASH); addtolist(tcp_port_types,610,"npmp-local",TCPHASH); addtolist(tcp_port_types,611,"npmp-gui",TCPHASH); addtolist(tcp_port_types,612,"hmmp-ind",TCPHASH); addtolist(tcp_port_types,613,"hmmp-op",TCPHASH); addtolist(tcp_port_types,614,"sshell",TCPHASH); addtolist(tcp_port_types,615,"sco-inetmgr",TCPHASH); addtolist(tcp_port_types,616,"sco-sysmgr",TCPHASH); addtolist(tcp_port_types,617,"sco-dtmgr",TCPHASH); addtolist(tcp_port_types,618,"dei-icda",TCPHASH); addtolist(tcp_port_types,619,"digital-evm",TCPHASH); addtolist(tcp_port_types,620,"sco-websrvrmgr",TCPHASH); addtolist(tcp_port_types,621,"escp-ip",TCPHASH); addtolist(tcp_port_types,622,"collaborator",TCPHASH); addtolist(tcp_port_types,623,"aux_bus_shunt",TCPHASH); addtolist(tcp_port_types,624,"cryptoadmin",TCPHASH); addtolist(tcp_port_types,625,"dec_dlm",TCPHASH); addtolist(tcp_port_types,626,"asia",TCPHASH); addtolist(tcp_port_types,627,"passgo-tivoli",TCPHASH); addtolist(tcp_port_types,628,"qmqp",TCPHASH); addtolist(tcp_port_types,629,"3com-amp3",TCPHASH); addtolist(tcp_port_types,630,"rda",TCPHASH); addtolist(tcp_port_types,631,"ipp",TCPHASH); addtolist(tcp_port_types,632,"bmpp",TCPHASH); addtolist(tcp_port_types,633,"servstat",TCPHASH); addtolist(tcp_port_types,634,"ginad",TCPHASH); addtolist(tcp_port_types,635,"rlzdbase",TCPHASH); addtolist(tcp_port_types,636,"ldaps",TCPHASH); addtolist(tcp_port_types,637,"lanserver",TCPHASH); addtolist(tcp_port_types,638,"mcns-sec",TCPHASH); addtolist(tcp_port_types,639,"msdp",TCPHASH); addtolist(tcp_port_types,640,"entrust-sps",TCPHASH); addtolist(tcp_port_types,641,"repcmd",TCPHASH); addtolist(tcp_port_types,642,"esro-emsdp",TCPHASH); addtolist(tcp_port_types,643,"sanity",TCPHASH); addtolist(tcp_port_types,644,"dwr",TCPHASH); addtolist(tcp_port_types,645,"pssc",TCPHASH); addtolist(tcp_port_types,646,"ldp",TCPHASH); addtolist(tcp_port_types,647,"dhcp-failover",TCPHASH); addtolist(tcp_port_types,648,"rrp",TCPHASH); addtolist(tcp_port_types,649,"aminet",TCPHASH); addtolist(tcp_port_types,650,"obex",TCPHASH); addtolist(tcp_port_types,651,"ieee-mms",TCPHASH); addtolist(tcp_port_types,652,"udlr-dtcp",TCPHASH); addtolist(tcp_port_types,653,"repscmd",TCPHASH); addtolist(tcp_port_types,654,"aodv",TCPHASH); addtolist(tcp_port_types,655,"tinc",TCPHASH); addtolist(tcp_port_types,656,"spmp",TCPHASH); addtolist(tcp_port_types,657,"rmc",TCPHASH); addtolist(tcp_port_types,658,"tenfold",TCPHASH); addtolist(tcp_port_types,659,"url-rendezvous",TCPHASH); addtolist(tcp_port_types,660,"mac-srvr-admin",TCPHASH); addtolist(tcp_port_types,661,"hap",TCPHASH); addtolist(tcp_port_types,662,"pftp",TCPHASH); addtolist(tcp_port_types,663,"purenoise",TCPHASH); addtolist(tcp_port_types,664,"secure-aux-bus",TCPHASH); addtolist(tcp_port_types,665,"sun-dr",TCPHASH); addtolist(tcp_port_types,666,"mdqs",TCPHASH); addtolist(tcp_port_types,666,"doom",TCPHASH); addtolist(tcp_port_types,667,"disclose",TCPHASH); addtolist(tcp_port_types,668,"mecomm",TCPHASH); addtolist(tcp_port_types,669,"meregister",TCPHASH); addtolist(tcp_port_types,670,"vacdsm-sws",TCPHASH); addtolist(tcp_port_types,671,"vacdsm-app",TCPHASH); addtolist(tcp_port_types,672,"vpps-qua",TCPHASH); addtolist(tcp_port_types,673,"cimplex",TCPHASH); addtolist(tcp_port_types,674,"acap",TCPHASH); addtolist(tcp_port_types,675,"dctp",TCPHASH); addtolist(tcp_port_types,676,"vpps-via",TCPHASH); addtolist(tcp_port_types,677,"vpp",TCPHASH); addtolist(tcp_port_types,678,"ggf-ncp",TCPHASH); addtolist(tcp_port_types,679,"mrm",TCPHASH); addtolist(tcp_port_types,680,"entrust-aaas",TCPHASH); addtolist(tcp_port_types,681,"entrust-aams",TCPHASH); addtolist(tcp_port_types,682,"xfr",TCPHASH); addtolist(tcp_port_types,683,"corba-iiop",TCPHASH); addtolist(tcp_port_types,684,"corba-iiop-ssl",TCPHASH); addtolist(tcp_port_types,685,"mdc-portmapper",TCPHASH); addtolist(tcp_port_types,686,"hcp-wismar",TCPHASH); addtolist(tcp_port_types,687,"asipregistry",TCPHASH); addtolist(tcp_port_types,688,"realm-rusd",TCPHASH); addtolist(tcp_port_types,689,"nmap",TCPHASH); addtolist(tcp_port_types,690,"vatp",TCPHASH); addtolist(tcp_port_types,691,"msexch-routing",TCPHASH); addtolist(tcp_port_types,692,"hyperwave-isp",TCPHASH); addtolist(tcp_port_types,693,"connendp",TCPHASH); addtolist(tcp_port_types,694,"ha-cluster",TCPHASH); addtolist(tcp_port_types,695,"ieee-mms-ssl",TCPHASH); addtolist(tcp_port_types,696,"rushd",TCPHASH); addtolist(tcp_port_types,697,"uuidgen",TCPHASH); addtolist(tcp_port_types,698,"olsr",TCPHASH); addtolist(tcp_port_types,699,"accessnetwork",TCPHASH); addtolist(tcp_port_types,704,"elcsd",TCPHASH); addtolist(tcp_port_types,705,"agentx",TCPHASH); addtolist(tcp_port_types,706,"silc",TCPHASH); addtolist(tcp_port_types,707,"borland-dsj",TCPHASH); addtolist(tcp_port_types,709,"entrust-kmsh",TCPHASH); addtolist(tcp_port_types,710,"entrust-ash",TCPHASH); addtolist(tcp_port_types,711,"cisco-tdp",TCPHASH); addtolist(tcp_port_types,729,"netviewdm1",TCPHASH); addtolist(tcp_port_types,730,"netviewdm2",TCPHASH); addtolist(tcp_port_types,731,"netviewdm3",TCPHASH); addtolist(tcp_port_types,741,"netgw",TCPHASH); addtolist(tcp_port_types,742,"netrcs",TCPHASH); addtolist(tcp_port_types,744,"flexlm",TCPHASH); addtolist(tcp_port_types,747,"fujitsu-dev",TCPHASH); addtolist(tcp_port_types,748,"ris-cm",TCPHASH); addtolist(tcp_port_types,749,"kerberos-adm",TCPHASH); addtolist(tcp_port_types,750,"rfile",TCPHASH); addtolist(tcp_port_types,751,"pump",TCPHASH); addtolist(tcp_port_types,752,"qrh",TCPHASH); addtolist(tcp_port_types,753,"rrh",TCPHASH); addtolist(tcp_port_types,754,"tell",TCPHASH); addtolist(tcp_port_types,758,"nlogin",TCPHASH); addtolist(tcp_port_types,759,"con",TCPHASH); addtolist(tcp_port_types,760,"ns",TCPHASH); addtolist(tcp_port_types,761,"rxe",TCPHASH); addtolist(tcp_port_types,762,"quotad",TCPHASH); addtolist(tcp_port_types,763,"cycleserv",TCPHASH); addtolist(tcp_port_types,764,"omserv",TCPHASH); addtolist(tcp_port_types,765,"webster",TCPHASH); addtolist(tcp_port_types,767,"phonebook",TCPHASH); addtolist(tcp_port_types,769,"vid",TCPHASH); addtolist(tcp_port_types,770,"cadlock",TCPHASH); addtolist(tcp_port_types,771,"rtip",TCPHASH); addtolist(tcp_port_types,772,"cycleserv2",TCPHASH); addtolist(tcp_port_types,773,"submit",TCPHASH); addtolist(tcp_port_types,774,"rpasswd",TCPHASH); addtolist(tcp_port_types,775,"entomb",TCPHASH); addtolist(tcp_port_types,776,"wpages",TCPHASH); addtolist(tcp_port_types,777,"multiling-http",TCPHASH); addtolist(tcp_port_types,780,"wpgs",TCPHASH); addtolist(tcp_port_types,786,"concert",TCPHASH); addtolist(tcp_port_types,787,"qsc",TCPHASH); addtolist(tcp_port_types,800,"mdbs_daemon",TCPHASH); addtolist(tcp_port_types,801,"device",TCPHASH); addtolist(tcp_port_types,810,"fcp-udp",TCPHASH); addtolist(tcp_port_types,828,"itm-mcell-s",TCPHASH); addtolist(tcp_port_types,829,"pkix-3-ca-ra",TCPHASH); addtolist(tcp_port_types,847,"dhcp-failover2",TCPHASH); addtolist(tcp_port_types,873,"rsync",TCPHASH); addtolist(tcp_port_types,886,"iclcnet-locate",TCPHASH); addtolist(tcp_port_types,887,"iclcnet_svinfo",TCPHASH); addtolist(tcp_port_types,888,"accessbuilder",TCPHASH); addtolist(tcp_port_types,888,"cddbp",TCPHASH); addtolist(tcp_port_types,900,"omginitialrefs",TCPHASH); addtolist(tcp_port_types,901,"smpnameres",TCPHASH); addtolist(tcp_port_types,902,"ideafarm-chat",TCPHASH); addtolist(tcp_port_types,903,"ideafarm-catch",TCPHASH); addtolist(tcp_port_types,911,"xact-backup",TCPHASH); addtolist(tcp_port_types,989,"ftps-data",TCPHASH); addtolist(tcp_port_types,990,"ftps",TCPHASH); addtolist(tcp_port_types,991,"nas",TCPHASH); addtolist(tcp_port_types,992,"telnets",TCPHASH); addtolist(tcp_port_types,993,"imaps",TCPHASH); addtolist(tcp_port_types,994,"ircs",TCPHASH); addtolist(tcp_port_types,995,"pop3s",TCPHASH); addtolist(tcp_port_types,996,"vsinet",TCPHASH); addtolist(tcp_port_types,997,"maitrd",TCPHASH); addtolist(tcp_port_types,998,"busboy",TCPHASH); addtolist(tcp_port_types,999,"garcon",TCPHASH); addtolist(tcp_port_types,999,"puprouter",TCPHASH); addtolist(tcp_port_types,1000,"cadlock2",TCPHASH); addtolist(tcp_port_types,1010,"surf",TCPHASH); addtolist(tcp_port_types,1023,"1023-reserved",TCPHASH); addtolist(tcp_port_types,1024,"1024-reserved",TCPHASH); addtolist(tcp_port_types,1025,"blackjack",TCPHASH); addtolist(tcp_port_types,1030,"iad1",TCPHASH); addtolist(tcp_port_types,1031,"iad2",TCPHASH); addtolist(tcp_port_types,1032,"iad3",TCPHASH); addtolist(tcp_port_types,1040,"netarx",TCPHASH); addtolist(tcp_port_types,1047,"neod1",TCPHASH); addtolist(tcp_port_types,1048,"neod2",TCPHASH); addtolist(tcp_port_types,1049,"td-postman",TCPHASH); addtolist(tcp_port_types,1050,"cma",TCPHASH); addtolist(tcp_port_types,1051,"optima-vnet",TCPHASH); addtolist(tcp_port_types,1052,"ddt",TCPHASH); addtolist(tcp_port_types,1053,"remote-as",TCPHASH); addtolist(tcp_port_types,1054,"brvread",TCPHASH); addtolist(tcp_port_types,1055,"ansyslmd",TCPHASH); addtolist(tcp_port_types,1056,"vfo",TCPHASH); addtolist(tcp_port_types,1057,"startron",TCPHASH); addtolist(tcp_port_types,1058,"nim",TCPHASH); addtolist(tcp_port_types,1059,"nimreg",TCPHASH); addtolist(tcp_port_types,1060,"polestar",TCPHASH); addtolist(tcp_port_types,1061,"kiosk",TCPHASH); addtolist(tcp_port_types,1062,"veracity",TCPHASH); addtolist(tcp_port_types,1063,"kyoceranetdev",TCPHASH); addtolist(tcp_port_types,1064,"jstel",TCPHASH); addtolist(tcp_port_types,1065,"syscomlan",TCPHASH); addtolist(tcp_port_types,1066,"fpo-fns",TCPHASH); addtolist(tcp_port_types,1067,"instl_boots",TCPHASH); addtolist(tcp_port_types,1068,"instl_bootc",TCPHASH); addtolist(tcp_port_types,1069,"cognex-insight",TCPHASH); addtolist(tcp_port_types,1070,"gmrupdateserv",TCPHASH); addtolist(tcp_port_types,1071,"bsquare-voip",TCPHASH); addtolist(tcp_port_types,1072,"cardax",TCPHASH); addtolist(tcp_port_types,1073,"bridgecontrol",TCPHASH); addtolist(tcp_port_types,1074,"fastechnologlm",TCPHASH); addtolist(tcp_port_types,1075,"rdrmshc",TCPHASH); addtolist(tcp_port_types,1076,"dab-sti-c",TCPHASH); addtolist(tcp_port_types,1077,"imgames",TCPHASH); addtolist(tcp_port_types,1078,"emanagecstp",TCPHASH); addtolist(tcp_port_types,1079,"asprovatalk",TCPHASH); addtolist(tcp_port_types,1080,"socks",TCPHASH); addtolist(tcp_port_types,1081,"pvuniwien",TCPHASH); addtolist(tcp_port_types,1082,"amt-esd-prot",TCPHASH); addtolist(tcp_port_types,1083,"ansoft-lm-1",TCPHASH); addtolist(tcp_port_types,1084,"ansoft-lm-2",TCPHASH); addtolist(tcp_port_types,1085,"webobjects",TCPHASH); addtolist(tcp_port_types,1086,"cplscrambler-lg",TCPHASH); addtolist(tcp_port_types,1087,"cplscrambler-in",TCPHASH); addtolist(tcp_port_types,1088,"cplscrambler-al",TCPHASH); addtolist(tcp_port_types,1089,"ff-annunc",TCPHASH); addtolist(tcp_port_types,1090,"ff-fms",TCPHASH); addtolist(tcp_port_types,1091,"ff-sm",TCPHASH); addtolist(tcp_port_types,1092,"obrpd",TCPHASH); addtolist(tcp_port_types,1093,"proofd",TCPHASH); addtolist(tcp_port_types,1094,"rootd",TCPHASH); addtolist(tcp_port_types,1095,"nicelink",TCPHASH); addtolist(tcp_port_types,1096,"cnrprotocol",TCPHASH); addtolist(tcp_port_types,1097,"sunclustermgr",TCPHASH); addtolist(tcp_port_types,1098,"rmiactivation",TCPHASH); addtolist(tcp_port_types,1099,"rmiregistry",TCPHASH); addtolist(tcp_port_types,1100,"mctp",TCPHASH); addtolist(tcp_port_types,1101,"pt2-discover",TCPHASH); addtolist(tcp_port_types,1102,"adobeserver-1",TCPHASH); addtolist(tcp_port_types,1103,"adobeserver-2",TCPHASH); addtolist(tcp_port_types,1104,"xrl",TCPHASH); addtolist(tcp_port_types,1105,"ftranhc",TCPHASH); addtolist(tcp_port_types,1106,"isoipsigport-1",TCPHASH); addtolist(tcp_port_types,1107,"isoipsigport-2",TCPHASH); addtolist(tcp_port_types,1108,"ratio-adp",TCPHASH); addtolist(tcp_port_types,1110,"nfsd-status",TCPHASH); addtolist(tcp_port_types,1111,"lmsocialserver",TCPHASH); addtolist(tcp_port_types,1112,"icp",TCPHASH); addtolist(tcp_port_types,1114,"mini-sql",TCPHASH); addtolist(tcp_port_types,1115,"ardus-trns",TCPHASH); addtolist(tcp_port_types,1116,"ardus-cntl",TCPHASH); addtolist(tcp_port_types,1117,"ardus-mtrns",TCPHASH); addtolist(tcp_port_types,1122,"availant-mgr",TCPHASH); addtolist(tcp_port_types,1123,"murray",TCPHASH); addtolist(tcp_port_types,1155,"nfa",TCPHASH); addtolist(tcp_port_types,1161,"health-polling",TCPHASH); addtolist(tcp_port_types,1162,"health-trap",TCPHASH); addtolist(tcp_port_types,1169,"tripwire",TCPHASH); addtolist(tcp_port_types,1180,"mc-client",TCPHASH); addtolist(tcp_port_types,1188,"hp-webadmin",TCPHASH); addtolist(tcp_port_types,1200,"scol",TCPHASH); addtolist(tcp_port_types,1201,"nucleus-sand",TCPHASH); addtolist(tcp_port_types,1202,"caiccipc",TCPHASH); addtolist(tcp_port_types,1203,"ssslic-mgr",TCPHASH); addtolist(tcp_port_types,1204,"ssslog-mgr",TCPHASH); addtolist(tcp_port_types,1205,"accord-mgc",TCPHASH); addtolist(tcp_port_types,1206,"anthony-data",TCPHASH); addtolist(tcp_port_types,1207,"metasage",TCPHASH); addtolist(tcp_port_types,1208,"seagull-ais",TCPHASH); addtolist(tcp_port_types,1209,"ipcd3",TCPHASH); addtolist(tcp_port_types,1210,"eoss",TCPHASH); addtolist(tcp_port_types,1211,"groove-dpp",TCPHASH); addtolist(tcp_port_types,1212,"lupa",TCPHASH); addtolist(tcp_port_types,1213,"mpc-lifenet",TCPHASH); addtolist(tcp_port_types,1214,"kazaa",TCPHASH); addtolist(tcp_port_types,1215,"scanstat-1",TCPHASH); addtolist(tcp_port_types,1216,"etebac5",TCPHASH); addtolist(tcp_port_types,1217,"hpss-ndapi",TCPHASH); addtolist(tcp_port_types,1218,"aeroflight-ads",TCPHASH); addtolist(tcp_port_types,1219,"aeroflight-ret",TCPHASH); addtolist(tcp_port_types,1220,"qt-serveradmin",TCPHASH); addtolist(tcp_port_types,1221,"sweetware-apps",TCPHASH); addtolist(tcp_port_types,1222,"nerv",TCPHASH); addtolist(tcp_port_types,1223,"tgp",TCPHASH); addtolist(tcp_port_types,1224,"vpnz",TCPHASH); addtolist(tcp_port_types,1225,"slinkysearch",TCPHASH); addtolist(tcp_port_types,1226,"stgxfws",TCPHASH); addtolist(tcp_port_types,1227,"dns2go",TCPHASH); addtolist(tcp_port_types,1228,"florence",TCPHASH); addtolist(tcp_port_types,1229,"novell-zfs",TCPHASH); addtolist(tcp_port_types,1230,"periscope",TCPHASH); addtolist(tcp_port_types,1231,"menandmice-lpm",TCPHASH); addtolist(tcp_port_types,1232,"mtrgtrans",TCPHASH); addtolist(tcp_port_types,1233,"univ-appserver",TCPHASH); addtolist(tcp_port_types,1234,"search-agent",TCPHASH); addtolist(tcp_port_types,1235,"mosaicsyssvc1",TCPHASH); addtolist(tcp_port_types,1236,"bvcontrol",TCPHASH); addtolist(tcp_port_types,1237,"tsdos390",TCPHASH); addtolist(tcp_port_types,1238,"hacl-qs",TCPHASH); addtolist(tcp_port_types,1239,"nmsd",TCPHASH); addtolist(tcp_port_types,1240,"instantia",TCPHASH); addtolist(tcp_port_types,1241,"nessus",TCPHASH); addtolist(tcp_port_types,1242,"nmasoverip",TCPHASH); addtolist(tcp_port_types,1243,"serialgateway",TCPHASH); addtolist(tcp_port_types,1244,"isbconference1",TCPHASH); addtolist(tcp_port_types,1245,"isbconference2",TCPHASH); addtolist(tcp_port_types,1246,"payrouter",TCPHASH); addtolist(tcp_port_types,1247,"visionpyramid",TCPHASH); addtolist(tcp_port_types,1248,"hermes",TCPHASH); addtolist(tcp_port_types,1249,"mesavistaco",TCPHASH); addtolist(tcp_port_types,1250,"swldy-sias",TCPHASH); addtolist(tcp_port_types,1251,"servergraph",TCPHASH); addtolist(tcp_port_types,1252,"bspne-pcc",TCPHASH); addtolist(tcp_port_types,1253,"q55-pcc",TCPHASH); addtolist(tcp_port_types,1254,"de-noc",TCPHASH); addtolist(tcp_port_types,1255,"de-cache-query",TCPHASH); addtolist(tcp_port_types,1256,"de-server",TCPHASH); addtolist(tcp_port_types,1257,"shockwave2",TCPHASH); addtolist(tcp_port_types,1258,"opennl",TCPHASH); addtolist(tcp_port_types,1259,"opennl-voice",TCPHASH); addtolist(tcp_port_types,1260,"ibm-ssd",TCPHASH); addtolist(tcp_port_types,1261,"mpshrsv",TCPHASH); addtolist(tcp_port_types,1262,"qnts-orb",TCPHASH); addtolist(tcp_port_types,1263,"dka",TCPHASH); addtolist(tcp_port_types,1264,"prat",TCPHASH); addtolist(tcp_port_types,1265,"dssiapi",TCPHASH); addtolist(tcp_port_types,1266,"dellpwrappks",TCPHASH); addtolist(tcp_port_types,1267,"pcmlinux",TCPHASH); addtolist(tcp_port_types,1268,"propel-msgsys",TCPHASH); addtolist(tcp_port_types,1269,"watilapp",TCPHASH); addtolist(tcp_port_types,1270,"opsman",TCPHASH); addtolist(tcp_port_types,1271,"dabew",TCPHASH); addtolist(tcp_port_types,1272,"cspmlockmgr",TCPHASH); addtolist(tcp_port_types,1273,"emc-gateway",TCPHASH); addtolist(tcp_port_types,1274,"t1distproc",TCPHASH); addtolist(tcp_port_types,1275,"ivcollector",TCPHASH); addtolist(tcp_port_types,1276,"ivmanager",TCPHASH); addtolist(tcp_port_types,1277,"miva-mqs",TCPHASH); addtolist(tcp_port_types,1278,"dellwebadmin-1",TCPHASH); addtolist(tcp_port_types,1279,"dellwebadmin-2",TCPHASH); addtolist(tcp_port_types,1280,"pictrography",TCPHASH); addtolist(tcp_port_types,1281,"healthd",TCPHASH); addtolist(tcp_port_types,1282,"emperion",TCPHASH); addtolist(tcp_port_types,1283,"productinfo",TCPHASH); addtolist(tcp_port_types,1284,"iee-qfx",TCPHASH); addtolist(tcp_port_types,1285,"neoiface",TCPHASH); addtolist(tcp_port_types,1286,"netuitive",TCPHASH); addtolist(tcp_port_types,1288,"navbuddy",TCPHASH); addtolist(tcp_port_types,1289,"jwalkserver",TCPHASH); addtolist(tcp_port_types,1290,"winjaserver",TCPHASH); addtolist(tcp_port_types,1291,"seagulllms",TCPHASH); addtolist(tcp_port_types,1292,"dsdn",TCPHASH); addtolist(tcp_port_types,1293,"pkt-krb-ipsec",TCPHASH); addtolist(tcp_port_types,1294,"cmmdriver",TCPHASH); addtolist(tcp_port_types,1295,"eetp",TCPHASH); addtolist(tcp_port_types,1296,"dproxy",TCPHASH); addtolist(tcp_port_types,1297,"sdproxy",TCPHASH); addtolist(tcp_port_types,1298,"lpcp",TCPHASH); addtolist(tcp_port_types,1299,"hp-sci",TCPHASH); addtolist(tcp_port_types,1300,"h323hostcallsc",TCPHASH); addtolist(tcp_port_types,1301,"ci3-software-1",TCPHASH); addtolist(tcp_port_types,1302,"ci3-software-2",TCPHASH); addtolist(tcp_port_types,1303,"sftsrv",TCPHASH); addtolist(tcp_port_types,1304,"boomerang",TCPHASH); addtolist(tcp_port_types,1305,"pe-mike",TCPHASH); addtolist(tcp_port_types,1306,"re-conn-proto",TCPHASH); addtolist(tcp_port_types,1307,"pacmand",TCPHASH); addtolist(tcp_port_types,1308,"odsi",TCPHASH); addtolist(tcp_port_types,1309,"jtag-server",TCPHASH); addtolist(tcp_port_types,1310,"husky",TCPHASH); addtolist(tcp_port_types,1311,"rxmon",TCPHASH); addtolist(tcp_port_types,1312,"sti-envision",TCPHASH); addtolist(tcp_port_types,1313,"bmc_patroldb",TCPHASH); addtolist(tcp_port_types,1314,"pdps",TCPHASH); addtolist(tcp_port_types,1315,"els",TCPHASH); addtolist(tcp_port_types,1316,"exbit-escp",TCPHASH); addtolist(tcp_port_types,1317,"vrts-ipcserver",TCPHASH); addtolist(tcp_port_types,1318,"krb5gatekeeper",TCPHASH); addtolist(tcp_port_types,1319,"panja-icsp",TCPHASH); addtolist(tcp_port_types,1320,"panja-axbnet",TCPHASH); addtolist(tcp_port_types,1321,"pip",TCPHASH); addtolist(tcp_port_types,1322,"novation",TCPHASH); addtolist(tcp_port_types,1323,"brcd",TCPHASH); addtolist(tcp_port_types,1324,"delta-mcp",TCPHASH); addtolist(tcp_port_types,1325,"dx-instrument",TCPHASH); addtolist(tcp_port_types,1326,"wimsic",TCPHASH); addtolist(tcp_port_types,1327,"ultrex",TCPHASH); addtolist(tcp_port_types,1328,"ewall",TCPHASH); addtolist(tcp_port_types,1329,"netdb-export",TCPHASH); addtolist(tcp_port_types,1330,"streetperfect",TCPHASH); addtolist(tcp_port_types,1331,"intersan",TCPHASH); addtolist(tcp_port_types,1332,"pcia-rxp-b",TCPHASH); addtolist(tcp_port_types,1333,"passwrd-policy",TCPHASH); addtolist(tcp_port_types,1334,"writesrv",TCPHASH); addtolist(tcp_port_types,1335,"digital-notary",TCPHASH); addtolist(tcp_port_types,1336,"ischat",TCPHASH); addtolist(tcp_port_types,1337,"menandmice-dns",TCPHASH); addtolist(tcp_port_types,1338,"wmc-log-svc",TCPHASH); addtolist(tcp_port_types,1339,"kjtsiteserver",TCPHASH); addtolist(tcp_port_types,1340,"naap",TCPHASH); addtolist(tcp_port_types,1341,"qubes",TCPHASH); addtolist(tcp_port_types,1342,"esbroker",TCPHASH); addtolist(tcp_port_types,1343,"re101",TCPHASH); addtolist(tcp_port_types,1344,"icap",TCPHASH); addtolist(tcp_port_types,1345,"vpjp",TCPHASH); addtolist(tcp_port_types,1346,"alta-ana-lm",TCPHASH); addtolist(tcp_port_types,1347,"bbn-mmc",TCPHASH); addtolist(tcp_port_types,1348,"bbn-mmx",TCPHASH); addtolist(tcp_port_types,1349,"sbook",TCPHASH); addtolist(tcp_port_types,1350,"editbench",TCPHASH); addtolist(tcp_port_types,1351,"equationbuilder",TCPHASH); addtolist(tcp_port_types,1352,"lotusnote",TCPHASH); addtolist(tcp_port_types,1353,"relief",TCPHASH); addtolist(tcp_port_types,1354,"rightbrain",TCPHASH); addtolist(tcp_port_types,1355,"intuitive-edge",TCPHASH); addtolist(tcp_port_types,1356,"cuillamartin",TCPHASH); addtolist(tcp_port_types,1357,"pegboard",TCPHASH); addtolist(tcp_port_types,1358,"connlcli",TCPHASH); addtolist(tcp_port_types,1359,"ftsrv",TCPHASH); addtolist(tcp_port_types,1360,"mimer",TCPHASH); addtolist(tcp_port_types,1361,"linx",TCPHASH); addtolist(tcp_port_types,1362,"timeflies",TCPHASH); addtolist(tcp_port_types,1363,"ndm-requester",TCPHASH); addtolist(tcp_port_types,1364,"ndm-server",TCPHASH); addtolist(tcp_port_types,1365,"adapt-sna",TCPHASH); addtolist(tcp_port_types,1366,"netware-csp",TCPHASH); addtolist(tcp_port_types,1367,"dcs",TCPHASH); addtolist(tcp_port_types,1368,"screencast",TCPHASH); addtolist(tcp_port_types,1369,"gv-us",TCPHASH); addtolist(tcp_port_types,1370,"us-gv",TCPHASH); addtolist(tcp_port_types,1371,"fc-cli",TCPHASH); addtolist(tcp_port_types,1372,"fc-ser",TCPHASH); addtolist(tcp_port_types,1373,"chromagrafx",TCPHASH); addtolist(tcp_port_types,1374,"molly",TCPHASH); addtolist(tcp_port_types,1375,"bytex",TCPHASH); addtolist(tcp_port_types,1376,"ibm-pps",TCPHASH); addtolist(tcp_port_types,1377,"cichlid",TCPHASH); addtolist(tcp_port_types,1378,"elan",TCPHASH); addtolist(tcp_port_types,1379,"dbreporter",TCPHASH); addtolist(tcp_port_types,1380,"telesis-licman",TCPHASH); addtolist(tcp_port_types,1381,"apple-licman",TCPHASH); addtolist(tcp_port_types,1382,"udt_os",TCPHASH); addtolist(tcp_port_types,1383,"gwha",TCPHASH); addtolist(tcp_port_types,1384,"os-licman",TCPHASH); addtolist(tcp_port_types,1385,"atex_elmd",TCPHASH); addtolist(tcp_port_types,1386,"checksum",TCPHASH); addtolist(tcp_port_types,1387,"cadsi-lm",TCPHASH); addtolist(tcp_port_types,1388,"objective-dbc",TCPHASH); addtolist(tcp_port_types,1389,"iclpv-dm",TCPHASH); addtolist(tcp_port_types,1390,"iclpv-sc",TCPHASH); addtolist(tcp_port_types,1391,"iclpv-sas",TCPHASH); addtolist(tcp_port_types,1392,"iclpv-pm",TCPHASH); addtolist(tcp_port_types,1393,"iclpv-nls",TCPHASH); addtolist(tcp_port_types,1394,"iclpv-nlc",TCPHASH); addtolist(tcp_port_types,1395,"iclpv-wsm",TCPHASH); addtolist(tcp_port_types,1396,"dvl-activemail",TCPHASH); addtolist(tcp_port_types,1397,"audio-activmail",TCPHASH); addtolist(tcp_port_types,1398,"video-activmail",TCPHASH); addtolist(tcp_port_types,1399,"cadkey-licman",TCPHASH); addtolist(tcp_port_types,1400,"cadkey-tablet",TCPHASH); addtolist(tcp_port_types,1401,"goldleaf-licman",TCPHASH); addtolist(tcp_port_types,1402,"prm-sm-np",TCPHASH); addtolist(tcp_port_types,1403,"prm-nm-np",TCPHASH); addtolist(tcp_port_types,1404,"igi-lm",TCPHASH); addtolist(tcp_port_types,1405,"ibm-res",TCPHASH); addtolist(tcp_port_types,1406,"netlabs-lm",TCPHASH); addtolist(tcp_port_types,1407,"dbsa-lm",TCPHASH); addtolist(tcp_port_types,1408,"sophia-lm",TCPHASH); addtolist(tcp_port_types,1409,"here-lm",TCPHASH); addtolist(tcp_port_types,1410,"hiq",TCPHASH); addtolist(tcp_port_types,1411,"af",TCPHASH); addtolist(tcp_port_types,1412,"innosys",TCPHASH); addtolist(tcp_port_types,1413,"innosys-acl",TCPHASH); addtolist(tcp_port_types,1414,"ibm-mqseries",TCPHASH); addtolist(tcp_port_types,1415,"dbstar",TCPHASH); addtolist(tcp_port_types,1416,"novell-lu6.2",TCPHASH); addtolist(tcp_port_types,1417,"timbuktu-srv1",TCPHASH); addtolist(tcp_port_types,1418,"timbuktu-srv2",TCPHASH); addtolist(tcp_port_types,1419,"timbuktu-srv3",TCPHASH); addtolist(tcp_port_types,1420,"timbuktu-srv4",TCPHASH); addtolist(tcp_port_types,1421,"gandalf-lm",TCPHASH); addtolist(tcp_port_types,1422,"autodesk-lm",TCPHASH); addtolist(tcp_port_types,1423,"essbase",TCPHASH); addtolist(tcp_port_types,1424,"hybrid",TCPHASH); addtolist(tcp_port_types,1425,"zion-lm",TCPHASH); addtolist(tcp_port_types,1426,"sais",TCPHASH); addtolist(tcp_port_types,1427,"mloadd",TCPHASH); addtolist(tcp_port_types,1428,"informatik-lm",TCPHASH); addtolist(tcp_port_types,1429,"nms",TCPHASH); addtolist(tcp_port_types,1430,"tpdu",TCPHASH); addtolist(tcp_port_types,1431,"rgtp",TCPHASH); addtolist(tcp_port_types,1432,"blueberry-lm",TCPHASH); addtolist(tcp_port_types,1433,"ms-sql-s",TCPHASH); addtolist(tcp_port_types,1434,"ms-sql-m",TCPHASH); addtolist(tcp_port_types,1435,"ibm-cics",TCPHASH); addtolist(tcp_port_types,1436,"saism",TCPHASH); addtolist(tcp_port_types,1437,"tabula",TCPHASH); addtolist(tcp_port_types,1438,"eicon-server",TCPHASH); addtolist(tcp_port_types,1439,"eicon-x25",TCPHASH); addtolist(tcp_port_types,1440,"eicon-slp",TCPHASH); addtolist(tcp_port_types,1441,"cadis-1",TCPHASH); addtolist(tcp_port_types,1442,"cadis-2",TCPHASH); addtolist(tcp_port_types,1443,"ies-lm",TCPHASH); addtolist(tcp_port_types,1444,"marcam-lm",TCPHASH); addtolist(tcp_port_types,1445,"proxima-lm",TCPHASH); addtolist(tcp_port_types,1446,"ora-lm",TCPHASH); addtolist(tcp_port_types,1447,"apri-lm",TCPHASH); addtolist(tcp_port_types,1448,"oc-lm",TCPHASH); addtolist(tcp_port_types,1449,"peport",TCPHASH); addtolist(tcp_port_types,1450,"dwf",TCPHASH); addtolist(tcp_port_types,1451,"infoman",TCPHASH); addtolist(tcp_port_types,1452,"gtegsc-lm",TCPHASH); addtolist(tcp_port_types,1453,"genie-lm",TCPHASH); addtolist(tcp_port_types,1454,"interhdl_elmd",TCPHASH); addtolist(tcp_port_types,1455,"esl-lm",TCPHASH); addtolist(tcp_port_types,1456,"dca",TCPHASH); addtolist(tcp_port_types,1457,"valisys-lm",TCPHASH); addtolist(tcp_port_types,1458,"nrcabq-lm",TCPHASH); addtolist(tcp_port_types,1459,"proshare1",TCPHASH); addtolist(tcp_port_types,1460,"proshare2",TCPHASH); addtolist(tcp_port_types,1461,"ibm_wrless_lan",TCPHASH); addtolist(tcp_port_types,1462,"world-lm",TCPHASH); addtolist(tcp_port_types,1463,"nucleus",TCPHASH); addtolist(tcp_port_types,1464,"msl_lmd",TCPHASH); addtolist(tcp_port_types,1465,"pipes",TCPHASH); addtolist(tcp_port_types,1466,"oceansoft-lm",TCPHASH); addtolist(tcp_port_types,1467,"csdmbase",TCPHASH); addtolist(tcp_port_types,1468,"csdm",TCPHASH); addtolist(tcp_port_types,1469,"aal-lm",TCPHASH); addtolist(tcp_port_types,1470,"uaiact",TCPHASH); addtolist(tcp_port_types,1471,"csdmbase",TCPHASH); addtolist(tcp_port_types,1472,"csdm",TCPHASH); addtolist(tcp_port_types,1473,"openmath",TCPHASH); addtolist(tcp_port_types,1474,"telefinder",TCPHASH); addtolist(tcp_port_types,1475,"taligent-lm",TCPHASH); addtolist(tcp_port_types,1476,"clvm-cfg",TCPHASH); addtolist(tcp_port_types,1477,"ms-sna-server",TCPHASH); addtolist(tcp_port_types,1478,"ms-sna-base",TCPHASH); addtolist(tcp_port_types,1479,"dberegister",TCPHASH); addtolist(tcp_port_types,1480,"pacerforum",TCPHASH); addtolist(tcp_port_types,1481,"airs",TCPHASH); addtolist(tcp_port_types,1482,"miteksys-lm",TCPHASH); addtolist(tcp_port_types,1483,"afs",TCPHASH); addtolist(tcp_port_types,1484,"confluent",TCPHASH); addtolist(tcp_port_types,1485,"lansource",TCPHASH); addtolist(tcp_port_types,1486,"nms_topo_serv",TCPHASH); addtolist(tcp_port_types,1487,"localinfosrvr",TCPHASH); addtolist(tcp_port_types,1488,"docstor",TCPHASH); addtolist(tcp_port_types,1489,"dmdocbroker",TCPHASH); addtolist(tcp_port_types,1490,"insitu-conf",TCPHASH); addtolist(tcp_port_types,1491,"anynetgateway",TCPHASH); addtolist(tcp_port_types,1492,"stone-design-1",TCPHASH); addtolist(tcp_port_types,1493,"netmap_lm",TCPHASH); addtolist(tcp_port_types,1494,"ica",TCPHASH); addtolist(tcp_port_types,1495,"cvc",TCPHASH); addtolist(tcp_port_types,1496,"liberty-lm",TCPHASH); addtolist(tcp_port_types,1497,"rfx-lm",TCPHASH); addtolist(tcp_port_types,1498,"sybase-sqlany",TCPHASH); addtolist(tcp_port_types,1499,"fhc",TCPHASH); addtolist(tcp_port_types,1500,"vlsi-lm",TCPHASH); addtolist(tcp_port_types,1501,"saiscm",TCPHASH); addtolist(tcp_port_types,1502,"shivadiscovery",TCPHASH); addtolist(tcp_port_types,1503,"imtc-mcs",TCPHASH); addtolist(tcp_port_types,1504,"evb-elm",TCPHASH); addtolist(tcp_port_types,1505,"funkproxy",TCPHASH); addtolist(tcp_port_types,1506,"utcd",TCPHASH); addtolist(tcp_port_types,1507,"symplex",TCPHASH); addtolist(tcp_port_types,1508,"diagmond",TCPHASH); addtolist(tcp_port_types,1509,"robcad-lm",TCPHASH); addtolist(tcp_port_types,1510,"mvx-lm",TCPHASH); addtolist(tcp_port_types,1511,"3l-l1",TCPHASH); addtolist(tcp_port_types,1512,"wins",TCPHASH); addtolist(tcp_port_types,1513,"fujitsu-dtc",TCPHASH); addtolist(tcp_port_types,1514,"fujitsu-dtcns",TCPHASH); addtolist(tcp_port_types,1515,"ifor-protocol",TCPHASH); addtolist(tcp_port_types,1516,"vpad",TCPHASH); addtolist(tcp_port_types,1517,"vpac",TCPHASH); addtolist(tcp_port_types,1518,"vpvd",TCPHASH); addtolist(tcp_port_types,1519,"vpvc",TCPHASH); addtolist(tcp_port_types,1520,"atm-zip-office",TCPHASH); addtolist(tcp_port_types,1521,"ncube-lm",TCPHASH); addtolist(tcp_port_types,1522,"ricardo-lm",TCPHASH); addtolist(tcp_port_types,1523,"cichild-lm",TCPHASH); addtolist(tcp_port_types,1524,"ingreslock",TCPHASH); addtolist(tcp_port_types,1525,"orasrv",TCPHASH); addtolist(tcp_port_types,1525,"prospero-np",TCPHASH); addtolist(tcp_port_types,1526,"pdap-np",TCPHASH); addtolist(tcp_port_types,1527,"tlisrv",TCPHASH); addtolist(tcp_port_types,1528,"mciautoreg",TCPHASH); addtolist(tcp_port_types,1529,"coauthor",TCPHASH); addtolist(tcp_port_types,1530,"rap-service",TCPHASH); addtolist(tcp_port_types,1531,"rap-listen",TCPHASH); addtolist(tcp_port_types,1532,"miroconnect",TCPHASH); addtolist(tcp_port_types,1533,"virtual-places",TCPHASH); addtolist(tcp_port_types,1534,"micromuse-lm",TCPHASH); addtolist(tcp_port_types,1535,"ampr-info",TCPHASH); addtolist(tcp_port_types,1536,"ampr-inter",TCPHASH); addtolist(tcp_port_types,1537,"sdsc-lm",TCPHASH); addtolist(tcp_port_types,1538,"3ds-lm",TCPHASH); addtolist(tcp_port_types,1539,"intellistor-lm",TCPHASH); addtolist(tcp_port_types,1540,"rds",TCPHASH); addtolist(tcp_port_types,1541,"rds2",TCPHASH); addtolist(tcp_port_types,1542,"gridgen-elmd",TCPHASH); addtolist(tcp_port_types,1543,"simba-cs",TCPHASH); addtolist(tcp_port_types,1544,"aspeclmd",TCPHASH); addtolist(tcp_port_types,1545,"vistium-share",TCPHASH); addtolist(tcp_port_types,1546,"abbaccuray",TCPHASH); addtolist(tcp_port_types,1547,"laplink",TCPHASH); addtolist(tcp_port_types,1548,"axon-lm",TCPHASH); addtolist(tcp_port_types,1549,"shivahose",TCPHASH); addtolist(tcp_port_types,1550,"3m-image-lm",TCPHASH); addtolist(tcp_port_types,1551,"hecmtl-db",TCPHASH); addtolist(tcp_port_types,1552,"pciarray",TCPHASH); addtolist(tcp_port_types,1553,"sna-cs",TCPHASH); addtolist(tcp_port_types,1554,"caci-lm",TCPHASH); addtolist(tcp_port_types,1555,"livelan",TCPHASH); addtolist(tcp_port_types,1556,"ashwin",TCPHASH); addtolist(tcp_port_types,1557,"arbortext-lm",TCPHASH); addtolist(tcp_port_types,1558,"xingmpeg",TCPHASH); addtolist(tcp_port_types,1559,"web2host",TCPHASH); addtolist(tcp_port_types,1560,"asci-val",TCPHASH); addtolist(tcp_port_types,1561,"facilityview",TCPHASH); addtolist(tcp_port_types,1562,"pconnectmgr",TCPHASH); addtolist(tcp_port_types,1563,"cadabra-lm",TCPHASH); addtolist(tcp_port_types,1564,"pay-per-view",TCPHASH); addtolist(tcp_port_types,1565,"winddlb",TCPHASH); addtolist(tcp_port_types,1566,"corelvideo",TCPHASH); addtolist(tcp_port_types,1567,"jlicelmd",TCPHASH); addtolist(tcp_port_types,1568,"tsspmap",TCPHASH); addtolist(tcp_port_types,1569,"ets",TCPHASH); addtolist(tcp_port_types,1570,"orbixd",TCPHASH); addtolist(tcp_port_types,1571,"rdb-dbs-disp",TCPHASH); addtolist(tcp_port_types,1572,"chip-lm",TCPHASH); addtolist(tcp_port_types,1573,"itscomm-ns",TCPHASH); addtolist(tcp_port_types,1574,"mvel-lm",TCPHASH); addtolist(tcp_port_types,1575,"oraclenames",TCPHASH); addtolist(tcp_port_types,1576,"moldflow-lm",TCPHASH); addtolist(tcp_port_types,1577,"hypercube-lm",TCPHASH); addtolist(tcp_port_types,1578,"jacobus-lm",TCPHASH); addtolist(tcp_port_types,1579,"ioc-sea-lm",TCPHASH); addtolist(tcp_port_types,1580,"tn-tl-r1",TCPHASH); addtolist(tcp_port_types,1581,"mil-2045-47001",TCPHASH); addtolist(tcp_port_types,1582,"msims",TCPHASH); addtolist(tcp_port_types,1583,"simbaexpress",TCPHASH); addtolist(tcp_port_types,1584,"tn-tl-fd2",TCPHASH); addtolist(tcp_port_types,1585,"intv",TCPHASH); addtolist(tcp_port_types,1586,"ibm-abtact",TCPHASH); addtolist(tcp_port_types,1587,"pra_elmd",TCPHASH); addtolist(tcp_port_types,1588,"triquest-lm",TCPHASH); addtolist(tcp_port_types,1589,"vqp",TCPHASH); addtolist(tcp_port_types,1590,"gemini-lm",TCPHASH); addtolist(tcp_port_types,1591,"ncpm-pm",TCPHASH); addtolist(tcp_port_types,1592,"commonspace",TCPHASH); addtolist(tcp_port_types,1593,"mainsoft-lm",TCPHASH); addtolist(tcp_port_types,1594,"sixtrak",TCPHASH); addtolist(tcp_port_types,1595,"radio",TCPHASH); addtolist(tcp_port_types,1596,"radio-sm",TCPHASH); addtolist(tcp_port_types,1597,"orbplus-iiop",TCPHASH); addtolist(tcp_port_types,1598,"picknfs",TCPHASH); addtolist(tcp_port_types,1599,"simbaservices",TCPHASH); addtolist(tcp_port_types,1600,"issd",TCPHASH); addtolist(tcp_port_types,1601,"aas",TCPHASH); addtolist(tcp_port_types,1602,"inspect",TCPHASH); addtolist(tcp_port_types,1603,"picodbc",TCPHASH); addtolist(tcp_port_types,1604,"icabrowser",TCPHASH); addtolist(tcp_port_types,1605,"slp",TCPHASH); addtolist(tcp_port_types,1606,"slm-api",TCPHASH); addtolist(tcp_port_types,1607,"stt",TCPHASH); addtolist(tcp_port_types,1608,"smart-lm",TCPHASH); addtolist(tcp_port_types,1609,"isysg-lm",TCPHASH); addtolist(tcp_port_types,1610,"taurus-wh",TCPHASH); addtolist(tcp_port_types,1611,"ill",TCPHASH); addtolist(tcp_port_types,1612,"netbill-trans",TCPHASH); addtolist(tcp_port_types,1613,"netbill-keyrep",TCPHASH); addtolist(tcp_port_types,1614,"netbill-cred",TCPHASH); addtolist(tcp_port_types,1615,"netbill-auth",TCPHASH); addtolist(tcp_port_types,1616,"netbill-prod",TCPHASH); addtolist(tcp_port_types,1617,"nimrod-agent",TCPHASH); addtolist(tcp_port_types,1618,"skytelnet",TCPHASH); addtolist(tcp_port_types,1619,"xs-openstorage",TCPHASH); addtolist(tcp_port_types,1620,"faxportwinport",TCPHASH); addtolist(tcp_port_types,1621,"softdataphone",TCPHASH); addtolist(tcp_port_types,1622,"ontime",TCPHASH); addtolist(tcp_port_types,1623,"jaleosnd",TCPHASH); addtolist(tcp_port_types,1624,"udp-sr-port",TCPHASH); addtolist(tcp_port_types,1625,"svs-omagent",TCPHASH); addtolist(tcp_port_types,1626,"shockwave",TCPHASH); addtolist(tcp_port_types,1627,"t128-gateway",TCPHASH); addtolist(tcp_port_types,1628,"lontalk-norm",TCPHASH); addtolist(tcp_port_types,1629,"lontalk-urgnt",TCPHASH); addtolist(tcp_port_types,1630,"oraclenet8cman",TCPHASH); addtolist(tcp_port_types,1631,"visitview",TCPHASH); addtolist(tcp_port_types,1632,"pammratc",TCPHASH); addtolist(tcp_port_types,1633,"pammrpc",TCPHASH); addtolist(tcp_port_types,1634,"loaprobe",TCPHASH); addtolist(tcp_port_types,1635,"edb-server1",TCPHASH); addtolist(tcp_port_types,1636,"cncp",TCPHASH); addtolist(tcp_port_types,1637,"cnap",TCPHASH); addtolist(tcp_port_types,1638,"cnip",TCPHASH); addtolist(tcp_port_types,1639,"cert-initiator",TCPHASH); addtolist(tcp_port_types,1640,"cert-responder",TCPHASH); addtolist(tcp_port_types,1641,"invision",TCPHASH); addtolist(tcp_port_types,1642,"isis-am",TCPHASH); addtolist(tcp_port_types,1643,"isis-ambc",TCPHASH); addtolist(tcp_port_types,1644,"saiseh",TCPHASH); addtolist(tcp_port_types,1645,"datametrics",TCPHASH); addtolist(tcp_port_types,1646,"sa-msg-port",TCPHASH); addtolist(tcp_port_types,1647,"rsap",TCPHASH); addtolist(tcp_port_types,1648,"concurrent-lm",TCPHASH); addtolist(tcp_port_types,1649,"kermit",TCPHASH); addtolist(tcp_port_types,1650,"nkd",TCPHASH); addtolist(tcp_port_types,1651,"shiva_confsrvr",TCPHASH); addtolist(tcp_port_types,1652,"xnmp",TCPHASH); addtolist(tcp_port_types,1653,"alphatech-lm",TCPHASH); addtolist(tcp_port_types,1654,"stargatealerts",TCPHASH); addtolist(tcp_port_types,1655,"dec-mbadmin",TCPHASH); addtolist(tcp_port_types,1656,"dec-mbadmin-h",TCPHASH); addtolist(tcp_port_types,1657,"fujitsu-mmpdc",TCPHASH); addtolist(tcp_port_types,1658,"sixnetudr",TCPHASH); addtolist(tcp_port_types,1659,"sg-lm",TCPHASH); addtolist(tcp_port_types,1660,"skip-mc-gikreq",TCPHASH); addtolist(tcp_port_types,1661,"netview-aix-1",TCPHASH); addtolist(tcp_port_types,1662,"netview-aix-2",TCPHASH); addtolist(tcp_port_types,1663,"netview-aix-3",TCPHASH); addtolist(tcp_port_types,1664,"netview-aix-4",TCPHASH); addtolist(tcp_port_types,1665,"netview-aix-5",TCPHASH); addtolist(tcp_port_types,1666,"netview-aix-6",TCPHASH); addtolist(tcp_port_types,1667,"netview-aix-7",TCPHASH); addtolist(tcp_port_types,1668,"netview-aix-8",TCPHASH); addtolist(tcp_port_types,1669,"netview-aix-9",TCPHASH); addtolist(tcp_port_types,1670,"netview-aix-10",TCPHASH); addtolist(tcp_port_types,1671,"netview-aix-11",TCPHASH); addtolist(tcp_port_types,1672,"netview-aix-12",TCPHASH); addtolist(tcp_port_types,1673,"proshare-mc-1",TCPHASH); addtolist(tcp_port_types,1674,"proshare-mc-2",TCPHASH); addtolist(tcp_port_types,1675,"pdp",TCPHASH); addtolist(tcp_port_types,1676,"netcomm1",TCPHASH); addtolist(tcp_port_types,1677,"groupwise",TCPHASH); addtolist(tcp_port_types,1678,"prolink",TCPHASH); addtolist(tcp_port_types,1679,"darcorp-lm",TCPHASH); addtolist(tcp_port_types,1680,"microcom-sbp",TCPHASH); addtolist(tcp_port_types,1681,"sd-elmd",TCPHASH); addtolist(tcp_port_types,1682,"lanyon-lantern",TCPHASH); addtolist(tcp_port_types,1683,"ncpm-hip",TCPHASH); addtolist(tcp_port_types,1684,"snaresecure",TCPHASH); addtolist(tcp_port_types,1685,"n2nremote",TCPHASH); addtolist(tcp_port_types,1686,"cvmon",TCPHASH); addtolist(tcp_port_types,1687,"nsjtp-ctrl",TCPHASH); addtolist(tcp_port_types,1688,"nsjtp-data",TCPHASH); addtolist(tcp_port_types,1689,"firefox",TCPHASH); addtolist(tcp_port_types,1690,"ng-umds",TCPHASH); addtolist(tcp_port_types,1691,"empire-empuma",TCPHASH); addtolist(tcp_port_types,1692,"sstsys-lm",TCPHASH); addtolist(tcp_port_types,1693,"rrirtr",TCPHASH); addtolist(tcp_port_types,1694,"rrimwm",TCPHASH); addtolist(tcp_port_types,1695,"rrilwm",TCPHASH); addtolist(tcp_port_types,1696,"rrifmm",TCPHASH); addtolist(tcp_port_types,1697,"rrisat",TCPHASH); addtolist(tcp_port_types,1698,"rsvp-encap-1",TCPHASH); addtolist(tcp_port_types,1699,"rsvp-encap-2",TCPHASH); addtolist(tcp_port_types,1700,"mps-raft",TCPHASH); addtolist(tcp_port_types,1701,"l2f",TCPHASH); addtolist(tcp_port_types,1701,"l2tp",TCPHASH); addtolist(tcp_port_types,1702,"deskshare",TCPHASH); addtolist(tcp_port_types,1703,"hb-engine",TCPHASH); addtolist(tcp_port_types,1704,"bcs-broker",TCPHASH); addtolist(tcp_port_types,1705,"slingshot",TCPHASH); addtolist(tcp_port_types,1706,"jetform",TCPHASH); addtolist(tcp_port_types,1707,"vdmplay",TCPHASH); addtolist(tcp_port_types,1708,"gat-lmd",TCPHASH); addtolist(tcp_port_types,1709,"centra",TCPHASH); addtolist(tcp_port_types,1710,"impera",TCPHASH); addtolist(tcp_port_types,1711,"pptconference",TCPHASH); addtolist(tcp_port_types,1712,"registrar",TCPHASH); addtolist(tcp_port_types,1713,"conferencetalk",TCPHASH); addtolist(tcp_port_types,1714,"sesi-lm",TCPHASH); addtolist(tcp_port_types,1715,"houdini-lm",TCPHASH); addtolist(tcp_port_types,1716,"xmsg",TCPHASH); addtolist(tcp_port_types,1717,"fj-hdnet",TCPHASH); addtolist(tcp_port_types,1718,"h323gatedisc",TCPHASH); addtolist(tcp_port_types,1719,"h323gatestat",TCPHASH); addtolist(tcp_port_types,1720,"h323hostcall",TCPHASH); addtolist(tcp_port_types,1721,"caicci",TCPHASH); addtolist(tcp_port_types,1722,"hks-lm",TCPHASH); addtolist(tcp_port_types,1723,"pptp",TCPHASH); addtolist(tcp_port_types,1724,"csbphonemaster",TCPHASH); addtolist(tcp_port_types,1725,"iden-ralp",TCPHASH); addtolist(tcp_port_types,1726,"iberiagames",TCPHASH); addtolist(tcp_port_types,1727,"winddx",TCPHASH); addtolist(tcp_port_types,1728,"telindus",TCPHASH); addtolist(tcp_port_types,1729,"citynl",TCPHASH); addtolist(tcp_port_types,1730,"roketz",TCPHASH); addtolist(tcp_port_types,1731,"msiccp",TCPHASH); addtolist(tcp_port_types,1732,"proxim",TCPHASH); addtolist(tcp_port_types,1733,"siipat",TCPHASH); addtolist(tcp_port_types,1734,"cambertx-lm",TCPHASH); addtolist(tcp_port_types,1735,"privatechat",TCPHASH); addtolist(tcp_port_types,1736,"street-stream",TCPHASH); addtolist(tcp_port_types,1737,"ultimad",TCPHASH); addtolist(tcp_port_types,1738,"gamegen1",TCPHASH); addtolist(tcp_port_types,1739,"webaccess",TCPHASH); addtolist(tcp_port_types,1740,"encore",TCPHASH); addtolist(tcp_port_types,1741,"cisco-net-mgmt",TCPHASH); addtolist(tcp_port_types,1742,"3Com-nsd",TCPHASH); addtolist(tcp_port_types,1743,"cinegrfx-lm",TCPHASH); addtolist(tcp_port_types,1744,"ncpm-ft",TCPHASH); addtolist(tcp_port_types,1745,"remote-winsock",TCPHASH); addtolist(tcp_port_types,1746,"ftrapid-1",TCPHASH); addtolist(tcp_port_types,1747,"ftrapid-2",TCPHASH); addtolist(tcp_port_types,1748,"oracle-em1",TCPHASH); addtolist(tcp_port_types,1749,"aspen-services",TCPHASH); addtolist(tcp_port_types,1750,"sslp",TCPHASH); addtolist(tcp_port_types,1751,"swiftnet",TCPHASH); addtolist(tcp_port_types,1752,"lofr-lm",TCPHASH); addtolist(tcp_port_types,1753,"translogic-lm",TCPHASH); addtolist(tcp_port_types,1754,"oracle-em2",TCPHASH); addtolist(tcp_port_types,1755,"ms-streaming",TCPHASH); addtolist(tcp_port_types,1756,"capfast-lmd",TCPHASH); addtolist(tcp_port_types,1757,"cnhrp",TCPHASH); addtolist(tcp_port_types,1758,"tftp-mcast",TCPHASH); addtolist(tcp_port_types,1759,"spss-lm",TCPHASH); addtolist(tcp_port_types,1760,"www-ldap-gw",TCPHASH); addtolist(tcp_port_types,1761,"cft-0",TCPHASH); addtolist(tcp_port_types,1762,"cft-1",TCPHASH); addtolist(tcp_port_types,1763,"cft-2",TCPHASH); addtolist(tcp_port_types,1764,"cft-3",TCPHASH); addtolist(tcp_port_types,1765,"cft-4",TCPHASH); addtolist(tcp_port_types,1766,"cft-5",TCPHASH); addtolist(tcp_port_types,1767,"cft-6",TCPHASH); addtolist(tcp_port_types,1768,"cft-7",TCPHASH); addtolist(tcp_port_types,1769,"bmc-net-adm",TCPHASH); addtolist(tcp_port_types,1770,"bmc-net-svc",TCPHASH); addtolist(tcp_port_types,1771,"vaultbase",TCPHASH); addtolist(tcp_port_types,1772,"essweb-gw",TCPHASH); addtolist(tcp_port_types,1773,"kmscontrol",TCPHASH); addtolist(tcp_port_types,1774,"global-dtserv",TCPHASH); addtolist(tcp_port_types,1776,"femis",TCPHASH); addtolist(tcp_port_types,1777,"powerguardian",TCPHASH); addtolist(tcp_port_types,1778,"prodigy-intrnet",TCPHASH); addtolist(tcp_port_types,1779,"pharmasoft",TCPHASH); addtolist(tcp_port_types,1780,"dpkeyserv",TCPHASH); addtolist(tcp_port_types,1781,"answersoft-lm",TCPHASH); addtolist(tcp_port_types,1782,"hp-hcip",TCPHASH); addtolist(tcp_port_types,1784,"finle-lm",TCPHASH); addtolist(tcp_port_types,1785,"windlm",TCPHASH); addtolist(tcp_port_types,1786,"funk-logger",TCPHASH); addtolist(tcp_port_types,1787,"funk-license",TCPHASH); addtolist(tcp_port_types,1788,"psmond",TCPHASH); addtolist(tcp_port_types,1789,"hello",TCPHASH); addtolist(tcp_port_types,1790,"nmsp",TCPHASH); addtolist(tcp_port_types,1791,"ea1",TCPHASH); addtolist(tcp_port_types,1792,"ibm-dt-2",TCPHASH); addtolist(tcp_port_types,1793,"rsc-robot",TCPHASH); addtolist(tcp_port_types,1794,"cera-bcm",TCPHASH); addtolist(tcp_port_types,1795,"dpi-proxy",TCPHASH); addtolist(tcp_port_types,1796,"vocaltec-admin",TCPHASH); addtolist(tcp_port_types,1797,"uma",TCPHASH); addtolist(tcp_port_types,1798,"etp",TCPHASH); addtolist(tcp_port_types,1799,"netrisk",TCPHASH); addtolist(tcp_port_types,1800,"ansys-lm",TCPHASH); addtolist(tcp_port_types,1801,"msmq",TCPHASH); addtolist(tcp_port_types,1802,"concomp1",TCPHASH); addtolist(tcp_port_types,1803,"hp-hcip-gwy",TCPHASH); addtolist(tcp_port_types,1804,"enl",TCPHASH); addtolist(tcp_port_types,1805,"enl-name",TCPHASH); addtolist(tcp_port_types,1806,"musiconline",TCPHASH); addtolist(tcp_port_types,1807,"fhsp",TCPHASH); addtolist(tcp_port_types,1808,"oracle-vp2",TCPHASH); addtolist(tcp_port_types,1809,"oracle-vp1",TCPHASH); addtolist(tcp_port_types,1810,"jerand-lm",TCPHASH); addtolist(tcp_port_types,1811,"scientia-sdb",TCPHASH); addtolist(tcp_port_types,1812,"radius",TCPHASH); addtolist(tcp_port_types,1813,"radius-acct",TCPHASH); addtolist(tcp_port_types,1814,"tdp-suite",TCPHASH); addtolist(tcp_port_types,1815,"mmpft",TCPHASH); addtolist(tcp_port_types,1816,"harp",TCPHASH); addtolist(tcp_port_types,1817,"rkb-oscs",TCPHASH); addtolist(tcp_port_types,1818,"etftp",TCPHASH); addtolist(tcp_port_types,1819,"plato-lm",TCPHASH); addtolist(tcp_port_types,1820,"mcagent",TCPHASH); addtolist(tcp_port_types,1821,"donnyworld",TCPHASH); addtolist(tcp_port_types,1822,"es-elmd",TCPHASH); addtolist(tcp_port_types,1823,"unisys-lm",TCPHASH); addtolist(tcp_port_types,1824,"metrics-pas",TCPHASH); addtolist(tcp_port_types,1825,"direcpc-video",TCPHASH); addtolist(tcp_port_types,1826,"ardt",TCPHASH); addtolist(tcp_port_types,1827,"asi",TCPHASH); addtolist(tcp_port_types,1828,"itm-mcell-u",TCPHASH); addtolist(tcp_port_types,1829,"optika-emedia",TCPHASH); addtolist(tcp_port_types,1830,"net8-cman",TCPHASH); addtolist(tcp_port_types,1831,"myrtle",TCPHASH); addtolist(tcp_port_types,1832,"tht-treasure",TCPHASH); addtolist(tcp_port_types,1833,"udpradio",TCPHASH); addtolist(tcp_port_types,1834,"ardusuni",TCPHASH); addtolist(tcp_port_types,1835,"ardusmul",TCPHASH); addtolist(tcp_port_types,1836,"ste-smsc",TCPHASH); addtolist(tcp_port_types,1837,"csoft1",TCPHASH); addtolist(tcp_port_types,1838,"talnet",TCPHASH); addtolist(tcp_port_types,1839,"netopia-vo1",TCPHASH); addtolist(tcp_port_types,1840,"netopia-vo2",TCPHASH); addtolist(tcp_port_types,1841,"netopia-vo3",TCPHASH); addtolist(tcp_port_types,1842,"netopia-vo4",TCPHASH); addtolist(tcp_port_types,1843,"netopia-vo5",TCPHASH); addtolist(tcp_port_types,1844,"direcpc-dll",TCPHASH); addtolist(tcp_port_types,1845,"altalink",TCPHASH); addtolist(tcp_port_types,1846,"tunstall-pnc",TCPHASH); addtolist(tcp_port_types,1847,"slp-notify",TCPHASH); addtolist(tcp_port_types,1848,"fjdocdist",TCPHASH); addtolist(tcp_port_types,1849,"alpha-sms",TCPHASH); addtolist(tcp_port_types,1850,"gsi",TCPHASH); addtolist(tcp_port_types,1851,"ctcd",TCPHASH); addtolist(tcp_port_types,1852,"virtual-time",TCPHASH); addtolist(tcp_port_types,1853,"vids-avtp",TCPHASH); addtolist(tcp_port_types,1854,"buddy-draw",TCPHASH); addtolist(tcp_port_types,1855,"fiorano-rtrsvc",TCPHASH); addtolist(tcp_port_types,1856,"fiorano-msgsvc",TCPHASH); addtolist(tcp_port_types,1857,"datacaptor",TCPHASH); addtolist(tcp_port_types,1858,"privateark",TCPHASH); addtolist(tcp_port_types,1859,"gammafetchsvr",TCPHASH); addtolist(tcp_port_types,1860,"sunscalar-svc",TCPHASH); addtolist(tcp_port_types,1861,"lecroy-vicp",TCPHASH); addtolist(tcp_port_types,1862,"techra-server",TCPHASH); addtolist(tcp_port_types,1863,"msnp",TCPHASH); addtolist(tcp_port_types,1864,"paradym-31port",TCPHASH); addtolist(tcp_port_types,1865,"entp",TCPHASH); addtolist(tcp_port_types,1866,"swrmi",TCPHASH); addtolist(tcp_port_types,1867,"udrive",TCPHASH); addtolist(tcp_port_types,1868,"viziblebrowser",TCPHASH); addtolist(tcp_port_types,1869,"yestrader",TCPHASH); addtolist(tcp_port_types,1870,"sunscalar-dns",TCPHASH); addtolist(tcp_port_types,1871,"canocentral0",TCPHASH); addtolist(tcp_port_types,1872,"canocentral1",TCPHASH); addtolist(tcp_port_types,1873,"fjmpjps",TCPHASH); addtolist(tcp_port_types,1874,"fjswapsnp",TCPHASH); addtolist(tcp_port_types,1875,"westell-stats",TCPHASH); addtolist(tcp_port_types,1876,"ewcappsrv",TCPHASH); addtolist(tcp_port_types,1877,"hp-webqosdb",TCPHASH); addtolist(tcp_port_types,1878,"drmsmc",TCPHASH); addtolist(tcp_port_types,1879,"nettgain-nms",TCPHASH); addtolist(tcp_port_types,1880,"vsat-control",TCPHASH); addtolist(tcp_port_types,1881,"ibm-mqseries2",TCPHASH); addtolist(tcp_port_types,1882,"ecsqdmn",TCPHASH); addtolist(tcp_port_types,1883,"ibm-mqisdp",TCPHASH); addtolist(tcp_port_types,1884,"idmaps",TCPHASH); addtolist(tcp_port_types,1885,"vrtstrapserver",TCPHASH); addtolist(tcp_port_types,1886,"leoip",TCPHASH); addtolist(tcp_port_types,1887,"filex-lport",TCPHASH); addtolist(tcp_port_types,1888,"ncconfig",TCPHASH); addtolist(tcp_port_types,1889,"unify-adapter",TCPHASH); addtolist(tcp_port_types,1890,"wilkenlistener",TCPHASH); addtolist(tcp_port_types,1891,"childkey-notif",TCPHASH); addtolist(tcp_port_types,1892,"childkey-ctrl",TCPHASH); addtolist(tcp_port_types,1893,"elad",TCPHASH); addtolist(tcp_port_types,1894,"o2server-port",TCPHASH); addtolist(tcp_port_types,1895,"vista-4gl",TCPHASH); addtolist(tcp_port_types,1896,"b-novative-ls",TCPHASH); addtolist(tcp_port_types,1897,"metaagent",TCPHASH); addtolist(tcp_port_types,1898,"cymtec-port",TCPHASH); addtolist(tcp_port_types,1899,"mc2studios",TCPHASH); addtolist(tcp_port_types,1900,"ssdp",TCPHASH); addtolist(tcp_port_types,1901,"fjicl-tep-a",TCPHASH); addtolist(tcp_port_types,1902,"fjicl-tep-b",TCPHASH); addtolist(tcp_port_types,1903,"linkname",TCPHASH); addtolist(tcp_port_types,1904,"fjicl-tep-c",TCPHASH); addtolist(tcp_port_types,1905,"sugp",TCPHASH); addtolist(tcp_port_types,1906,"tpmd",TCPHASH); addtolist(tcp_port_types,1907,"intrastar",TCPHASH); addtolist(tcp_port_types,1908,"dawn",TCPHASH); addtolist(tcp_port_types,1909,"global-wlink",TCPHASH); addtolist(tcp_port_types,1910,"ultrabac",TCPHASH); addtolist(tcp_port_types,1911,"mtp",TCPHASH); addtolist(tcp_port_types,1912,"rhp-iibp",TCPHASH); addtolist(tcp_port_types,1913,"armadp",TCPHASH); addtolist(tcp_port_types,1914,"elm-momentum",TCPHASH); addtolist(tcp_port_types,1915,"facelink",TCPHASH); addtolist(tcp_port_types,1916,"persona",TCPHASH); addtolist(tcp_port_types,1917,"noagent",TCPHASH); addtolist(tcp_port_types,1918,"can-nds",TCPHASH); addtolist(tcp_port_types,1919,"can-dch",TCPHASH); addtolist(tcp_port_types,1920,"can-ferret",TCPHASH); addtolist(tcp_port_types,1921,"noadmin",TCPHASH); addtolist(tcp_port_types,1922,"tapestry",TCPHASH); addtolist(tcp_port_types,1923,"spice",TCPHASH); addtolist(tcp_port_types,1924,"xiip",TCPHASH); addtolist(tcp_port_types,1925,"discovery-port",TCPHASH); addtolist(tcp_port_types,1926,"egs",TCPHASH); addtolist(tcp_port_types,1927,"videte-cipc",TCPHASH); addtolist(tcp_port_types,1928,"emsd-port",TCPHASH); addtolist(tcp_port_types,1929,"bandwiz-system",TCPHASH); addtolist(tcp_port_types,1930,"driveappserver",TCPHASH); addtolist(tcp_port_types,1931,"amdsched",TCPHASH); addtolist(tcp_port_types,1932,"ctt-broker",TCPHASH); addtolist(tcp_port_types,1941,"dic-aida",TCPHASH); addtolist(tcp_port_types,1944,"close-combat",TCPHASH); addtolist(tcp_port_types,1945,"dialogic-elmd",TCPHASH); addtolist(tcp_port_types,1946,"tekpls",TCPHASH); addtolist(tcp_port_types,1947,"hlserver",TCPHASH); addtolist(tcp_port_types,1948,"eye2eye",TCPHASH); addtolist(tcp_port_types,1949,"ismaeasdaqlive",TCPHASH); addtolist(tcp_port_types,1950,"ismaeasdaqtest",TCPHASH); addtolist(tcp_port_types,1951,"bcs-lmserver",TCPHASH); addtolist(tcp_port_types,1952,"mpnjsc",TCPHASH); addtolist(tcp_port_types,1953,"rapidbase",TCPHASH); addtolist(tcp_port_types,1957,"unix-status",TCPHASH); addtolist(tcp_port_types,1960,"nasmanager",TCPHASH); addtolist(tcp_port_types,1961,"bts-appserver",TCPHASH); addtolist(tcp_port_types,1962,"biap-mp",TCPHASH); addtolist(tcp_port_types,1963,"webmachine",TCPHASH); addtolist(tcp_port_types,1964,"solid-e-engine",TCPHASH); addtolist(tcp_port_types,1965,"tivoli-npm",TCPHASH); addtolist(tcp_port_types,1966,"slush",TCPHASH); addtolist(tcp_port_types,1967,"sns-quote",TCPHASH); addtolist(tcp_port_types,1972,"intersys-cache",TCPHASH); addtolist(tcp_port_types,1973,"dlsrap",TCPHASH); addtolist(tcp_port_types,1974,"drp",TCPHASH); addtolist(tcp_port_types,1975,"tcoflashagent",TCPHASH); addtolist(tcp_port_types,1976,"tcoregagent",TCPHASH); addtolist(tcp_port_types,1977,"tcoaddressbook",TCPHASH); addtolist(tcp_port_types,1978,"unisql",TCPHASH); addtolist(tcp_port_types,1979,"unisql-java",TCPHASH); addtolist(tcp_port_types,1984,"bb",TCPHASH); addtolist(tcp_port_types,1985,"hsrp",TCPHASH); addtolist(tcp_port_types,1986,"licensedaemon",TCPHASH); addtolist(tcp_port_types,1987,"tr-rsrb-p1",TCPHASH); addtolist(tcp_port_types,1988,"tr-rsrb-p2",TCPHASH); addtolist(tcp_port_types,1989,"tr-rsrb-p3",TCPHASH); addtolist(tcp_port_types,1989,"mshnet",TCPHASH); addtolist(tcp_port_types,1990,"stun-p1",TCPHASH); addtolist(tcp_port_types,1991,"stun-p2",TCPHASH); addtolist(tcp_port_types,1992,"stun-p3",TCPHASH); addtolist(tcp_port_types,1992,"ipsendmsg",TCPHASH); addtolist(tcp_port_types,1993,"snmp-tcp-port",TCPHASH); addtolist(tcp_port_types,1994,"stun-port",TCPHASH); addtolist(tcp_port_types,1995,"perf-port",TCPHASH); addtolist(tcp_port_types,1996,"tr-rsrb-port",TCPHASH); addtolist(tcp_port_types,1997,"gdp-port",TCPHASH); addtolist(tcp_port_types,1998,"x25-svc-port",TCPHASH); addtolist(tcp_port_types,1999,"tcp-id-port",TCPHASH); addtolist(tcp_port_types,2000,"callbook",TCPHASH); addtolist(tcp_port_types,2001,"dc",TCPHASH); addtolist(tcp_port_types,2002,"globe",TCPHASH); addtolist(tcp_port_types,2004,"mailbox",TCPHASH); addtolist(tcp_port_types,2005,"berknet",TCPHASH); addtolist(tcp_port_types,2006,"invokator",TCPHASH); addtolist(tcp_port_types,2007,"dectalk",TCPHASH); addtolist(tcp_port_types,2008,"conf",TCPHASH); addtolist(tcp_port_types,2009,"news",TCPHASH); addtolist(tcp_port_types,2010,"search",TCPHASH); addtolist(tcp_port_types,2011,"raid-cc",TCPHASH); addtolist(tcp_port_types,2012,"ttyinfo",TCPHASH); addtolist(tcp_port_types,2013,"raid-am",TCPHASH); addtolist(tcp_port_types,2014,"troff",TCPHASH); addtolist(tcp_port_types,2015,"cypress",TCPHASH); addtolist(tcp_port_types,2016,"bootserver",TCPHASH); addtolist(tcp_port_types,2017,"cypress-stat",TCPHASH); addtolist(tcp_port_types,2018,"terminaldb",TCPHASH); addtolist(tcp_port_types,2019,"whosockami",TCPHASH); addtolist(tcp_port_types,2020,"xinupageserver",TCPHASH); addtolist(tcp_port_types,2021,"servexec",TCPHASH); addtolist(tcp_port_types,2022,"down",TCPHASH); addtolist(tcp_port_types,2023,"xinuexpansion3",TCPHASH); addtolist(tcp_port_types,2024,"xinuexpansion4",TCPHASH); addtolist(tcp_port_types,2025,"ellpack",TCPHASH); addtolist(tcp_port_types,2026,"scrabble",TCPHASH); addtolist(tcp_port_types,2027,"shadowserver",TCPHASH); addtolist(tcp_port_types,2028,"submitserver",TCPHASH); addtolist(tcp_port_types,2030,"device2",TCPHASH); addtolist(tcp_port_types,2032,"blackboard",TCPHASH); addtolist(tcp_port_types,2033,"glogger",TCPHASH); addtolist(tcp_port_types,2034,"scoremgr",TCPHASH); addtolist(tcp_port_types,2035,"imsldoc",TCPHASH); addtolist(tcp_port_types,2038,"objectmanager",TCPHASH); addtolist(tcp_port_types,2040,"lam",TCPHASH); addtolist(tcp_port_types,2041,"interbase",TCPHASH); addtolist(tcp_port_types,2042,"isis",TCPHASH); addtolist(tcp_port_types,2043,"isis-bcast",TCPHASH); addtolist(tcp_port_types,2044,"rimsl",TCPHASH); addtolist(tcp_port_types,2045,"cdfunc",TCPHASH); addtolist(tcp_port_types,2046,"sdfunc",TCPHASH); addtolist(tcp_port_types,2047,"dls",TCPHASH); addtolist(tcp_port_types,2048,"dls-monitor",TCPHASH); addtolist(tcp_port_types,2049,"shilp",TCPHASH); addtolist(tcp_port_types,2049,"nfs",TCPHASH); addtolist(tcp_port_types,2065,"dlsrpn",TCPHASH); addtolist(tcp_port_types,2067,"dlswpn",TCPHASH); addtolist(tcp_port_types,2087,"eli",TCPHASH); addtolist(tcp_port_types,2089,"sep",TCPHASH); addtolist(tcp_port_types,2090,"lrp",TCPHASH); addtolist(tcp_port_types,2091,"prp",TCPHASH); addtolist(tcp_port_types,2092,"descent3",TCPHASH); addtolist(tcp_port_types,2093,"nbx-cc",TCPHASH); addtolist(tcp_port_types,2094,"nbx-au",TCPHASH); addtolist(tcp_port_types,2095,"nbx-ser",TCPHASH); addtolist(tcp_port_types,2096,"nbx-dir",TCPHASH); addtolist(tcp_port_types,2097,"jetformpreview",TCPHASH); addtolist(tcp_port_types,2098,"dialog-port",TCPHASH); addtolist(tcp_port_types,2099,"h2250-annex-g",TCPHASH); addtolist(tcp_port_types,2100,"amiganetfs",TCPHASH); addtolist(tcp_port_types,2101,"rtcm-sc104",TCPHASH); addtolist(tcp_port_types,2102,"zephyr-srv",TCPHASH); addtolist(tcp_port_types,2103,"zephyr-clt",TCPHASH); addtolist(tcp_port_types,2104,"zephyr-hm",TCPHASH); addtolist(tcp_port_types,2105,"minipay",TCPHASH); addtolist(tcp_port_types,2106,"mzap",TCPHASH); addtolist(tcp_port_types,2107,"bintec-admin",TCPHASH); addtolist(tcp_port_types,2108,"comcam",TCPHASH); addtolist(tcp_port_types,2109,"ergolight",TCPHASH); addtolist(tcp_port_types,2110,"umsp",TCPHASH); addtolist(tcp_port_types,2111,"dsatp",TCPHASH); addtolist(tcp_port_types,2112,"idonix-metanet",TCPHASH); addtolist(tcp_port_types,2113,"hsl-storm",TCPHASH); addtolist(tcp_port_types,2114,"newheights",TCPHASH); addtolist(tcp_port_types,2115,"kdm",TCPHASH); addtolist(tcp_port_types,2116,"ccowcmr",TCPHASH); addtolist(tcp_port_types,2117,"mentaclient",TCPHASH); addtolist(tcp_port_types,2118,"mentaserver",TCPHASH); addtolist(tcp_port_types,2119,"gsigatekeeper",TCPHASH); addtolist(tcp_port_types,2120,"qencp",TCPHASH); addtolist(tcp_port_types,2121,"scientia-ssdb",TCPHASH); addtolist(tcp_port_types,2122,"caupc-remote",TCPHASH); addtolist(tcp_port_types,2123,"gtp-control",TCPHASH); addtolist(tcp_port_types,2124,"elatelink",TCPHASH); addtolist(tcp_port_types,2125,"lockstep",TCPHASH); addtolist(tcp_port_types,2126,"pktcable-cops",TCPHASH); addtolist(tcp_port_types,2127,"index-pc-wb",TCPHASH); addtolist(tcp_port_types,2128,"net-steward",TCPHASH); addtolist(tcp_port_types,2129,"cs-live",TCPHASH); addtolist(tcp_port_types,2130,"swc-xds",TCPHASH); addtolist(tcp_port_types,2131,"avantageb2b",TCPHASH); addtolist(tcp_port_types,2132,"avail-epmap",TCPHASH); addtolist(tcp_port_types,2133,"zymed-zpp",TCPHASH); addtolist(tcp_port_types,2134,"avenue",TCPHASH); addtolist(tcp_port_types,2135,"gris",TCPHASH); addtolist(tcp_port_types,2136,"appworxsrv",TCPHASH); addtolist(tcp_port_types,2137,"connect",TCPHASH); addtolist(tcp_port_types,2138,"unbind-cluster",TCPHASH); addtolist(tcp_port_types,2139,"ias-auth",TCPHASH); addtolist(tcp_port_types,2140,"ias-reg",TCPHASH); addtolist(tcp_port_types,2141,"ias-admind",TCPHASH); addtolist(tcp_port_types,2142,"tdm-over-ip",TCPHASH); addtolist(tcp_port_types,2143,"lv-jc",TCPHASH); addtolist(tcp_port_types,2144,"lv-ffx",TCPHASH); addtolist(tcp_port_types,2145,"lv-pici",TCPHASH); addtolist(tcp_port_types,2146,"lv-not",TCPHASH); addtolist(tcp_port_types,2147,"lv-auth",TCPHASH); addtolist(tcp_port_types,2148,"veritas-ucl",TCPHASH); addtolist(tcp_port_types,2149,"acptsys",TCPHASH); addtolist(tcp_port_types,2150,"dynamic3d",TCPHASH); addtolist(tcp_port_types,2151,"docent",TCPHASH); addtolist(tcp_port_types,2152,"gtp-user",TCPHASH); addtolist(tcp_port_types,2165,"x-bone-api",TCPHASH); addtolist(tcp_port_types,2166,"iwserver",TCPHASH); addtolist(tcp_port_types,2180,"mc-gt-srv",TCPHASH); addtolist(tcp_port_types,2181,"eforward",TCPHASH); addtolist(tcp_port_types,2200,"ici",TCPHASH); addtolist(tcp_port_types,2201,"ats",TCPHASH); addtolist(tcp_port_types,2202,"imtc-map",TCPHASH); addtolist(tcp_port_types,2213,"kali",TCPHASH); addtolist(tcp_port_types,2220,"netiq",TCPHASH); addtolist(tcp_port_types,2221,"rockwell-csp1",TCPHASH); addtolist(tcp_port_types,2222,"rockwell-csp2",TCPHASH); addtolist(tcp_port_types,2223,"rockwell-csp3",TCPHASH); addtolist(tcp_port_types,2232,"ivs-video",TCPHASH); addtolist(tcp_port_types,2233,"infocrypt",TCPHASH); addtolist(tcp_port_types,2234,"directplay",TCPHASH); addtolist(tcp_port_types,2235,"sercomm-wlink",TCPHASH); addtolist(tcp_port_types,2236,"nani",TCPHASH); addtolist(tcp_port_types,2237,"optech-port1-lm",TCPHASH); addtolist(tcp_port_types,2238,"aviva-sna",TCPHASH); addtolist(tcp_port_types,2239,"imagequery",TCPHASH); addtolist(tcp_port_types,2240,"recipe",TCPHASH); addtolist(tcp_port_types,2241,"ivsd",TCPHASH); addtolist(tcp_port_types,2242,"foliocorp",TCPHASH); addtolist(tcp_port_types,2243,"magicom",TCPHASH); addtolist(tcp_port_types,2244,"nmsserver",TCPHASH); addtolist(tcp_port_types,2245,"hao",TCPHASH); addtolist(tcp_port_types,2250,"remote-collab",TCPHASH); addtolist(tcp_port_types,2255,"vrtp",TCPHASH); addtolist(tcp_port_types,2279,"xmquery",TCPHASH); addtolist(tcp_port_types,2280,"lnvpoller",TCPHASH); addtolist(tcp_port_types,2281,"lnvconsole",TCPHASH); addtolist(tcp_port_types,2282,"lnvalarm",TCPHASH); addtolist(tcp_port_types,2283,"lnvstatus",TCPHASH); addtolist(tcp_port_types,2284,"lnvmaps",TCPHASH); addtolist(tcp_port_types,2285,"lnvmailmon",TCPHASH); addtolist(tcp_port_types,2286,"nas-metering",TCPHASH); addtolist(tcp_port_types,2287,"dna",TCPHASH); addtolist(tcp_port_types,2288,"netml",TCPHASH); addtolist(tcp_port_types,2294,"konshus-lm",TCPHASH); addtolist(tcp_port_types,2295,"advant-lm",TCPHASH); addtolist(tcp_port_types,2296,"theta-lm",TCPHASH); addtolist(tcp_port_types,2297,"d2k-datamover1",TCPHASH); addtolist(tcp_port_types,2298,"d2k-datamover2",TCPHASH); addtolist(tcp_port_types,2299,"pc-telecommute",TCPHASH); addtolist(tcp_port_types,2300,"cvmmon",TCPHASH); addtolist(tcp_port_types,2301,"cpq-wbem",TCPHASH); addtolist(tcp_port_types,2302,"binderysupport",TCPHASH); addtolist(tcp_port_types,2303,"proxy-gateway",TCPHASH); addtolist(tcp_port_types,2304,"attachmate-uts",TCPHASH); addtolist(tcp_port_types,2305,"mt-scaleserver",TCPHASH); addtolist(tcp_port_types,2306,"tappi-boxnet",TCPHASH); addtolist(tcp_port_types,2307,"pehelp",TCPHASH); addtolist(tcp_port_types,2308,"sdhelp",TCPHASH); addtolist(tcp_port_types,2309,"sdserver",TCPHASH); addtolist(tcp_port_types,2310,"sdclient",TCPHASH); addtolist(tcp_port_types,2311,"messageservice",TCPHASH); addtolist(tcp_port_types,2313,"iapp",TCPHASH); addtolist(tcp_port_types,2314,"cr-websystems",TCPHASH); addtolist(tcp_port_types,2315,"precise-sft",TCPHASH); addtolist(tcp_port_types,2316,"sent-lm",TCPHASH); addtolist(tcp_port_types,2317,"attachmate-g32",TCPHASH); addtolist(tcp_port_types,2318,"cadencecontrol",TCPHASH); addtolist(tcp_port_types,2319,"infolibria",TCPHASH); addtolist(tcp_port_types,2320,"siebel-ns",TCPHASH); addtolist(tcp_port_types,2321,"rdlap",TCPHASH); addtolist(tcp_port_types,2322,"ofsd",TCPHASH); addtolist(tcp_port_types,2323,"3d-nfsd",TCPHASH); addtolist(tcp_port_types,2324,"cosmocall",TCPHASH); addtolist(tcp_port_types,2325,"designspace-lm",TCPHASH); addtolist(tcp_port_types,2326,"idcp",TCPHASH); addtolist(tcp_port_types,2327,"xingcsm",TCPHASH); addtolist(tcp_port_types,2328,"netrix-sftm",TCPHASH); addtolist(tcp_port_types,2329,"nvd",TCPHASH); addtolist(tcp_port_types,2330,"tscchat",TCPHASH); addtolist(tcp_port_types,2331,"agentview",TCPHASH); addtolist(tcp_port_types,2332,"rcc-host",TCPHASH); addtolist(tcp_port_types,2333,"snapp",TCPHASH); addtolist(tcp_port_types,2334,"ace-client",TCPHASH); addtolist(tcp_port_types,2335,"ace-proxy",TCPHASH); addtolist(tcp_port_types,2336,"appleugcontrol",TCPHASH); addtolist(tcp_port_types,2337,"ideesrv",TCPHASH); addtolist(tcp_port_types,2338,"norton-lambert",TCPHASH); addtolist(tcp_port_types,2339,"3com-webview",TCPHASH); addtolist(tcp_port_types,2340,"wrs_registry",TCPHASH); addtolist(tcp_port_types,2341,"xiostatus",TCPHASH); addtolist(tcp_port_types,2342,"manage-exec",TCPHASH); addtolist(tcp_port_types,2343,"nati-logos",TCPHASH); addtolist(tcp_port_types,2344,"fcmsys",TCPHASH); addtolist(tcp_port_types,2345,"dbm",TCPHASH); addtolist(tcp_port_types,2346,"redstorm_join",TCPHASH); addtolist(tcp_port_types,2347,"redstorm_find",TCPHASH); addtolist(tcp_port_types,2348,"redstorm_info",TCPHASH); addtolist(tcp_port_types,2349,"redstorm_diag",TCPHASH); addtolist(tcp_port_types,2350,"psbserver",TCPHASH); addtolist(tcp_port_types,2351,"psrserver",TCPHASH); addtolist(tcp_port_types,2352,"pslserver",TCPHASH); addtolist(tcp_port_types,2353,"pspserver",TCPHASH); addtolist(tcp_port_types,2354,"psprserver",TCPHASH); addtolist(tcp_port_types,2355,"psdbserver",TCPHASH); addtolist(tcp_port_types,2356,"gxtelmd",TCPHASH); addtolist(tcp_port_types,2357,"unihub-server",TCPHASH); addtolist(tcp_port_types,2358,"futrix",TCPHASH); addtolist(tcp_port_types,2359,"flukeserver",TCPHASH); addtolist(tcp_port_types,2360,"nexstorindltd",TCPHASH); addtolist(tcp_port_types,2361,"tl1",TCPHASH); addtolist(tcp_port_types,2362,"digiman",TCPHASH); addtolist(tcp_port_types,2363,"mediacntrlnfsd",TCPHASH); addtolist(tcp_port_types,2364,"oi-2000",TCPHASH); addtolist(tcp_port_types,2365,"dbref",TCPHASH); addtolist(tcp_port_types,2366,"qip-login",TCPHASH); addtolist(tcp_port_types,2367,"service-ctrl",TCPHASH); addtolist(tcp_port_types,2368,"opentable",TCPHASH); addtolist(tcp_port_types,2369,"acs2000-dsp",TCPHASH); addtolist(tcp_port_types,2370,"l3-hbmon",TCPHASH); addtolist(tcp_port_types,2381,"compaq-https",TCPHASH); addtolist(tcp_port_types,2382,"ms-olap3",TCPHASH); addtolist(tcp_port_types,2383,"ms-olap4",TCPHASH); addtolist(tcp_port_types,2384,"sd-request",TCPHASH); addtolist(tcp_port_types,2389,"ovsessionmgr",TCPHASH); addtolist(tcp_port_types,2390,"rsmtp",TCPHASH); addtolist(tcp_port_types,2391,"3com-net-mgmt",TCPHASH); addtolist(tcp_port_types,2392,"tacticalauth",TCPHASH); addtolist(tcp_port_types,2393,"ms-olap1",TCPHASH); addtolist(tcp_port_types,2394,"ms-olap2",TCPHASH); addtolist(tcp_port_types,2395,"lan900_remote",TCPHASH); addtolist(tcp_port_types,2396,"wusage",TCPHASH); addtolist(tcp_port_types,2397,"ncl",TCPHASH); addtolist(tcp_port_types,2398,"orbiter",TCPHASH); addtolist(tcp_port_types,2399,"fmpro-fdal",TCPHASH); addtolist(tcp_port_types,2400,"opequus-server",TCPHASH); addtolist(tcp_port_types,2401,"cvspserver",TCPHASH); addtolist(tcp_port_types,2402,"taskmaster2000",TCPHASH); addtolist(tcp_port_types,2403,"taskmaster2000",TCPHASH); addtolist(tcp_port_types,2404,"iec870-5-104",TCPHASH); addtolist(tcp_port_types,2405,"trc-netpoll",TCPHASH); addtolist(tcp_port_types,2406,"jediserver",TCPHASH); addtolist(tcp_port_types,2407,"orion",TCPHASH); addtolist(tcp_port_types,2408,"optimanet",TCPHASH); addtolist(tcp_port_types,2409,"sns-protocol",TCPHASH); addtolist(tcp_port_types,2410,"vrts-registry",TCPHASH); addtolist(tcp_port_types,2411,"netwave-ap-mgmt",TCPHASH); addtolist(tcp_port_types,2412,"cdn",TCPHASH); addtolist(tcp_port_types,2413,"orion-rmi-reg",TCPHASH); addtolist(tcp_port_types,2414,"beeyond",TCPHASH); addtolist(tcp_port_types,2415,"comtest",TCPHASH); addtolist(tcp_port_types,2416,"rmtserver",TCPHASH); addtolist(tcp_port_types,2417,"composit-server",TCPHASH); addtolist(tcp_port_types,2418,"cas",TCPHASH); addtolist(tcp_port_types,2419,"attachmate-s2s",TCPHASH); addtolist(tcp_port_types,2420,"dslremote-mgmt",TCPHASH); addtolist(tcp_port_types,2421,"g-talk",TCPHASH); addtolist(tcp_port_types,2422,"crmsbits",TCPHASH); addtolist(tcp_port_types,2423,"rnrp",TCPHASH); addtolist(tcp_port_types,2424,"kofax-svr",TCPHASH); addtolist(tcp_port_types,2425,"fjitsuappmgr",TCPHASH); addtolist(tcp_port_types,2426,"applianttcp",TCPHASH); addtolist(tcp_port_types,2427,"mgcp-gateway",TCPHASH); addtolist(tcp_port_types,2428,"ott",TCPHASH); addtolist(tcp_port_types,2429,"ft-role",TCPHASH); addtolist(tcp_port_types,2430,"venus",TCPHASH); addtolist(tcp_port_types,2431,"venus-se",TCPHASH); addtolist(tcp_port_types,2432,"codasrv",TCPHASH); addtolist(tcp_port_types,2433,"codasrv-se",TCPHASH); addtolist(tcp_port_types,2434,"pxc-epmap",TCPHASH); addtolist(tcp_port_types,2435,"optilogic",TCPHASH); addtolist(tcp_port_types,2436,"topx",TCPHASH); addtolist(tcp_port_types,2437,"unicontrol",TCPHASH); addtolist(tcp_port_types,2438,"msp",TCPHASH); addtolist(tcp_port_types,2439,"sybasedbsynch",TCPHASH); addtolist(tcp_port_types,2440,"spearway",TCPHASH); addtolist(tcp_port_types,2441,"pvsw-inet",TCPHASH); addtolist(tcp_port_types,2442,"netangel",TCPHASH); addtolist(tcp_port_types,2443,"powerclientcsf",TCPHASH); addtolist(tcp_port_types,2444,"btpp2sectrans",TCPHASH); addtolist(tcp_port_types,2445,"dtn1",TCPHASH); addtolist(tcp_port_types,2446,"bues_service",TCPHASH); addtolist(tcp_port_types,2447,"ovwdb",TCPHASH); addtolist(tcp_port_types,2448,"hpppssvr",TCPHASH); addtolist(tcp_port_types,2449,"ratl",TCPHASH); addtolist(tcp_port_types,2450,"netadmin",TCPHASH); addtolist(tcp_port_types,2451,"netchat",TCPHASH); addtolist(tcp_port_types,2452,"snifferclient",TCPHASH); addtolist(tcp_port_types,2453,"madge-om",TCPHASH); addtolist(tcp_port_types,2454,"indx-dds",TCPHASH); addtolist(tcp_port_types,2455,"wago-io-system",TCPHASH); addtolist(tcp_port_types,2456,"altav-remmgt",TCPHASH); addtolist(tcp_port_types,2457,"rapido-ip",TCPHASH); addtolist(tcp_port_types,2458,"griffin",TCPHASH); addtolist(tcp_port_types,2459,"community",TCPHASH); addtolist(tcp_port_types,2460,"ms-theater",TCPHASH); addtolist(tcp_port_types,2461,"qadmifoper",TCPHASH); addtolist(tcp_port_types,2462,"qadmifevent",TCPHASH); addtolist(tcp_port_types,2463,"symbios-raid",TCPHASH); addtolist(tcp_port_types,2464,"direcpc-si",TCPHASH); addtolist(tcp_port_types,2465,"lbm",TCPHASH); addtolist(tcp_port_types,2466,"lbf",TCPHASH); addtolist(tcp_port_types,2467,"high-criteria",TCPHASH); addtolist(tcp_port_types,2468,"qip-msgd",TCPHASH); addtolist(tcp_port_types,2469,"mti-tcs-comm",TCPHASH); addtolist(tcp_port_types,2470,"taskman-port",TCPHASH); addtolist(tcp_port_types,2471,"seaodbc",TCPHASH); addtolist(tcp_port_types,2472,"c3",TCPHASH); addtolist(tcp_port_types,2473,"aker-cdp",TCPHASH); addtolist(tcp_port_types,2474,"vitalanalysis",TCPHASH); addtolist(tcp_port_types,2475,"ace-server",TCPHASH); addtolist(tcp_port_types,2476,"ace-svr-prop",TCPHASH); addtolist(tcp_port_types,2477,"ssm-cvs",TCPHASH); addtolist(tcp_port_types,2478,"ssm-cssps",TCPHASH); addtolist(tcp_port_types,2479,"ssm-els",TCPHASH); addtolist(tcp_port_types,2480,"lingwood",TCPHASH); addtolist(tcp_port_types,2481,"giop",TCPHASH); addtolist(tcp_port_types,2482,"giop-ssl",TCPHASH); addtolist(tcp_port_types,2483,"ttc",TCPHASH); addtolist(tcp_port_types,2484,"ttc-ssl",TCPHASH); addtolist(tcp_port_types,2485,"netobjects1",TCPHASH); addtolist(tcp_port_types,2486,"netobjects2",TCPHASH); addtolist(tcp_port_types,2487,"pns",TCPHASH); addtolist(tcp_port_types,2488,"moy-corp",TCPHASH); addtolist(tcp_port_types,2489,"tsilb",TCPHASH); addtolist(tcp_port_types,2490,"qip-qdhcp",TCPHASH); addtolist(tcp_port_types,2491,"conclave-cpp",TCPHASH); addtolist(tcp_port_types,2492,"groove",TCPHASH); addtolist(tcp_port_types,2493,"talarian-mqs",TCPHASH); addtolist(tcp_port_types,2494,"bmc-ar",TCPHASH); addtolist(tcp_port_types,2495,"fast-rem-serv",TCPHASH); addtolist(tcp_port_types,2496,"dirgis",TCPHASH); addtolist(tcp_port_types,2497,"quaddb",TCPHASH); addtolist(tcp_port_types,2498,"odn-castraq",TCPHASH); addtolist(tcp_port_types,2499,"unicontrol",TCPHASH); addtolist(tcp_port_types,2500,"rtsserv",TCPHASH); addtolist(tcp_port_types,2501,"rtsclient",TCPHASH); addtolist(tcp_port_types,2502,"kentrox-prot",TCPHASH); addtolist(tcp_port_types,2503,"nms-dpnss",TCPHASH); addtolist(tcp_port_types,2504,"wlbs",TCPHASH); addtolist(tcp_port_types,2505,"torque-traffic",TCPHASH); addtolist(tcp_port_types,2506,"jbroker",TCPHASH); addtolist(tcp_port_types,2507,"spock",TCPHASH); addtolist(tcp_port_types,2508,"jdatastore",TCPHASH); addtolist(tcp_port_types,2509,"fjmpss",TCPHASH); addtolist(tcp_port_types,2510,"fjappmgrbulk",TCPHASH); addtolist(tcp_port_types,2511,"metastorm",TCPHASH); addtolist(tcp_port_types,2512,"citrixima",TCPHASH); addtolist(tcp_port_types,2513,"citrixadmin",TCPHASH); addtolist(tcp_port_types,2514,"facsys-ntp",TCPHASH); addtolist(tcp_port_types,2515,"facsys-router",TCPHASH); addtolist(tcp_port_types,2516,"maincontrol",TCPHASH); addtolist(tcp_port_types,2517,"call-sig-trans",TCPHASH); addtolist(tcp_port_types,2518,"willy",TCPHASH); addtolist(tcp_port_types,2519,"globmsgsvc",TCPHASH); addtolist(tcp_port_types,2520,"pvsw",TCPHASH); addtolist(tcp_port_types,2521,"adaptecmgr",TCPHASH); addtolist(tcp_port_types,2522,"windb",TCPHASH); addtolist(tcp_port_types,2523,"qke-llc-v3",TCPHASH); addtolist(tcp_port_types,2524,"optiwave-lm",TCPHASH); addtolist(tcp_port_types,2525,"ms-v-worlds",TCPHASH); addtolist(tcp_port_types,2526,"ema-sent-lm",TCPHASH); addtolist(tcp_port_types,2527,"iqserver",TCPHASH); addtolist(tcp_port_types,2528,"ncr_ccl",TCPHASH); addtolist(tcp_port_types,2529,"utsftp",TCPHASH); addtolist(tcp_port_types,2530,"vrcommerce",TCPHASH); addtolist(tcp_port_types,2531,"ito-e-gui",TCPHASH); addtolist(tcp_port_types,2532,"ovtopmd",TCPHASH); addtolist(tcp_port_types,2533,"snifferserver",TCPHASH); addtolist(tcp_port_types,2534,"combox-web-acc",TCPHASH); addtolist(tcp_port_types,2535,"madcap",TCPHASH); addtolist(tcp_port_types,2536,"btpp2audctr1",TCPHASH); addtolist(tcp_port_types,2537,"upgrade",TCPHASH); addtolist(tcp_port_types,2538,"vnwk-prapi",TCPHASH); addtolist(tcp_port_types,2539,"vsiadmin",TCPHASH); addtolist(tcp_port_types,2540,"lonworks",TCPHASH); addtolist(tcp_port_types,2541,"lonworks2",TCPHASH); addtolist(tcp_port_types,2542,"davinci",TCPHASH); addtolist(tcp_port_types,2543,"reftek",TCPHASH); addtolist(tcp_port_types,2544,"novell-zen",TCPHASH); addtolist(tcp_port_types,2544,"novell-zen",TCPHASH); addtolist(tcp_port_types,2545,"sis-emt",TCPHASH); addtolist(tcp_port_types,2546,"vytalvaultbrtp",TCPHASH); addtolist(tcp_port_types,2547,"vytalvaultvsmp",TCPHASH); addtolist(tcp_port_types,2548,"vytalvaultpipe",TCPHASH); addtolist(tcp_port_types,2549,"ipass",TCPHASH); addtolist(tcp_port_types,2550,"ads",TCPHASH); addtolist(tcp_port_types,2551,"isg-uda-server",TCPHASH); addtolist(tcp_port_types,2552,"call-logging",TCPHASH); addtolist(tcp_port_types,2553,"efidiningport",TCPHASH); addtolist(tcp_port_types,2554,"vcnet-link-v10",TCPHASH); addtolist(tcp_port_types,2555,"compaq-wcp",TCPHASH); addtolist(tcp_port_types,2556,"nicetec-nmsvc",TCPHASH); addtolist(tcp_port_types,2557,"nicetec-mgmt",TCPHASH); addtolist(tcp_port_types,2558,"pclemultimedia",TCPHASH); addtolist(tcp_port_types,2559,"lstp",TCPHASH); addtolist(tcp_port_types,2560,"labrat",TCPHASH); addtolist(tcp_port_types,2561,"mosaixcc",TCPHASH); addtolist(tcp_port_types,2562,"delibo",TCPHASH); addtolist(tcp_port_types,2563,"cti-redwood",TCPHASH); addtolist(tcp_port_types,2564,"hp-3000-telnet",TCPHASH); addtolist(tcp_port_types,2565,"coord-svr",TCPHASH); addtolist(tcp_port_types,2566,"pcs-pcw",TCPHASH); addtolist(tcp_port_types,2567,"clp",TCPHASH); addtolist(tcp_port_types,2568,"spamtrap",TCPHASH); addtolist(tcp_port_types,2569,"sonuscallsig",TCPHASH); addtolist(tcp_port_types,2570,"hs-port",TCPHASH); addtolist(tcp_port_types,2571,"cecsvc",TCPHASH); addtolist(tcp_port_types,2572,"ibp",TCPHASH); addtolist(tcp_port_types,2573,"trustestablish",TCPHASH); addtolist(tcp_port_types,2574,"blockade-bpsp",TCPHASH); addtolist(tcp_port_types,2575,"hl7",TCPHASH); addtolist(tcp_port_types,2576,"tclprodebugger",TCPHASH); addtolist(tcp_port_types,2577,"scipticslsrvr",TCPHASH); addtolist(tcp_port_types,2578,"rvs-isdn-dcp",TCPHASH); addtolist(tcp_port_types,2579,"mpfoncl",TCPHASH); addtolist(tcp_port_types,2580,"tributary",TCPHASH); addtolist(tcp_port_types,2581,"argis-te",TCPHASH); addtolist(tcp_port_types,2582,"argis-ds",TCPHASH); addtolist(tcp_port_types,2583,"mon",TCPHASH); addtolist(tcp_port_types,2584,"cyaserv",TCPHASH); addtolist(tcp_port_types,2585,"netx-server",TCPHASH); addtolist(tcp_port_types,2586,"netx-agent",TCPHASH); addtolist(tcp_port_types,2587,"masc",TCPHASH); addtolist(tcp_port_types,2588,"privilege",TCPHASH); addtolist(tcp_port_types,2589,"quartus-tcl",TCPHASH); addtolist(tcp_port_types,2590,"idotdist",TCPHASH); addtolist(tcp_port_types,2591,"maytagshuffle",TCPHASH); addtolist(tcp_port_types,2592,"netrek",TCPHASH); addtolist(tcp_port_types,2593,"mns-mail",TCPHASH); addtolist(tcp_port_types,2594,"dts",TCPHASH); addtolist(tcp_port_types,2595,"worldfusion1",TCPHASH); addtolist(tcp_port_types,2596,"worldfusion2",TCPHASH); addtolist(tcp_port_types,2597,"homesteadglory",TCPHASH); addtolist(tcp_port_types,2598,"citriximaclient",TCPHASH); addtolist(tcp_port_types,2599,"meridiandata",TCPHASH); addtolist(tcp_port_types,2600,"hpstgmgr",TCPHASH); addtolist(tcp_port_types,2601,"discp-client",TCPHASH); addtolist(tcp_port_types,2602,"discp-server",TCPHASH); addtolist(tcp_port_types,2603,"servicemeter",TCPHASH); addtolist(tcp_port_types,2604,"nsc-ccs",TCPHASH); addtolist(tcp_port_types,2605,"nsc-posa",TCPHASH); addtolist(tcp_port_types,2606,"netmon",TCPHASH); addtolist(tcp_port_types,2607,"connection",TCPHASH); addtolist(tcp_port_types,2608,"wag-service",TCPHASH); addtolist(tcp_port_types,2609,"system-monitor",TCPHASH); addtolist(tcp_port_types,2610,"versa-tek",TCPHASH); addtolist(tcp_port_types,2611,"lionhead",TCPHASH); addtolist(tcp_port_types,2612,"qpasa-agent",TCPHASH); addtolist(tcp_port_types,2613,"smntubootstrap",TCPHASH); addtolist(tcp_port_types,2614,"neveroffline",TCPHASH); addtolist(tcp_port_types,2615,"firepower",TCPHASH); addtolist(tcp_port_types,2616,"appswitch-emp",TCPHASH); addtolist(tcp_port_types,2617,"cmadmin",TCPHASH); addtolist(tcp_port_types,2618,"priority-e-com",TCPHASH); addtolist(tcp_port_types,2619,"bruce",TCPHASH); addtolist(tcp_port_types,2620,"lpsrecommender",TCPHASH); addtolist(tcp_port_types,2621,"miles-apart",TCPHASH); addtolist(tcp_port_types,2622,"metricadbc",TCPHASH); addtolist(tcp_port_types,2623,"lmdp",TCPHASH); addtolist(tcp_port_types,2624,"aria",TCPHASH); addtolist(tcp_port_types,2625,"blwnkl-port",TCPHASH); addtolist(tcp_port_types,2626,"gbjd816",TCPHASH); addtolist(tcp_port_types,2627,"moshebeeri",TCPHASH); addtolist(tcp_port_types,2628,"dict",TCPHASH); addtolist(tcp_port_types,2629,"sitaraserver",TCPHASH); addtolist(tcp_port_types,2630,"sitaramgmt",TCPHASH); addtolist(tcp_port_types,2631,"sitaradir",TCPHASH); addtolist(tcp_port_types,2632,"irdg-post",TCPHASH); addtolist(tcp_port_types,2633,"interintelli",TCPHASH); addtolist(tcp_port_types,2634,"pk-electronics",TCPHASH); addtolist(tcp_port_types,2635,"backburner",TCPHASH); addtolist(tcp_port_types,2636,"solve",TCPHASH); addtolist(tcp_port_types,2637,"imdocsvc",TCPHASH); addtolist(tcp_port_types,2638,"sybaseanywhere",TCPHASH); addtolist(tcp_port_types,2639,"aminet",TCPHASH); addtolist(tcp_port_types,2640,"sai_sentlm",TCPHASH); addtolist(tcp_port_types,2641,"hdl-srv",TCPHASH); addtolist(tcp_port_types,2642,"tragic",TCPHASH); addtolist(tcp_port_types,2643,"gte-samp",TCPHASH); addtolist(tcp_port_types,2644,"travsoft-ipx-t",TCPHASH); addtolist(tcp_port_types,2645,"novell-ipx-cmd",TCPHASH); addtolist(tcp_port_types,2646,"and-lm",TCPHASH); addtolist(tcp_port_types,2647,"syncserver",TCPHASH); addtolist(tcp_port_types,2648,"upsnotifyprot",TCPHASH); addtolist(tcp_port_types,2649,"vpsipport",TCPHASH); addtolist(tcp_port_types,2650,"eristwoguns",TCPHASH); addtolist(tcp_port_types,2651,"ebinsite",TCPHASH); addtolist(tcp_port_types,2652,"interpathpanel",TCPHASH); addtolist(tcp_port_types,2653,"sonus",TCPHASH); addtolist(tcp_port_types,2654,"corel_vncadmin",TCPHASH); addtolist(tcp_port_types,2655,"unglue",TCPHASH); addtolist(tcp_port_types,2656,"kana",TCPHASH); addtolist(tcp_port_types,2657,"sns-dispatcher",TCPHASH); addtolist(tcp_port_types,2658,"sns-admin",TCPHASH); addtolist(tcp_port_types,2659,"sns-query",TCPHASH); addtolist(tcp_port_types,2660,"gcmonitor",TCPHASH); addtolist(tcp_port_types,2661,"olhost",TCPHASH); addtolist(tcp_port_types,2662,"bintec-capi",TCPHASH); addtolist(tcp_port_types,2663,"bintec-tapi",TCPHASH); addtolist(tcp_port_types,2664,"patrol-mq-gm",TCPHASH); addtolist(tcp_port_types,2665,"patrol-mq-nm",TCPHASH); addtolist(tcp_port_types,2666,"extensis",TCPHASH); addtolist(tcp_port_types,2667,"alarm-clock-s",TCPHASH); addtolist(tcp_port_types,2668,"alarm-clock-c",TCPHASH); addtolist(tcp_port_types,2669,"toad",TCPHASH); addtolist(tcp_port_types,2670,"tve-announce",TCPHASH); addtolist(tcp_port_types,2671,"newlixreg",TCPHASH); addtolist(tcp_port_types,2672,"nhserver",TCPHASH); addtolist(tcp_port_types,2673,"firstcall42",TCPHASH); addtolist(tcp_port_types,2674,"ewnn",TCPHASH); addtolist(tcp_port_types,2675,"ttc-etap",TCPHASH); addtolist(tcp_port_types,2676,"simslink",TCPHASH); addtolist(tcp_port_types,2677,"gadgetgate1way",TCPHASH); addtolist(tcp_port_types,2678,"gadgetgate2way",TCPHASH); addtolist(tcp_port_types,2679,"syncserverssl",TCPHASH); addtolist(tcp_port_types,2680,"pxc-sapxom",TCPHASH); addtolist(tcp_port_types,2681,"mpnjsomb",TCPHASH); addtolist(tcp_port_types,2682,"srsp",TCPHASH); addtolist(tcp_port_types,2683,"ncdloadbalance",TCPHASH); addtolist(tcp_port_types,2684,"mpnjsosv",TCPHASH); addtolist(tcp_port_types,2685,"mpnjsocl",TCPHASH); addtolist(tcp_port_types,2686,"mpnjsomg",TCPHASH); addtolist(tcp_port_types,2687,"pq-lic-mgmt",TCPHASH); addtolist(tcp_port_types,2688,"md-cg-http",TCPHASH); addtolist(tcp_port_types,2689,"fastlynx",TCPHASH); addtolist(tcp_port_types,2690,"hp-nnm-data",TCPHASH); addtolist(tcp_port_types,2691,"itinternet",TCPHASH); addtolist(tcp_port_types,2692,"admins-lms",TCPHASH); addtolist(tcp_port_types,2693,"belarc-http",TCPHASH); addtolist(tcp_port_types,2694,"pwrsevent",TCPHASH); addtolist(tcp_port_types,2695,"vspread",TCPHASH); addtolist(tcp_port_types,2696,"unifyadmin",TCPHASH); addtolist(tcp_port_types,2697,"oce-snmp-trap",TCPHASH); addtolist(tcp_port_types,2698,"mck-ivpip",TCPHASH); addtolist(tcp_port_types,2699,"csoft-plusclnt",TCPHASH); addtolist(tcp_port_types,2700,"tqdata",TCPHASH); addtolist(tcp_port_types,2701,"sms-rcinfo",TCPHASH); addtolist(tcp_port_types,2702,"sms-xfer",TCPHASH); addtolist(tcp_port_types,2703,"sms-chat",TCPHASH); addtolist(tcp_port_types,2704,"sms-remctrl",TCPHASH); addtolist(tcp_port_types,2705,"sds-admin",TCPHASH); addtolist(tcp_port_types,2706,"ncdmirroring",TCPHASH); addtolist(tcp_port_types,2707,"emcsymapiport",TCPHASH); addtolist(tcp_port_types,2708,"banyan-net",TCPHASH); addtolist(tcp_port_types,2709,"supermon",TCPHASH); addtolist(tcp_port_types,2710,"sso-service",TCPHASH); addtolist(tcp_port_types,2711,"sso-control",TCPHASH); addtolist(tcp_port_types,2712,"aocp",TCPHASH); addtolist(tcp_port_types,2713,"raven1",TCPHASH); addtolist(tcp_port_types,2714,"raven2",TCPHASH); addtolist(tcp_port_types,2714,"raven2",TCPHASH); addtolist(tcp_port_types,2715,"hpstgmgr2",TCPHASH); addtolist(tcp_port_types,2716,"inova-ip-disco",TCPHASH); addtolist(tcp_port_types,2717,"pn-requester",TCPHASH); addtolist(tcp_port_types,2718,"pn-requester2",TCPHASH); addtolist(tcp_port_types,2719,"scan-change",TCPHASH); addtolist(tcp_port_types,2720,"wkars",TCPHASH); addtolist(tcp_port_types,2721,"smart-diagnose",TCPHASH); addtolist(tcp_port_types,2722,"proactivesrvr",TCPHASH); addtolist(tcp_port_types,2723,"watchdognt",TCPHASH); addtolist(tcp_port_types,2724,"qotps",TCPHASH); addtolist(tcp_port_types,2725,"msolap-ptp2",TCPHASH); addtolist(tcp_port_types,2726,"tams",TCPHASH); addtolist(tcp_port_types,2727,"mgcp-callagent",TCPHASH); addtolist(tcp_port_types,2728,"sqdr",TCPHASH); addtolist(tcp_port_types,2729,"tcim-control",TCPHASH); addtolist(tcp_port_types,2730,"nec-raidplus",TCPHASH); addtolist(tcp_port_types,2731,"netdragon-msngr",TCPHASH); addtolist(tcp_port_types,2732,"g5m",TCPHASH); addtolist(tcp_port_types,2733,"signet-ctf",TCPHASH); addtolist(tcp_port_types,2734,"ccs-software",TCPHASH); addtolist(tcp_port_types,2735,"netiq-mc",TCPHASH); addtolist(tcp_port_types,2736,"radwiz-nms-srv",TCPHASH); addtolist(tcp_port_types,2737,"srp-feedback",TCPHASH); addtolist(tcp_port_types,2738,"ndl-tcp-ois-gw",TCPHASH); addtolist(tcp_port_types,2739,"tn-timing",TCPHASH); addtolist(tcp_port_types,2740,"alarm",TCPHASH); addtolist(tcp_port_types,2741,"tsb",TCPHASH); addtolist(tcp_port_types,2742,"tsb2",TCPHASH); addtolist(tcp_port_types,2743,"murx",TCPHASH); addtolist(tcp_port_types,2744,"honyaku",TCPHASH); addtolist(tcp_port_types,2745,"urbisnet",TCPHASH); addtolist(tcp_port_types,2746,"cpudpencap",TCPHASH); addtolist(tcp_port_types,2747,"fjippol-swrly",TCPHASH); addtolist(tcp_port_types,2748,"fjippol-polsvr",TCPHASH); addtolist(tcp_port_types,2749,"fjippol-cnsl",TCPHASH); addtolist(tcp_port_types,2750,"fjippol-port1",TCPHASH); addtolist(tcp_port_types,2751,"fjippol-port2",TCPHASH); addtolist(tcp_port_types,2752,"rsisysaccess",TCPHASH); addtolist(tcp_port_types,2753,"de-spot",TCPHASH); addtolist(tcp_port_types,2754,"apollo-cc",TCPHASH); addtolist(tcp_port_types,2755,"expresspay",TCPHASH); addtolist(tcp_port_types,2756,"simplement-tie",TCPHASH); addtolist(tcp_port_types,2757,"cnrp",TCPHASH); addtolist(tcp_port_types,2758,"apollo-status",TCPHASH); addtolist(tcp_port_types,2759,"apollo-gms",TCPHASH); addtolist(tcp_port_types,2760,"sabams",TCPHASH); addtolist(tcp_port_types,2761,"dicom-iscl",TCPHASH); addtolist(tcp_port_types,2762,"dicom-tls",TCPHASH); addtolist(tcp_port_types,2763,"desktop-dna",TCPHASH); addtolist(tcp_port_types,2764,"data-insurance",TCPHASH); addtolist(tcp_port_types,2765,"qip-audup",TCPHASH); addtolist(tcp_port_types,2766,"compaq-scp",TCPHASH); addtolist(tcp_port_types,2767,"uadtc",TCPHASH); addtolist(tcp_port_types,2768,"uacs",TCPHASH); addtolist(tcp_port_types,2769,"singlept-mvs",TCPHASH); addtolist(tcp_port_types,2770,"veronica",TCPHASH); addtolist(tcp_port_types,2771,"vergencecm",TCPHASH); addtolist(tcp_port_types,2772,"auris",TCPHASH); addtolist(tcp_port_types,2773,"pcbakcup1",TCPHASH); addtolist(tcp_port_types,2774,"pcbakcup2",TCPHASH); addtolist(tcp_port_types,2775,"smpp",TCPHASH); addtolist(tcp_port_types,2776,"ridgeway1",TCPHASH); addtolist(tcp_port_types,2777,"ridgeway2",TCPHASH); addtolist(tcp_port_types,2778,"gwen-sonya",TCPHASH); addtolist(tcp_port_types,2779,"lbc-sync",TCPHASH); addtolist(tcp_port_types,2780,"lbc-control",TCPHASH); addtolist(tcp_port_types,2781,"whosells",TCPHASH); addtolist(tcp_port_types,2782,"everydayrc",TCPHASH); addtolist(tcp_port_types,2783,"aises",TCPHASH); addtolist(tcp_port_types,2784,"www-dev",TCPHASH); addtolist(tcp_port_types,2785,"aic-np",TCPHASH); addtolist(tcp_port_types,2786,"aic-oncrpc",TCPHASH); addtolist(tcp_port_types,2787,"piccolo",TCPHASH); addtolist(tcp_port_types,2788,"fryeserv",TCPHASH); addtolist(tcp_port_types,2789,"media-agent",TCPHASH); addtolist(tcp_port_types,2790,"plgproxy",TCPHASH); addtolist(tcp_port_types,2791,"mtport-regist",TCPHASH); addtolist(tcp_port_types,2792,"f5-globalsite",TCPHASH); addtolist(tcp_port_types,2793,"initlsmsad",TCPHASH); addtolist(tcp_port_types,2794,"aaftp",TCPHASH); addtolist(tcp_port_types,2795,"livestats",TCPHASH); addtolist(tcp_port_types,2796,"ac-tech",TCPHASH); addtolist(tcp_port_types,2797,"esp-encap",TCPHASH); addtolist(tcp_port_types,2798,"tmesis-upshot",TCPHASH); addtolist(tcp_port_types,2799,"icon-discover",TCPHASH); addtolist(tcp_port_types,2800,"acc-raid",TCPHASH); addtolist(tcp_port_types,2801,"igcp",TCPHASH); addtolist(tcp_port_types,2802,"veritas-tcp1",TCPHASH); addtolist(tcp_port_types,2803,"btprjctrl",TCPHASH); addtolist(tcp_port_types,2804,"telexis-vtu",TCPHASH); addtolist(tcp_port_types,2805,"wta-wsp-s",TCPHASH); addtolist(tcp_port_types,2806,"cspuni",TCPHASH); addtolist(tcp_port_types,2807,"cspmulti",TCPHASH); addtolist(tcp_port_types,2808,"j-lan-p",TCPHASH); addtolist(tcp_port_types,2809,"corbaloc",TCPHASH); addtolist(tcp_port_types,2810,"netsteward",TCPHASH); addtolist(tcp_port_types,2811,"gsiftp",TCPHASH); addtolist(tcp_port_types,2812,"atmtcp",TCPHASH); addtolist(tcp_port_types,2813,"llm-pass",TCPHASH); addtolist(tcp_port_types,2814,"llm-csv",TCPHASH); addtolist(tcp_port_types,2815,"lbc-measure",TCPHASH); addtolist(tcp_port_types,2816,"lbc-watchdog",TCPHASH); addtolist(tcp_port_types,2817,"nmsigport",TCPHASH); addtolist(tcp_port_types,2818,"rmlnk",TCPHASH); addtolist(tcp_port_types,2819,"fc-faultnotify",TCPHASH); addtolist(tcp_port_types,2820,"univision",TCPHASH); addtolist(tcp_port_types,2821,"vml-dms",TCPHASH); addtolist(tcp_port_types,2822,"ka0wuc",TCPHASH); addtolist(tcp_port_types,2823,"cqg-netlan",TCPHASH); addtolist(tcp_port_types,2826,"slc-systemlog",TCPHASH); addtolist(tcp_port_types,2827,"slc-ctrlrloops",TCPHASH); addtolist(tcp_port_types,2828,"itm-lm",TCPHASH); addtolist(tcp_port_types,2829,"silkp1",TCPHASH); addtolist(tcp_port_types,2830,"silkp2",TCPHASH); addtolist(tcp_port_types,2831,"silkp3",TCPHASH); addtolist(tcp_port_types,2832,"silkp4",TCPHASH); addtolist(tcp_port_types,2833,"glishd",TCPHASH); addtolist(tcp_port_types,2834,"evtp",TCPHASH); addtolist(tcp_port_types,2835,"evtp-data",TCPHASH); addtolist(tcp_port_types,2836,"catalyst",TCPHASH); addtolist(tcp_port_types,2837,"repliweb",TCPHASH); addtolist(tcp_port_types,2838,"starbot",TCPHASH); addtolist(tcp_port_types,2839,"nmsigport",TCPHASH); addtolist(tcp_port_types,2840,"l3-exprt",TCPHASH); addtolist(tcp_port_types,2841,"l3-ranger",TCPHASH); addtolist(tcp_port_types,2842,"l3-hawk",TCPHASH); addtolist(tcp_port_types,2843,"pdnet",TCPHASH); addtolist(tcp_port_types,2844,"bpcp-poll",TCPHASH); addtolist(tcp_port_types,2845,"bpcp-trap",TCPHASH); addtolist(tcp_port_types,2846,"aimpp-hello",TCPHASH); addtolist(tcp_port_types,2847,"aimpp-port-req",TCPHASH); addtolist(tcp_port_types,2848,"amt-blc-port",TCPHASH); addtolist(tcp_port_types,2849,"fxp",TCPHASH); addtolist(tcp_port_types,2850,"metaconsole",TCPHASH); addtolist(tcp_port_types,2851,"webemshttp",TCPHASH); addtolist(tcp_port_types,2852,"bears-01",TCPHASH); addtolist(tcp_port_types,2853,"ispipes",TCPHASH); addtolist(tcp_port_types,2854,"infomover",TCPHASH); addtolist(tcp_port_types,2856,"cesdinv",TCPHASH); addtolist(tcp_port_types,2857,"simctlp",TCPHASH); addtolist(tcp_port_types,2858,"ecnp",TCPHASH); addtolist(tcp_port_types,2859,"activememory",TCPHASH); addtolist(tcp_port_types,2860,"dialpad-voice1",TCPHASH); addtolist(tcp_port_types,2861,"dialpad-voice2",TCPHASH); addtolist(tcp_port_types,2862,"ttg-protocol",TCPHASH); addtolist(tcp_port_types,2863,"sonardata",TCPHASH); addtolist(tcp_port_types,2864,"astromed-main",TCPHASH); addtolist(tcp_port_types,2865,"pit-vpn",TCPHASH); addtolist(tcp_port_types,2866,"lwlistener",TCPHASH); addtolist(tcp_port_types,2867,"esps-portal",TCPHASH); addtolist(tcp_port_types,2868,"npep-messaging",TCPHASH); addtolist(tcp_port_types,2869,"icslap",TCPHASH); addtolist(tcp_port_types,2870,"daishi",TCPHASH); addtolist(tcp_port_types,2871,"msi-selectplay",TCPHASH); addtolist(tcp_port_types,2872,"contract",TCPHASH); addtolist(tcp_port_types,2873,"paspar2-zoomin",TCPHASH); addtolist(tcp_port_types,2874,"dxmessagebase1",TCPHASH); addtolist(tcp_port_types,2875,"dxmessagebase2",TCPHASH); addtolist(tcp_port_types,2876,"sps-tunnel",TCPHASH); addtolist(tcp_port_types,2877,"bluelance",TCPHASH); addtolist(tcp_port_types,2878,"aap",TCPHASH); addtolist(tcp_port_types,2879,"ucentric-ds",TCPHASH); addtolist(tcp_port_types,2880,"synapse",TCPHASH); addtolist(tcp_port_types,2881,"ndsp",TCPHASH); addtolist(tcp_port_types,2882,"ndtp",TCPHASH); addtolist(tcp_port_types,2883,"ndnp",TCPHASH); addtolist(tcp_port_types,2884,"flashmsg",TCPHASH); addtolist(tcp_port_types,2885,"topflow",TCPHASH); addtolist(tcp_port_types,2886,"responselogic",TCPHASH); addtolist(tcp_port_types,2887,"aironetddp",TCPHASH); addtolist(tcp_port_types,2888,"spcsdlobby",TCPHASH); addtolist(tcp_port_types,2889,"rsom",TCPHASH); addtolist(tcp_port_types,2890,"cspclmulti",TCPHASH); addtolist(tcp_port_types,2891,"cinegrfx-elmd",TCPHASH); addtolist(tcp_port_types,2892,"snifferdata",TCPHASH); addtolist(tcp_port_types,2893,"vseconnector",TCPHASH); addtolist(tcp_port_types,2894,"abacus-remote",TCPHASH); addtolist(tcp_port_types,2895,"natuslink",TCPHASH); addtolist(tcp_port_types,2896,"ecovisiong6-1",TCPHASH); addtolist(tcp_port_types,2897,"citrix-rtmp",TCPHASH); addtolist(tcp_port_types,2898,"appliance-cfg",TCPHASH); addtolist(tcp_port_types,2899,"powergemplus",TCPHASH); addtolist(tcp_port_types,2900,"quicksuite",TCPHASH); addtolist(tcp_port_types,2901,"allstorcns",TCPHASH); addtolist(tcp_port_types,2902,"netaspi",TCPHASH); addtolist(tcp_port_types,2903,"suitcase",TCPHASH); addtolist(tcp_port_types,2904,"m2ua",TCPHASH); addtolist(tcp_port_types,2905,"m3ua",TCPHASH); addtolist(tcp_port_types,2906,"caller9",TCPHASH); addtolist(tcp_port_types,2907,"webmethods-b2b",TCPHASH); addtolist(tcp_port_types,2908,"mao",TCPHASH); addtolist(tcp_port_types,2909,"funk-dialout",TCPHASH); addtolist(tcp_port_types,2910,"tdaccess",TCPHASH); addtolist(tcp_port_types,2911,"blockade",TCPHASH); addtolist(tcp_port_types,2912,"epicon",TCPHASH); addtolist(tcp_port_types,2913,"boosterware",TCPHASH); addtolist(tcp_port_types,2914,"gamelobby",TCPHASH); addtolist(tcp_port_types,2915,"tksocket",TCPHASH); addtolist(tcp_port_types,2916,"elvin_server",TCPHASH); addtolist(tcp_port_types,2917,"elvin_client",TCPHASH); addtolist(tcp_port_types,2918,"kastenchasepad",TCPHASH); addtolist(tcp_port_types,2919,"roboer",TCPHASH); addtolist(tcp_port_types,2920,"roboeda",TCPHASH); addtolist(tcp_port_types,2921,"cesdcdman",TCPHASH); addtolist(tcp_port_types,2922,"cesdcdtrn",TCPHASH); addtolist(tcp_port_types,2923,"wta-wsp-wtp-s",TCPHASH); addtolist(tcp_port_types,2924,"precise-vip",TCPHASH); addtolist(tcp_port_types,2926,"mobile-file-dl",TCPHASH); addtolist(tcp_port_types,2927,"unimobilectrl",TCPHASH); addtolist(tcp_port_types,2928,"redstone-cpss",TCPHASH); addtolist(tcp_port_types,2929,"panja-webadmin",TCPHASH); addtolist(tcp_port_types,2930,"panja-weblinx",TCPHASH); addtolist(tcp_port_types,2931,"circle-x",TCPHASH); addtolist(tcp_port_types,2932,"incp",TCPHASH); addtolist(tcp_port_types,2933,"4-tieropmgw",TCPHASH); addtolist(tcp_port_types,2934,"4-tieropmcli",TCPHASH); addtolist(tcp_port_types,2935,"qtp",TCPHASH); addtolist(tcp_port_types,2936,"otpatch",TCPHASH); addtolist(tcp_port_types,2937,"pnaconsult-lm",TCPHASH); addtolist(tcp_port_types,2938,"sm-pas-1",TCPHASH); addtolist(tcp_port_types,2939,"sm-pas-2",TCPHASH); addtolist(tcp_port_types,2940,"sm-pas-3",TCPHASH); addtolist(tcp_port_types,2941,"sm-pas-4",TCPHASH); addtolist(tcp_port_types,2942,"sm-pas-5",TCPHASH); addtolist(tcp_port_types,2943,"ttnrepository",TCPHASH); addtolist(tcp_port_types,2944,"megaco-h248",TCPHASH); addtolist(tcp_port_types,2945,"h248-binary",TCPHASH); addtolist(tcp_port_types,2946,"fjsvmpor",TCPHASH); addtolist(tcp_port_types,2947,"gpsd",TCPHASH); addtolist(tcp_port_types,2948,"wap-push",TCPHASH); addtolist(tcp_port_types,2949,"wap-pushsecure",TCPHASH); addtolist(tcp_port_types,2950,"esip",TCPHASH); addtolist(tcp_port_types,2951,"ottp",TCPHASH); addtolist(tcp_port_types,2952,"mpfwsas",TCPHASH); addtolist(tcp_port_types,2953,"ovalarmsrv",TCPHASH); addtolist(tcp_port_types,2954,"ovalarmsrv-cmd",TCPHASH); addtolist(tcp_port_types,2955,"csnotify",TCPHASH); addtolist(tcp_port_types,2956,"ovrimosdbman",TCPHASH); addtolist(tcp_port_types,2957,"jmact5",TCPHASH); addtolist(tcp_port_types,2958,"jmact6",TCPHASH); addtolist(tcp_port_types,2959,"rmopagt",TCPHASH); addtolist(tcp_port_types,2960,"dfoxserver",TCPHASH); addtolist(tcp_port_types,2961,"boldsoft-lm",TCPHASH); addtolist(tcp_port_types,2962,"iph-policy-cli",TCPHASH); addtolist(tcp_port_types,2963,"iph-policy-adm",TCPHASH); addtolist(tcp_port_types,2964,"bullant-srap",TCPHASH); addtolist(tcp_port_types,2965,"bullant-rap",TCPHASH); addtolist(tcp_port_types,2966,"idp-infotrieve",TCPHASH); addtolist(tcp_port_types,2967,"ssc-agent",TCPHASH); addtolist(tcp_port_types,2968,"enpp",TCPHASH); addtolist(tcp_port_types,2969,"essp",TCPHASH); addtolist(tcp_port_types,2970,"index-net",TCPHASH); addtolist(tcp_port_types,2971,"netclip",TCPHASH); addtolist(tcp_port_types,2972,"pmsm-webrctl",TCPHASH); addtolist(tcp_port_types,2973,"svnetworks",TCPHASH); addtolist(tcp_port_types,2974,"signal",TCPHASH); addtolist(tcp_port_types,2975,"fjmpcm",TCPHASH); addtolist(tcp_port_types,2976,"cns-srv-port",TCPHASH); addtolist(tcp_port_types,2977,"ttc-etap-ns",TCPHASH); addtolist(tcp_port_types,2978,"ttc-etap-ds",TCPHASH); addtolist(tcp_port_types,2979,"h263-video",TCPHASH); addtolist(tcp_port_types,2980,"wimd",TCPHASH); addtolist(tcp_port_types,2981,"mylxamport",TCPHASH); addtolist(tcp_port_types,2982,"iwb-whiteboard",TCPHASH); addtolist(tcp_port_types,2983,"netplan",TCPHASH); addtolist(tcp_port_types,2984,"hpidsadmin",TCPHASH); addtolist(tcp_port_types,2985,"hpidsagent",TCPHASH); addtolist(tcp_port_types,2986,"stonefalls",TCPHASH); addtolist(tcp_port_types,2987,"identify",TCPHASH); addtolist(tcp_port_types,2988,"classify",TCPHASH); addtolist(tcp_port_types,2989,"zarkov",TCPHASH); addtolist(tcp_port_types,2990,"boscap",TCPHASH); addtolist(tcp_port_types,2991,"wkstn-mon",TCPHASH); addtolist(tcp_port_types,2992,"itb301",TCPHASH); addtolist(tcp_port_types,2993,"veritas-vis1",TCPHASH); addtolist(tcp_port_types,2994,"veritas-vis2",TCPHASH); addtolist(tcp_port_types,2995,"idrs",TCPHASH); addtolist(tcp_port_types,2996,"vsixml",TCPHASH); addtolist(tcp_port_types,2997,"rebol",TCPHASH); addtolist(tcp_port_types,2998,"realsecure",TCPHASH); addtolist(tcp_port_types,2999,"remoteware-un",TCPHASH); addtolist(tcp_port_types,3000,"hbci",TCPHASH); addtolist(tcp_port_types,3000,"remoteware-cl",TCPHASH); addtolist(tcp_port_types,3001,"redwood-broker",TCPHASH); addtolist(tcp_port_types,3002,"exlm-agent",TCPHASH); addtolist(tcp_port_types,3002,"remoteware-srv",TCPHASH); addtolist(tcp_port_types,3003,"cgms",TCPHASH); addtolist(tcp_port_types,3004,"csoftragent",TCPHASH); addtolist(tcp_port_types,3005,"geniuslm",TCPHASH); addtolist(tcp_port_types,3006,"ii-admin",TCPHASH); addtolist(tcp_port_types,3007,"lotusmtap",TCPHASH); addtolist(tcp_port_types,3008,"midnight-tech",TCPHASH); addtolist(tcp_port_types,3009,"pxc-ntfy",TCPHASH); addtolist(tcp_port_types,3010,"gw",TCPHASH); addtolist(tcp_port_types,3011,"trusted-web",TCPHASH); addtolist(tcp_port_types,3012,"twsdss",TCPHASH); addtolist(tcp_port_types,3013,"gilatskysurfer",TCPHASH); addtolist(tcp_port_types,3014,"broker_service",TCPHASH); addtolist(tcp_port_types,3015,"nati-dstp",TCPHASH); addtolist(tcp_port_types,3016,"notify_srvr",TCPHASH); addtolist(tcp_port_types,3017,"event_listener",TCPHASH); addtolist(tcp_port_types,3018,"srvc_registry",TCPHASH); addtolist(tcp_port_types,3019,"resource_mgr",TCPHASH); addtolist(tcp_port_types,3020,"cifs",TCPHASH); addtolist(tcp_port_types,3021,"agriserver",TCPHASH); addtolist(tcp_port_types,3022,"csregagent",TCPHASH); addtolist(tcp_port_types,3023,"magicnotes",TCPHASH); addtolist(tcp_port_types,3024,"nds_sso",TCPHASH); addtolist(tcp_port_types,3025,"arepa-raft",TCPHASH); addtolist(tcp_port_types,3026,"agri-gateway",TCPHASH); addtolist(tcp_port_types,3027,"LiebDevMgmt_C",TCPHASH); addtolist(tcp_port_types,3028,"LiebDevMgmt_DM",TCPHASH); addtolist(tcp_port_types,3029,"LiebDevMgmt_A",TCPHASH); addtolist(tcp_port_types,3030,"arepa-cas",TCPHASH); addtolist(tcp_port_types,3031,"agentvu",TCPHASH); addtolist(tcp_port_types,3032,"redwood-chat",TCPHASH); addtolist(tcp_port_types,3033,"pdb",TCPHASH); addtolist(tcp_port_types,3034,"osmosis-aeea",TCPHASH); addtolist(tcp_port_types,3035,"fjsv-gssagt",TCPHASH); addtolist(tcp_port_types,3036,"hagel-dump",TCPHASH); addtolist(tcp_port_types,3037,"hp-san-mgmt",TCPHASH); addtolist(tcp_port_types,3038,"santak-ups",TCPHASH); addtolist(tcp_port_types,3039,"cogitate",TCPHASH); addtolist(tcp_port_types,3040,"tomato-springs",TCPHASH); addtolist(tcp_port_types,3041,"di-traceware",TCPHASH); addtolist(tcp_port_types,3042,"journee",TCPHASH); addtolist(tcp_port_types,3043,"brp",TCPHASH); addtolist(tcp_port_types,3045,"responsenet",TCPHASH); addtolist(tcp_port_types,3046,"di-ase",TCPHASH); addtolist(tcp_port_types,3047,"hlserver",TCPHASH); addtolist(tcp_port_types,3048,"pctrader",TCPHASH); addtolist(tcp_port_types,3049,"nsws",TCPHASH); addtolist(tcp_port_types,3050,"gds_db",TCPHASH); addtolist(tcp_port_types,3051,"galaxy-server",TCPHASH); addtolist(tcp_port_types,3052,"apcpcns",TCPHASH); addtolist(tcp_port_types,3053,"dsom-server",TCPHASH); addtolist(tcp_port_types,3054,"amt-cnf-prot",TCPHASH); addtolist(tcp_port_types,3055,"policyserver",TCPHASH); addtolist(tcp_port_types,3056,"cdl-server",TCPHASH); addtolist(tcp_port_types,3057,"goahead-fldup",TCPHASH); addtolist(tcp_port_types,3058,"videobeans",TCPHASH); addtolist(tcp_port_types,3059,"qsoft",TCPHASH); addtolist(tcp_port_types,3059,"qsoft",TCPHASH); addtolist(tcp_port_types,3060,"interserver",TCPHASH); addtolist(tcp_port_types,3061,"cautcpd",TCPHASH); addtolist(tcp_port_types,3062,"ncacn-ip-tcp",TCPHASH); addtolist(tcp_port_types,3063,"ncadg-ip-udp",TCPHASH); addtolist(tcp_port_types,3065,"slinterbase",TCPHASH); addtolist(tcp_port_types,3066,"netattachsdmp",TCPHASH); addtolist(tcp_port_types,3067,"fjhpjp",TCPHASH); addtolist(tcp_port_types,3068,"ls3bcast",TCPHASH); addtolist(tcp_port_types,3069,"ls3",TCPHASH); addtolist(tcp_port_types,3070,"mgxswitch",TCPHASH); addtolist(tcp_port_types,3075,"orbix-locator",TCPHASH); addtolist(tcp_port_types,3076,"orbix-config",TCPHASH); addtolist(tcp_port_types,3077,"orbix-loc-ssl",TCPHASH); addtolist(tcp_port_types,3078,"orbix-cfg-ssl",TCPHASH); addtolist(tcp_port_types,3079,"lv-frontpanel",TCPHASH); addtolist(tcp_port_types,3080,"stm_pproc",TCPHASH); addtolist(tcp_port_types,3081,"tl1-lv",TCPHASH); addtolist(tcp_port_types,3082,"tl1-raw",TCPHASH); addtolist(tcp_port_types,3083,"tl1-telnet",TCPHASH); addtolist(tcp_port_types,3084,"itm-mccs",TCPHASH); addtolist(tcp_port_types,3085,"pcihreq",TCPHASH); addtolist(tcp_port_types,3086,"jdl-dbkitchen",TCPHASH); addtolist(tcp_port_types,3100,"opcon-xps",TCPHASH); addtolist(tcp_port_types,3105,"cardbox",TCPHASH); addtolist(tcp_port_types,3106,"cardbox-http",TCPHASH); addtolist(tcp_port_types,3130,"icpv2",TCPHASH); addtolist(tcp_port_types,3131,"netbookmark",TCPHASH); addtolist(tcp_port_types,3141,"vmodem",TCPHASH); addtolist(tcp_port_types,3142,"rdc-wh-eos",TCPHASH); addtolist(tcp_port_types,3143,"seaview",TCPHASH); addtolist(tcp_port_types,3144,"tarantella",TCPHASH); addtolist(tcp_port_types,3145,"csi-lfap",TCPHASH); addtolist(tcp_port_types,3147,"rfio",TCPHASH); addtolist(tcp_port_types,3148,"nm-game-admin",TCPHASH); addtolist(tcp_port_types,3149,"nm-game-server",TCPHASH); addtolist(tcp_port_types,3150,"nm-asses-admin",TCPHASH); addtolist(tcp_port_types,3151,"nm-assessor",TCPHASH); addtolist(tcp_port_types,3180,"mc-brk-srv",TCPHASH); addtolist(tcp_port_types,3181,"bmcpatrolagent",TCPHASH); addtolist(tcp_port_types,3182,"bmcpatrolrnvu",TCPHASH); addtolist(tcp_port_types,3262,"necp",TCPHASH); addtolist(tcp_port_types,3264,"ccmail",TCPHASH); addtolist(tcp_port_types,3265,"altav-tunnel",TCPHASH); addtolist(tcp_port_types,3266,"ns-cfg-server",TCPHASH); addtolist(tcp_port_types,3267,"ibm-dial-out",TCPHASH); addtolist(tcp_port_types,3268,"msft-gc",TCPHASH); addtolist(tcp_port_types,3269,"msft-gc-ssl",TCPHASH); addtolist(tcp_port_types,3270,"verismart",TCPHASH); addtolist(tcp_port_types,3271,"csoft-prev",TCPHASH); addtolist(tcp_port_types,3272,"user-manager",TCPHASH); addtolist(tcp_port_types,3273,"sxmp",TCPHASH); addtolist(tcp_port_types,3274,"ordinox-server",TCPHASH); addtolist(tcp_port_types,3275,"samd",TCPHASH); addtolist(tcp_port_types,3276,"maxim-asics",TCPHASH); addtolist(tcp_port_types,3277,"awg-proxy",TCPHASH); addtolist(tcp_port_types,3278,"lkcmserver",TCPHASH); addtolist(tcp_port_types,3279,"admind",TCPHASH); addtolist(tcp_port_types,3280,"vs-server",TCPHASH); addtolist(tcp_port_types,3281,"sysopt",TCPHASH); addtolist(tcp_port_types,3282,"datusorb",TCPHASH); addtolist(tcp_port_types,3283,"net-assistant",TCPHASH); addtolist(tcp_port_types,3284,"4talk",TCPHASH); addtolist(tcp_port_types,3285,"plato",TCPHASH); addtolist(tcp_port_types,3286,"e-net",TCPHASH); addtolist(tcp_port_types,3287,"directvdata",TCPHASH); addtolist(tcp_port_types,3288,"cops",TCPHASH); addtolist(tcp_port_types,3289,"enpc",TCPHASH); addtolist(tcp_port_types,3290,"caps-lm",TCPHASH); addtolist(tcp_port_types,3291,"sah-lm",TCPHASH); addtolist(tcp_port_types,3292,"cart-o-rama",TCPHASH); addtolist(tcp_port_types,3293,"fg-fps",TCPHASH); addtolist(tcp_port_types,3294,"fg-gip",TCPHASH); addtolist(tcp_port_types,3295,"dyniplookup",TCPHASH); addtolist(tcp_port_types,3296,"rib-slm",TCPHASH); addtolist(tcp_port_types,3297,"cytel-lm",TCPHASH); addtolist(tcp_port_types,3298,"transview",TCPHASH); addtolist(tcp_port_types,3299,"pdrncs",TCPHASH); addtolist(tcp_port_types,3302,"mcs-fastmail",TCPHASH); addtolist(tcp_port_types,3303,"opsession-clnt",TCPHASH); addtolist(tcp_port_types,3304,"opsession-srvr",TCPHASH); addtolist(tcp_port_types,3305,"odette-ftp",TCPHASH); addtolist(tcp_port_types,3306,"mysql",TCPHASH); addtolist(tcp_port_types,3307,"opsession-prxy",TCPHASH); addtolist(tcp_port_types,3308,"tns-server",TCPHASH); addtolist(tcp_port_types,3309,"tns-adv",TCPHASH); addtolist(tcp_port_types,3310,"dyna-access",TCPHASH); addtolist(tcp_port_types,3311,"mcns-tel-ret",TCPHASH); addtolist(tcp_port_types,3312,"appman-server",TCPHASH); addtolist(tcp_port_types,3313,"uorb",TCPHASH); addtolist(tcp_port_types,3314,"uohost",TCPHASH); addtolist(tcp_port_types,3315,"cdid",TCPHASH); addtolist(tcp_port_types,3316,"aicc-cmi",TCPHASH); addtolist(tcp_port_types,3317,"vsaiport",TCPHASH); addtolist(tcp_port_types,3318,"ssrip",TCPHASH); addtolist(tcp_port_types,3319,"sdt-lmd",TCPHASH); addtolist(tcp_port_types,3320,"officelink2000",TCPHASH); addtolist(tcp_port_types,3321,"vnsstr",TCPHASH); addtolist(tcp_port_types,3326,"sftu",TCPHASH); addtolist(tcp_port_types,3327,"bbars",TCPHASH); addtolist(tcp_port_types,3328,"egptlm",TCPHASH); addtolist(tcp_port_types,3329,"hp-device-disc",TCPHASH); addtolist(tcp_port_types,3330,"mcs-calypsoicf",TCPHASH); addtolist(tcp_port_types,3331,"mcs-messaging",TCPHASH); addtolist(tcp_port_types,3332,"mcs-mailsvr",TCPHASH); addtolist(tcp_port_types,3333,"dec-notes",TCPHASH); addtolist(tcp_port_types,3334,"directv-web",TCPHASH); addtolist(tcp_port_types,3335,"directv-soft",TCPHASH); addtolist(tcp_port_types,3336,"directv-tick",TCPHASH); addtolist(tcp_port_types,3337,"directv-catlg",TCPHASH); addtolist(tcp_port_types,3338,"anet-b",TCPHASH); addtolist(tcp_port_types,3339,"anet-l",TCPHASH); addtolist(tcp_port_types,3340,"anet-m",TCPHASH); addtolist(tcp_port_types,3341,"anet-h",TCPHASH); addtolist(tcp_port_types,3342,"webtie",TCPHASH); addtolist(tcp_port_types,3343,"ms-cluster-net",TCPHASH); addtolist(tcp_port_types,3344,"bnt-manager",TCPHASH); addtolist(tcp_port_types,3345,"influence",TCPHASH); addtolist(tcp_port_types,3346,"trnsprntproxy",TCPHASH); addtolist(tcp_port_types,3347,"phoenix-rpc",TCPHASH); addtolist(tcp_port_types,3348,"pangolin-laser",TCPHASH); addtolist(tcp_port_types,3349,"chevinservices",TCPHASH); addtolist(tcp_port_types,3350,"findviatv",TCPHASH); addtolist(tcp_port_types,3351,"btrieve",TCPHASH); addtolist(tcp_port_types,3352,"ssql",TCPHASH); addtolist(tcp_port_types,3353,"fatpipe",TCPHASH); addtolist(tcp_port_types,3354,"suitjd",TCPHASH); addtolist(tcp_port_types,3355,"ordinox-dbase",TCPHASH); addtolist(tcp_port_types,3356,"upnotifyps",TCPHASH); addtolist(tcp_port_types,3357,"adtech-test",TCPHASH); addtolist(tcp_port_types,3358,"mpsysrmsvr",TCPHASH); addtolist(tcp_port_types,3359,"wg-netforce",TCPHASH); addtolist(tcp_port_types,3360,"kv-server",TCPHASH); addtolist(tcp_port_types,3361,"kv-agent",TCPHASH); addtolist(tcp_port_types,3362,"dj-ilm",TCPHASH); addtolist(tcp_port_types,3363,"nati-vi-server",TCPHASH); addtolist(tcp_port_types,3364,"creativeserver",TCPHASH); addtolist(tcp_port_types,3365,"contentserver",TCPHASH); addtolist(tcp_port_types,3366,"creativepartnr",TCPHASH); addtolist(tcp_port_types,3372,"tip2",TCPHASH); addtolist(tcp_port_types,3373,"lavenir-lm",TCPHASH); addtolist(tcp_port_types,3374,"cluster-disc",TCPHASH); addtolist(tcp_port_types,3375,"vsnm-agent",TCPHASH); addtolist(tcp_port_types,3376,"cdborker",TCPHASH); addtolist(tcp_port_types,3377,"cogsys-lm",TCPHASH); addtolist(tcp_port_types,3378,"wsicopy",TCPHASH); addtolist(tcp_port_types,3379,"socorfs",TCPHASH); addtolist(tcp_port_types,3380,"sns-channels",TCPHASH); addtolist(tcp_port_types,3381,"geneous",TCPHASH); addtolist(tcp_port_types,3382,"fujitsu-neat",TCPHASH); addtolist(tcp_port_types,3383,"esp-lm",TCPHASH); addtolist(tcp_port_types,3384,"hp-clic",TCPHASH); addtolist(tcp_port_types,3385,"qnxnetman",TCPHASH); addtolist(tcp_port_types,3386,"gprs-data",TCPHASH); addtolist(tcp_port_types,3387,"backroomnet",TCPHASH); addtolist(tcp_port_types,3388,"cbserver",TCPHASH); addtolist(tcp_port_types,3389,"ms-wbt-server",TCPHASH); addtolist(tcp_port_types,3390,"dsc",TCPHASH); addtolist(tcp_port_types,3391,"savant",TCPHASH); addtolist(tcp_port_types,3392,"efi-lm",TCPHASH); addtolist(tcp_port_types,3393,"d2k-tapestry1",TCPHASH); addtolist(tcp_port_types,3394,"d2k-tapestry2",TCPHASH); addtolist(tcp_port_types,3395,"dyna-lm",TCPHASH); addtolist(tcp_port_types,3396,"printer_agent",TCPHASH); addtolist(tcp_port_types,3397,"cloanto-lm",TCPHASH); addtolist(tcp_port_types,3398,"mercantile",TCPHASH); addtolist(tcp_port_types,3399,"csms",TCPHASH); addtolist(tcp_port_types,3400,"csms2",TCPHASH); addtolist(tcp_port_types,3401,"filecast",TCPHASH); addtolist(tcp_port_types,3421,"bmap",TCPHASH); addtolist(tcp_port_types,3454,"mira",TCPHASH); addtolist(tcp_port_types,3455,"prsvp",TCPHASH); addtolist(tcp_port_types,3456,"vat",TCPHASH); addtolist(tcp_port_types,3457,"vat-control",TCPHASH); addtolist(tcp_port_types,3458,"d3winosfi",TCPHASH); addtolist(tcp_port_types,3459,"integral",TCPHASH); addtolist(tcp_port_types,3460,"edm-manager",TCPHASH); addtolist(tcp_port_types,3461,"edm-stager",TCPHASH); addtolist(tcp_port_types,3462,"edm-std-notify",TCPHASH); addtolist(tcp_port_types,3463,"edm-adm-notify",TCPHASH); addtolist(tcp_port_types,3464,"edm-mgr-sync",TCPHASH); addtolist(tcp_port_types,3465,"edm-mgr-cntrl",TCPHASH); addtolist(tcp_port_types,3466,"workflow",TCPHASH); addtolist(tcp_port_types,3467,"rcst",TCPHASH); addtolist(tcp_port_types,3468,"ttcmremotectrl",TCPHASH); addtolist(tcp_port_types,3469,"pluribus",TCPHASH); addtolist(tcp_port_types,3470,"jt400",TCPHASH); addtolist(tcp_port_types,3471,"jt400-ssl",TCPHASH); addtolist(tcp_port_types,3535,"ms-la",TCPHASH); addtolist(tcp_port_types,3563,"watcomdebug",TCPHASH); addtolist(tcp_port_types,3672,"harlequinorb",TCPHASH); addtolist(tcp_port_types,3709,"ca-idms",TCPHASH); addtolist(tcp_port_types,3802,"vhd",TCPHASH); addtolist(tcp_port_types,3845,"v-one-spp",TCPHASH); addtolist(tcp_port_types,3862,"giga-pocket",TCPHASH); addtolist(tcp_port_types,3875,"pnbscada",TCPHASH); addtolist(tcp_port_types,3900,"udt_os",TCPHASH); addtolist(tcp_port_types,3984,"mapper-nodemgr",TCPHASH); addtolist(tcp_port_types,3985,"mapper-mapethd",TCPHASH); addtolist(tcp_port_types,3986,"mapper-ws_ethd",TCPHASH); addtolist(tcp_port_types,3987,"centerline",TCPHASH); addtolist(tcp_port_types,4000,"terabase",TCPHASH); addtolist(tcp_port_types,4001,"newoak",TCPHASH); addtolist(tcp_port_types,4002,"pxc-spvr-ft",TCPHASH); addtolist(tcp_port_types,4003,"pxc-splr-ft",TCPHASH); addtolist(tcp_port_types,4004,"pxc-roid",TCPHASH); addtolist(tcp_port_types,4005,"pxc-pin",TCPHASH); addtolist(tcp_port_types,4006,"pxc-spvr",TCPHASH); addtolist(tcp_port_types,4007,"pxc-splr",TCPHASH); addtolist(tcp_port_types,4008,"netcheque",TCPHASH); addtolist(tcp_port_types,4009,"chimera-hwm",TCPHASH); addtolist(tcp_port_types,4010,"samsung-unidex",TCPHASH); addtolist(tcp_port_types,4011,"altserviceboot",TCPHASH); addtolist(tcp_port_types,4012,"pda-gate",TCPHASH); addtolist(tcp_port_types,4013,"acl-manager",TCPHASH); addtolist(tcp_port_types,4014,"taiclock",TCPHASH); addtolist(tcp_port_types,4015,"talarian-mcast1",TCPHASH); addtolist(tcp_port_types,4016,"talarian-mcast2",TCPHASH); addtolist(tcp_port_types,4017,"talarian-mcast3",TCPHASH); addtolist(tcp_port_types,4018,"talarian-mcast4",TCPHASH); addtolist(tcp_port_types,4019,"talarian-mcast5",TCPHASH); addtolist(tcp_port_types,4042,"ldxp",TCPHASH); addtolist(tcp_port_types,4096,"bre",TCPHASH); addtolist(tcp_port_types,4097,"patrolview",TCPHASH); addtolist(tcp_port_types,4098,"drmsfsd",TCPHASH); addtolist(tcp_port_types,4099,"dpcp",TCPHASH); addtolist(tcp_port_types,4132,"nuts_dem",TCPHASH); addtolist(tcp_port_types,4133,"nuts_bootp",TCPHASH); addtolist(tcp_port_types,4134,"nifty-hmi",TCPHASH); addtolist(tcp_port_types,4141,"oirtgsvc",TCPHASH); addtolist(tcp_port_types,4142,"oidocsvc",TCPHASH); addtolist(tcp_port_types,4143,"oidsr",TCPHASH); addtolist(tcp_port_types,4160,"jini-discovery",TCPHASH); addtolist(tcp_port_types,4199,"eims-admin",TCPHASH); addtolist(tcp_port_types,4300,"corelccam",TCPHASH); addtolist(tcp_port_types,4321,"rwhois",TCPHASH); addtolist(tcp_port_types,4343,"unicall",TCPHASH); addtolist(tcp_port_types,4344,"vinainstall",TCPHASH); addtolist(tcp_port_types,4345,"m4-network-as",TCPHASH); addtolist(tcp_port_types,4346,"elanlm",TCPHASH); addtolist(tcp_port_types,4347,"lansurveyor",TCPHASH); addtolist(tcp_port_types,4348,"itose",TCPHASH); addtolist(tcp_port_types,4349,"fsportmap",TCPHASH); addtolist(tcp_port_types,4350,"net-device",TCPHASH); addtolist(tcp_port_types,4351,"plcy-net-svcs",TCPHASH); addtolist(tcp_port_types,4353,"f5-iquery",TCPHASH); addtolist(tcp_port_types,4442,"saris",TCPHASH); addtolist(tcp_port_types,4443,"pharos",TCPHASH); addtolist(tcp_port_types,4444,"krb524",TCPHASH); addtolist(tcp_port_types,4444,"nv-video",TCPHASH); addtolist(tcp_port_types,4445,"upnotifyp",TCPHASH); addtolist(tcp_port_types,4446,"n1-fwp",TCPHASH); addtolist(tcp_port_types,4447,"n1-rmgmt",TCPHASH); addtolist(tcp_port_types,4448,"asc-slmd",TCPHASH); addtolist(tcp_port_types,4449,"privatewire",TCPHASH); addtolist(tcp_port_types,4450,"camp",TCPHASH); addtolist(tcp_port_types,4451,"ctisystemmsg",TCPHASH); addtolist(tcp_port_types,4452,"ctiprogramload",TCPHASH); addtolist(tcp_port_types,4453,"nssalertmgr",TCPHASH); addtolist(tcp_port_types,4454,"nssagentmgr",TCPHASH); addtolist(tcp_port_types,4455,"prchat-user",TCPHASH); addtolist(tcp_port_types,4456,"prchat-server",TCPHASH); addtolist(tcp_port_types,4457,"prRegister",TCPHASH); addtolist(tcp_port_types,4500,"sae-urn",TCPHASH); addtolist(tcp_port_types,4501,"urn-x-cdchoice",TCPHASH); addtolist(tcp_port_types,4545,"worldscores",TCPHASH); addtolist(tcp_port_types,4546,"sf-lm",TCPHASH); addtolist(tcp_port_types,4547,"lanner-lm",TCPHASH); addtolist(tcp_port_types,4567,"tram",TCPHASH); addtolist(tcp_port_types,4568,"bmc-reporting",TCPHASH); addtolist(tcp_port_types,4600,"piranha1",TCPHASH); addtolist(tcp_port_types,4601,"piranha2",TCPHASH); addtolist(tcp_port_types,4672,"rfa",TCPHASH); addtolist(tcp_port_types,4800,"iims",TCPHASH); addtolist(tcp_port_types,4801,"iwec",TCPHASH); addtolist(tcp_port_types,4802,"ilss",TCPHASH); addtolist(tcp_port_types,4827,"htcp",TCPHASH); addtolist(tcp_port_types,4837,"varadero-0",TCPHASH); addtolist(tcp_port_types,4838,"varadero-1",TCPHASH); addtolist(tcp_port_types,4868,"phrelay",TCPHASH); addtolist(tcp_port_types,4869,"phrelaydbg",TCPHASH); addtolist(tcp_port_types,4885,"abbs",TCPHASH); addtolist(tcp_port_types,4983,"att-intercom",TCPHASH); addtolist(tcp_port_types,5000,"commplex-main",TCPHASH); addtolist(tcp_port_types,5001,"commplex-link",TCPHASH); addtolist(tcp_port_types,5002,"rfe",TCPHASH); addtolist(tcp_port_types,5003,"fmpro-internal",TCPHASH); addtolist(tcp_port_types,5004,"avt-profile-1",TCPHASH); addtolist(tcp_port_types,5005,"avt-profile-2",TCPHASH); addtolist(tcp_port_types,5006,"wsm-server",TCPHASH); addtolist(tcp_port_types,5007,"wsm-server-ssl",TCPHASH); addtolist(tcp_port_types,5010,"telelpathstart",TCPHASH); addtolist(tcp_port_types,5011,"telelpathattack",TCPHASH); addtolist(tcp_port_types,5020,"zenginkyo-1",TCPHASH); addtolist(tcp_port_types,5021,"zenginkyo-2",TCPHASH); addtolist(tcp_port_types,5042,"asnaacceler8db",TCPHASH); addtolist(tcp_port_types,5050,"mmcc",TCPHASH); addtolist(tcp_port_types,5051,"ita-agent",TCPHASH); addtolist(tcp_port_types,5052,"ita-manager",TCPHASH); addtolist(tcp_port_types,5055,"unot",TCPHASH); addtolist(tcp_port_types,5056,"intecom-ps1",TCPHASH); addtolist(tcp_port_types,5057,"intecom-ps2",TCPHASH); addtolist(tcp_port_types,5060,"sip",TCPHASH); addtolist(tcp_port_types,5061,"sip-tls",TCPHASH); addtolist(tcp_port_types,5066,"stanag-5066",TCPHASH); addtolist(tcp_port_types,5069,"i-net-2000-npr",TCPHASH); addtolist(tcp_port_types,5071,"powerschool",TCPHASH); addtolist(tcp_port_types,5093,"sentinel-lm",TCPHASH); addtolist(tcp_port_types,5099,"sentlm-srv2srv",TCPHASH); addtolist(tcp_port_types,5145,"rmonitor_secure",TCPHASH); addtolist(tcp_port_types,5150,"atmp",TCPHASH); addtolist(tcp_port_types,5151,"esri_sde",TCPHASH); addtolist(tcp_port_types,5152,"sde-discovery",TCPHASH); addtolist(tcp_port_types,5165,"ife_icorp",TCPHASH); addtolist(tcp_port_types,5190,"aol",TCPHASH); addtolist(tcp_port_types,5191,"aol-1",TCPHASH); addtolist(tcp_port_types,5192,"aol-2",TCPHASH); addtolist(tcp_port_types,5193,"aol-3",TCPHASH); addtolist(tcp_port_types,5200,"targus-getdata",TCPHASH); addtolist(tcp_port_types,5201,"targus-getdata1",TCPHASH); addtolist(tcp_port_types,5202,"targus-getdata2",TCPHASH); addtolist(tcp_port_types,5203,"targus-getdata3",TCPHASH); addtolist(tcp_port_types,5236,"padl2sim",TCPHASH); addtolist(tcp_port_types,5272,"pk",TCPHASH); addtolist(tcp_port_types,5300,"hacl-hb",TCPHASH); addtolist(tcp_port_types,5301,"hacl-gs",TCPHASH); addtolist(tcp_port_types,5302,"hacl-cfg",TCPHASH); addtolist(tcp_port_types,5303,"hacl-probe",TCPHASH); addtolist(tcp_port_types,5304,"hacl-local",TCPHASH); addtolist(tcp_port_types,5305,"hacl-test",TCPHASH); addtolist(tcp_port_types,5306,"sun-mc-grp",TCPHASH); addtolist(tcp_port_types,5307,"sco-aip",TCPHASH); addtolist(tcp_port_types,5308,"cfengine",TCPHASH); addtolist(tcp_port_types,5309,"jprinter",TCPHASH); addtolist(tcp_port_types,5310,"outlaws",TCPHASH); addtolist(tcp_port_types,5311,"tmlogin",TCPHASH); addtolist(tcp_port_types,5314,"opalis-rbt-ipc",TCPHASH); addtolist(tcp_port_types,5315,"hacl-poll",TCPHASH); addtolist(tcp_port_types,5400,"excerpt",TCPHASH); addtolist(tcp_port_types,5401,"excerpts",TCPHASH); addtolist(tcp_port_types,5402,"mftp",TCPHASH); addtolist(tcp_port_types,5403,"hpoms-ci-lstn",TCPHASH); addtolist(tcp_port_types,5404,"hpoms-dps-lstn",TCPHASH); addtolist(tcp_port_types,5405,"netsupport",TCPHASH); addtolist(tcp_port_types,5406,"systemics-sox",TCPHASH); addtolist(tcp_port_types,5407,"foresyte-clear",TCPHASH); addtolist(tcp_port_types,5408,"foresyte-sec",TCPHASH); addtolist(tcp_port_types,5409,"salient-dtasrv",TCPHASH); addtolist(tcp_port_types,5410,"salient-usrmgr",TCPHASH); addtolist(tcp_port_types,5411,"actnet",TCPHASH); addtolist(tcp_port_types,5412,"continuus",TCPHASH); addtolist(tcp_port_types,5413,"wwiotalk",TCPHASH); addtolist(tcp_port_types,5414,"statusd",TCPHASH); addtolist(tcp_port_types,5415,"ns-server",TCPHASH); addtolist(tcp_port_types,5416,"sns-gateway",TCPHASH); addtolist(tcp_port_types,5417,"sns-agent",TCPHASH); addtolist(tcp_port_types,5418,"mcntp",TCPHASH); addtolist(tcp_port_types,5419,"dj-ice",TCPHASH); addtolist(tcp_port_types,5420,"cylink-c",TCPHASH); addtolist(tcp_port_types,5421,"netsupport2",TCPHASH); addtolist(tcp_port_types,5422,"salient-mux",TCPHASH); addtolist(tcp_port_types,5423,"virtualuser",TCPHASH); addtolist(tcp_port_types,5426,"devbasic",TCPHASH); addtolist(tcp_port_types,5427,"sco-peer-tta",TCPHASH); addtolist(tcp_port_types,5428,"telaconsole",TCPHASH); addtolist(tcp_port_types,5429,"base",TCPHASH); addtolist(tcp_port_types,5430,"radec-corp",TCPHASH); addtolist(tcp_port_types,5431,"park-agent",TCPHASH); addtolist(tcp_port_types,5435,"dttl",TCPHASH); addtolist(tcp_port_types,5454,"apc-tcp-udp-4",TCPHASH); addtolist(tcp_port_types,5455,"apc-tcp-udp-5",TCPHASH); addtolist(tcp_port_types,5456,"apc-tcp-udp-6",TCPHASH); addtolist(tcp_port_types,5461,"silkmeter",TCPHASH); addtolist(tcp_port_types,5462,"ttl-publisher",TCPHASH); addtolist(tcp_port_types,5465,"netops-broker",TCPHASH); addtolist(tcp_port_types,5500,"fcp-addr-srvr1",TCPHASH); addtolist(tcp_port_types,5501,"fcp-addr-srvr2",TCPHASH); addtolist(tcp_port_types,5502,"fcp-srvr-inst1",TCPHASH); addtolist(tcp_port_types,5503,"fcp-srvr-inst2",TCPHASH); addtolist(tcp_port_types,5504,"fcp-cics-gw1",TCPHASH); addtolist(tcp_port_types,5554,"sgi-esphttp",TCPHASH); addtolist(tcp_port_types,5555,"personal-agent",TCPHASH); addtolist(tcp_port_types,5566,"udpplus",TCPHASH); addtolist(tcp_port_types,5599,"esinstall",TCPHASH); addtolist(tcp_port_types,5600,"esmmanager",TCPHASH); addtolist(tcp_port_types,5601,"esmagent",TCPHASH); addtolist(tcp_port_types,5602,"a1-msc",TCPHASH); addtolist(tcp_port_types,5603,"a1-bs",TCPHASH); addtolist(tcp_port_types,5604,"a3-sdunode",TCPHASH); addtolist(tcp_port_types,5605,"a4-sdunode",TCPHASH); addtolist(tcp_port_types,5631,"pcanywheredata",TCPHASH); addtolist(tcp_port_types,5632,"pcanywherestat",TCPHASH); addtolist(tcp_port_types,5678,"rrac",TCPHASH); addtolist(tcp_port_types,5679,"dccm",TCPHASH); addtolist(tcp_port_types,5713,"proshareaudio",TCPHASH); addtolist(tcp_port_types,5714,"prosharevideo",TCPHASH); addtolist(tcp_port_types,5715,"prosharedata",TCPHASH); addtolist(tcp_port_types,5716,"prosharerequest",TCPHASH); addtolist(tcp_port_types,5717,"prosharenotify",TCPHASH); addtolist(tcp_port_types,5729,"openmail",TCPHASH); addtolist(tcp_port_types,5741,"ida-discover1",TCPHASH); addtolist(tcp_port_types,5742,"ida-discover2",TCPHASH); addtolist(tcp_port_types,5745,"fcopy-server",TCPHASH); addtolist(tcp_port_types,5746,"fcopys-server",TCPHASH); addtolist(tcp_port_types,5755,"openmailg",TCPHASH); addtolist(tcp_port_types,5757,"x500ms",TCPHASH); addtolist(tcp_port_types,5766,"openmailns",TCPHASH); addtolist(tcp_port_types,5767,"s-openmail",TCPHASH); addtolist(tcp_port_types,5768,"openmailpxy",TCPHASH); addtolist(tcp_port_types,5771,"netagent",TCPHASH); addtolist(tcp_port_types,5813,"icmpd",TCPHASH); addtolist(tcp_port_types,5859,"wherehoo",TCPHASH); addtolist(tcp_port_types,5968,"mppolicy-v5",TCPHASH); addtolist(tcp_port_types,5969,"mppolicy-mgr",TCPHASH); addtolist(tcp_port_types,5987,"wbem-rmi",TCPHASH); addtolist(tcp_port_types,5988,"wbem-http",TCPHASH); addtolist(tcp_port_types,5999,"cvsup",TCPHASH); addtolist(tcp_port_types,6000,"6000-x11",TCPHASH); addtolist(tcp_port_types,6001,"6001-x11",TCPHASH); addtolist(tcp_port_types,6002,"6002-x11",TCPHASH); addtolist(tcp_port_types,6003,"6003-x11",TCPHASH); addtolist(tcp_port_types,6004,"6004-x11",TCPHASH); addtolist(tcp_port_types,6005,"6005-x11",TCPHASH); addtolist(tcp_port_types,6006,"6006-x11",TCPHASH); addtolist(tcp_port_types,6007,"6007-x11",TCPHASH); addtolist(tcp_port_types,6008,"6008-x11",TCPHASH); addtolist(tcp_port_types,6009,"6009-x11",TCPHASH); addtolist(tcp_port_types,6010,"6010-x11",TCPHASH); addtolist(tcp_port_types,6011,"6011-x11",TCPHASH); addtolist(tcp_port_types,6012,"6012-x11",TCPHASH); addtolist(tcp_port_types,6013,"6013-x11",TCPHASH); addtolist(tcp_port_types,6014,"6014-x11",TCPHASH); addtolist(tcp_port_types,6015,"6015-x11",TCPHASH); addtolist(tcp_port_types,6016,"6016-x11",TCPHASH); addtolist(tcp_port_types,6017,"6017-x11",TCPHASH); addtolist(tcp_port_types,6018,"6018-x11",TCPHASH); addtolist(tcp_port_types,6019,"6019-x11",TCPHASH); addtolist(tcp_port_types,6020,"6020-x11",TCPHASH); addtolist(tcp_port_types,6021,"6021-x11",TCPHASH); addtolist(tcp_port_types,6022,"6022-x11",TCPHASH); addtolist(tcp_port_types,6023,"6023-x11",TCPHASH); addtolist(tcp_port_types,6024,"6024-x11",TCPHASH); addtolist(tcp_port_types,6025,"6025-x11",TCPHASH); addtolist(tcp_port_types,6026,"6026-x11",TCPHASH); addtolist(tcp_port_types,6027,"6027-x11",TCPHASH); addtolist(tcp_port_types,6028,"6028-x11",TCPHASH); addtolist(tcp_port_types,6029,"6029-x11",TCPHASH); addtolist(tcp_port_types,6030,"6030-x11",TCPHASH); addtolist(tcp_port_types,6031,"6031-x11",TCPHASH); addtolist(tcp_port_types,6032,"6032-x11",TCPHASH); addtolist(tcp_port_types,6033,"6033-x11",TCPHASH); addtolist(tcp_port_types,6034,"6034-x11",TCPHASH); addtolist(tcp_port_types,6035,"6035-x11",TCPHASH); addtolist(tcp_port_types,6036,"6036-x11",TCPHASH); addtolist(tcp_port_types,6037,"6037-x11",TCPHASH); addtolist(tcp_port_types,6038,"6038-x11",TCPHASH); addtolist(tcp_port_types,6039,"6039-x11",TCPHASH); addtolist(tcp_port_types,6040,"6040-x11",TCPHASH); addtolist(tcp_port_types,6041,"6041-x11",TCPHASH); addtolist(tcp_port_types,6042,"6042-x11",TCPHASH); addtolist(tcp_port_types,6043,"6043-x11",TCPHASH); addtolist(tcp_port_types,6044,"6044-x11",TCPHASH); addtolist(tcp_port_types,6045,"6045-x11",TCPHASH); addtolist(tcp_port_types,6046,"6046-x11",TCPHASH); addtolist(tcp_port_types,6047,"6047-x11",TCPHASH); addtolist(tcp_port_types,6048,"6048-x11",TCPHASH); addtolist(tcp_port_types,6049,"6049-x11",TCPHASH); addtolist(tcp_port_types,6050,"6050-x11",TCPHASH); addtolist(tcp_port_types,6051,"6051-x11",TCPHASH); addtolist(tcp_port_types,6052,"6052-x11",TCPHASH); addtolist(tcp_port_types,6053,"6053-x11",TCPHASH); addtolist(tcp_port_types,6054,"6054-x11",TCPHASH); addtolist(tcp_port_types,6055,"6055-x11",TCPHASH); addtolist(tcp_port_types,6056,"6056-x11",TCPHASH); addtolist(tcp_port_types,6057,"6057-x11",TCPHASH); addtolist(tcp_port_types,6058,"6058-x11",TCPHASH); addtolist(tcp_port_types,6059,"6059-x11",TCPHASH); addtolist(tcp_port_types,6060,"6060-x11",TCPHASH); addtolist(tcp_port_types,6061,"6061-x11",TCPHASH); addtolist(tcp_port_types,6062,"6062-x11",TCPHASH); addtolist(tcp_port_types,6063,"6063-x11",TCPHASH); addtolist(tcp_port_types,6064,"ndl-ahp-svc",TCPHASH); addtolist(tcp_port_types,6065,"winpharaoh",TCPHASH); addtolist(tcp_port_types,6066,"ewctsp",TCPHASH); addtolist(tcp_port_types,6067,"srb",TCPHASH); addtolist(tcp_port_types,6068,"gsmp",TCPHASH); addtolist(tcp_port_types,6069,"trip",TCPHASH); addtolist(tcp_port_types,6070,"messageasap",TCPHASH); addtolist(tcp_port_types,6071,"ssdtp",TCPHASH); addtolist(tcp_port_types,6072,"diagnose-proc",TCPHASH); addtolist(tcp_port_types,6073,"directplay8",TCPHASH); addtolist(tcp_port_types,6100,"synchronet-db",TCPHASH); addtolist(tcp_port_types,6101,"synchronet-rtc",TCPHASH); addtolist(tcp_port_types,6102,"synchronet-upd",TCPHASH); addtolist(tcp_port_types,6103,"rets",TCPHASH); addtolist(tcp_port_types,6104,"dbdb",TCPHASH); addtolist(tcp_port_types,6105,"primaserver",TCPHASH); addtolist(tcp_port_types,6106,"mpsserver",TCPHASH); addtolist(tcp_port_types,6107,"etc-control",TCPHASH); addtolist(tcp_port_types,6108,"sercomm-scadmin",TCPHASH); addtolist(tcp_port_types,6109,"globecast-id",TCPHASH); addtolist(tcp_port_types,6110,"softcm",TCPHASH); addtolist(tcp_port_types,6111,"spc",TCPHASH); addtolist(tcp_port_types,6112,"dtspcd",TCPHASH); addtolist(tcp_port_types,6123,"backup-express",TCPHASH); addtolist(tcp_port_types,6141,"meta-corp",TCPHASH); addtolist(tcp_port_types,6142,"aspentec-lm",TCPHASH); addtolist(tcp_port_types,6143,"watershed-lm",TCPHASH); addtolist(tcp_port_types,6144,"statsci1-lm",TCPHASH); addtolist(tcp_port_types,6145,"statsci2-lm",TCPHASH); addtolist(tcp_port_types,6146,"lonewolf-lm",TCPHASH); addtolist(tcp_port_types,6147,"montage-lm",TCPHASH); addtolist(tcp_port_types,6148,"ricardo-lm",TCPHASH); addtolist(tcp_port_types,6149,"tal-pod",TCPHASH); addtolist(tcp_port_types,6253,"crip",TCPHASH); addtolist(tcp_port_types,6300,"bmc-grx",TCPHASH); addtolist(tcp_port_types,6321,"emp-server1",TCPHASH); addtolist(tcp_port_types,6322,"emp-server2",TCPHASH); addtolist(tcp_port_types,6346,"gnutella-svc",TCPHASH); addtolist(tcp_port_types,6347,"gnutella-rtr",TCPHASH); addtolist(tcp_port_types,6389,"clariion-evr01",TCPHASH); addtolist(tcp_port_types,6455,"skip-cert-recv",TCPHASH); addtolist(tcp_port_types,6456,"skip-cert-send",TCPHASH); addtolist(tcp_port_types,6471,"lvision-lm",TCPHASH); addtolist(tcp_port_types,6500,"boks",TCPHASH); addtolist(tcp_port_types,6501,"boks_servc",TCPHASH); addtolist(tcp_port_types,6502,"boks_servm",TCPHASH); addtolist(tcp_port_types,6503,"boks_clntd",TCPHASH); addtolist(tcp_port_types,6505,"badm_priv",TCPHASH); addtolist(tcp_port_types,6506,"badm_pub",TCPHASH); addtolist(tcp_port_types,6507,"bdir_priv",TCPHASH); addtolist(tcp_port_types,6508,"bdir_pub",TCPHASH); addtolist(tcp_port_types,6547,"apc-tcp-udp-1",TCPHASH); addtolist(tcp_port_types,6548,"apc-tcp-udp-2",TCPHASH); addtolist(tcp_port_types,6549,"apc-tcp-udp-3",TCPHASH); addtolist(tcp_port_types,6550,"fg-sysupdate",TCPHASH); addtolist(tcp_port_types,6558,"xdsxdm",TCPHASH); addtolist(tcp_port_types,6580,"parsec-master",TCPHASH); addtolist(tcp_port_types,6581,"parsec-peer",TCPHASH); addtolist(tcp_port_types,6582,"parsec-game",TCPHASH); addtolist(tcp_port_types,6665,"6665-ircu",TCPHASH); addtolist(tcp_port_types,6666,"6666-ircu",TCPHASH); addtolist(tcp_port_types,6667,"6667-ircu",TCPHASH); addtolist(tcp_port_types,6668,"6668-ircu",TCPHASH); addtolist(tcp_port_types,6669,"6669-ircu",TCPHASH); addtolist(tcp_port_types,6670,"vocaltec-gold",TCPHASH); addtolist(tcp_port_types,6672,"vision_server",TCPHASH); addtolist(tcp_port_types,6673,"vision_elmd",TCPHASH); addtolist(tcp_port_types,6701,"kti-icad-srvr",TCPHASH); addtolist(tcp_port_types,6714,"ibprotocol",TCPHASH); addtolist(tcp_port_types,6767,"bmc-perf-agent",TCPHASH); addtolist(tcp_port_types,6768,"bmc-perf-mgrd",TCPHASH); addtolist(tcp_port_types,6790,"hnmp",TCPHASH); addtolist(tcp_port_types,6831,"ambit-lm",TCPHASH); addtolist(tcp_port_types,6841,"netmo-default",TCPHASH); addtolist(tcp_port_types,6842,"netmo-http",TCPHASH); addtolist(tcp_port_types,6850,"iccrushmore",TCPHASH); addtolist(tcp_port_types,6888,"muse",TCPHASH); addtolist(tcp_port_types,6961,"jmact3",TCPHASH); addtolist(tcp_port_types,6962,"jmevt2",TCPHASH); addtolist(tcp_port_types,6963,"swismgr1",TCPHASH); addtolist(tcp_port_types,6964,"swismgr2",TCPHASH); addtolist(tcp_port_types,6965,"swistrap",TCPHASH); addtolist(tcp_port_types,6966,"swispol",TCPHASH); addtolist(tcp_port_types,6969,"acmsoda",TCPHASH); addtolist(tcp_port_types,6998,"iatp-highpri",TCPHASH); addtolist(tcp_port_types,6999,"iatp-normalpri",TCPHASH); addtolist(tcp_port_types,7000,"afs3-fileserver",TCPHASH); addtolist(tcp_port_types,7001,"afs3-callback",TCPHASH); addtolist(tcp_port_types,7002,"afs3-prserver",TCPHASH); addtolist(tcp_port_types,7003,"afs3-vlserver",TCPHASH); addtolist(tcp_port_types,7004,"afs3-kaserver",TCPHASH); addtolist(tcp_port_types,7005,"afs3-volser",TCPHASH); addtolist(tcp_port_types,7006,"afs3-errors",TCPHASH); addtolist(tcp_port_types,7007,"afs3-bos",TCPHASH); addtolist(tcp_port_types,7008,"afs3-update",TCPHASH); addtolist(tcp_port_types,7009,"afs3-rmtsys",TCPHASH); addtolist(tcp_port_types,7010,"ups-onlinet",TCPHASH); addtolist(tcp_port_types,7011,"talon-disc",TCPHASH); addtolist(tcp_port_types,7012,"talon-engine",TCPHASH); addtolist(tcp_port_types,7013,"microtalon-dis",TCPHASH); addtolist(tcp_port_types,7014,"microtalon-com",TCPHASH); addtolist(tcp_port_types,7015,"talon-webserver",TCPHASH); addtolist(tcp_port_types,7020,"dpserve",TCPHASH); addtolist(tcp_port_types,7021,"dpserveadmin",TCPHASH); addtolist(tcp_port_types,7070,"arcp",TCPHASH); addtolist(tcp_port_types,7099,"lazy-ptop",TCPHASH); addtolist(tcp_port_types,7100,"font-service",TCPHASH); addtolist(tcp_port_types,7121,"virprot-lm",TCPHASH); addtolist(tcp_port_types,7174,"clutild",TCPHASH); addtolist(tcp_port_types,7200,"fodms",TCPHASH); addtolist(tcp_port_types,7201,"dlip",TCPHASH); addtolist(tcp_port_types,7280,"itactionserver1",TCPHASH); addtolist(tcp_port_types,7281,"itactionserver2",TCPHASH); addtolist(tcp_port_types,7391,"mindfilesys",TCPHASH); addtolist(tcp_port_types,7392,"mrssrendezvous",TCPHASH); addtolist(tcp_port_types,7395,"winqedit",TCPHASH); addtolist(tcp_port_types,7426,"pmdmgr",TCPHASH); addtolist(tcp_port_types,7427,"oveadmgr",TCPHASH); addtolist(tcp_port_types,7428,"ovladmgr",TCPHASH); addtolist(tcp_port_types,7429,"opi-sock",TCPHASH); addtolist(tcp_port_types,7430,"xmpv7",TCPHASH); addtolist(tcp_port_types,7431,"pmd",TCPHASH); addtolist(tcp_port_types,7437,"faximum",TCPHASH); addtolist(tcp_port_types,7491,"telops-lmd",TCPHASH); addtolist(tcp_port_types,7511,"pafec-lm",TCPHASH); addtolist(tcp_port_types,7544,"nta-ds",TCPHASH); addtolist(tcp_port_types,7545,"nta-us",TCPHASH); addtolist(tcp_port_types,7566,"vsi-omega",TCPHASH); addtolist(tcp_port_types,7570,"aries-kfinder",TCPHASH); addtolist(tcp_port_types,7588,"sun-lm",TCPHASH); addtolist(tcp_port_types,7633,"pmdfmgt",TCPHASH); addtolist(tcp_port_types,7777,"cbt",TCPHASH); addtolist(tcp_port_types,7778,"interwise",TCPHASH); addtolist(tcp_port_types,7779,"vstat",TCPHASH); addtolist(tcp_port_types,7781,"accu-lmgr",TCPHASH); addtolist(tcp_port_types,7786,"minivend",TCPHASH); addtolist(tcp_port_types,7913,"qo-secure",TCPHASH); addtolist(tcp_port_types,7932,"t2-drm",TCPHASH); addtolist(tcp_port_types,7933,"t2-brm",TCPHASH); addtolist(tcp_port_types,7967,"supercell",TCPHASH); addtolist(tcp_port_types,7979,"micromuse-ncps",TCPHASH); addtolist(tcp_port_types,7980,"quest-vista",TCPHASH); addtolist(tcp_port_types,7999,"irdmi2",TCPHASH); addtolist(tcp_port_types,8000,"irdmi",TCPHASH); addtolist(tcp_port_types,8001,"vcom-tunnel",TCPHASH); addtolist(tcp_port_types,8002,"teradataordbms",TCPHASH); addtolist(tcp_port_types,8008,"http-alt",TCPHASH); addtolist(tcp_port_types,8022,"oa-system",TCPHASH); addtolist(tcp_port_types,8032,"pro-ed",TCPHASH); addtolist(tcp_port_types,8033,"mindprint",TCPHASH); addtolist(tcp_port_types,8080,"http-alt",TCPHASH); addtolist(tcp_port_types,8130,"indigo-vrmi",TCPHASH); addtolist(tcp_port_types,8131,"indigo-vbcp",TCPHASH); addtolist(tcp_port_types,8132,"dbabble",TCPHASH); addtolist(tcp_port_types,8160,"patrol",TCPHASH); addtolist(tcp_port_types,8161,"patrol-snmp",TCPHASH); addtolist(tcp_port_types,8200,"trivnet1",TCPHASH); addtolist(tcp_port_types,8201,"trivnet2",TCPHASH); addtolist(tcp_port_types,8204,"lm-perfworks",TCPHASH); addtolist(tcp_port_types,8205,"lm-instmgr",TCPHASH); addtolist(tcp_port_types,8206,"lm-dta",TCPHASH); addtolist(tcp_port_types,8207,"lm-sserver",TCPHASH); addtolist(tcp_port_types,8208,"lm-webwatcher",TCPHASH); addtolist(tcp_port_types,8351,"server-find",TCPHASH); addtolist(tcp_port_types,8376,"cruise-enum",TCPHASH); addtolist(tcp_port_types,8377,"cruise-swroute",TCPHASH); addtolist(tcp_port_types,8378,"cruise-config",TCPHASH); addtolist(tcp_port_types,8379,"cruise-diags",TCPHASH); addtolist(tcp_port_types,8380,"cruise-update",TCPHASH); addtolist(tcp_port_types,8400,"cvd",TCPHASH); addtolist(tcp_port_types,8401,"sabarsd",TCPHASH); addtolist(tcp_port_types,8402,"abarsd",TCPHASH); addtolist(tcp_port_types,8403,"admind",TCPHASH); addtolist(tcp_port_types,8450,"npmp",TCPHASH); addtolist(tcp_port_types,8473,"vp2p",TCPHASH); addtolist(tcp_port_types,8554,"rtsp-alt",TCPHASH); addtolist(tcp_port_types,8733,"ibus",TCPHASH); addtolist(tcp_port_types,8763,"mc-appserver",TCPHASH); addtolist(tcp_port_types,8764,"openqueue",TCPHASH); addtolist(tcp_port_types,8765,"ultraseek-http",TCPHASH); addtolist(tcp_port_types,8804,"truecm",TCPHASH); addtolist(tcp_port_types,8880,"cddbp-alt",TCPHASH); addtolist(tcp_port_types,8888,"ddi-tcp-1",TCPHASH); addtolist(tcp_port_types,8889,"ddi-tcp-2",TCPHASH); addtolist(tcp_port_types,8890,"ddi-tcp-3",TCPHASH); addtolist(tcp_port_types,8891,"ddi-tcp-4",TCPHASH); addtolist(tcp_port_types,8892,"ddi-tcp-5",TCPHASH); addtolist(tcp_port_types,8893,"ddi-tcp-6",TCPHASH); addtolist(tcp_port_types,8894,"ddi-tcp-7",TCPHASH); addtolist(tcp_port_types,8900,"jmb-cds1",TCPHASH); addtolist(tcp_port_types,8901,"jmb-cds2",TCPHASH); addtolist(tcp_port_types,9000,"cslistener",TCPHASH); addtolist(tcp_port_types,9090,"websm",TCPHASH); addtolist(tcp_port_types,9091,"xmltec-xmlmail",TCPHASH); addtolist(tcp_port_types,9160,"netlock1",TCPHASH); addtolist(tcp_port_types,9161,"netlock2",TCPHASH); addtolist(tcp_port_types,9162,"netlock3",TCPHASH); addtolist(tcp_port_types,9163,"netlock4",TCPHASH); addtolist(tcp_port_types,9164,"netlock5",TCPHASH); addtolist(tcp_port_types,9200,"wap-wsp",TCPHASH); addtolist(tcp_port_types,9201,"wap-wsp-wtp",TCPHASH); addtolist(tcp_port_types,9202,"wap-wsp-s",TCPHASH); addtolist(tcp_port_types,9203,"wap-wsp-wtp-s",TCPHASH); addtolist(tcp_port_types,9204,"wap-vcard",TCPHASH); addtolist(tcp_port_types,9205,"wap-vcal",TCPHASH); addtolist(tcp_port_types,9206,"wap-vcard-s",TCPHASH); addtolist(tcp_port_types,9207,"wap-vcal-s",TCPHASH); addtolist(tcp_port_types,9283,"callwaveiam",TCPHASH); addtolist(tcp_port_types,9292,"armtechdaemon",TCPHASH); addtolist(tcp_port_types,9321,"guibase",TCPHASH); addtolist(tcp_port_types,9343,"mpidcmgr",TCPHASH); addtolist(tcp_port_types,9344,"mphlpdmc",TCPHASH); addtolist(tcp_port_types,9346,"ctechlicensing",TCPHASH); addtolist(tcp_port_types,9374,"fjdmimgr",TCPHASH); addtolist(tcp_port_types,9396,"fjinvmgr",TCPHASH); addtolist(tcp_port_types,9397,"mpidcagt",TCPHASH); addtolist(tcp_port_types,9500,"ismserver",TCPHASH); addtolist(tcp_port_types,9535,"mngsuite",TCPHASH); addtolist(tcp_port_types,9594,"msgsys",TCPHASH); addtolist(tcp_port_types,9595,"pds",TCPHASH); addtolist(tcp_port_types,9600,"micromuse-ncpw",TCPHASH); addtolist(tcp_port_types,9753,"rasadv",TCPHASH); addtolist(tcp_port_types,9876,"sd",TCPHASH); addtolist(tcp_port_types,9888,"cyborg-systems",TCPHASH); addtolist(tcp_port_types,9898,"monkeycom",TCPHASH); addtolist(tcp_port_types,9899,"sctp-tunneling",TCPHASH); addtolist(tcp_port_types,9900,"iua",TCPHASH); addtolist(tcp_port_types,9909,"domaintime",TCPHASH); addtolist(tcp_port_types,9950,"apcpcpluswin1",TCPHASH); addtolist(tcp_port_types,9951,"apcpcpluswin2",TCPHASH); addtolist(tcp_port_types,9952,"apcpcpluswin3",TCPHASH); addtolist(tcp_port_types,9992,"palace-1",TCPHASH); addtolist(tcp_port_types,9993,"palace-2",TCPHASH); addtolist(tcp_port_types,9994,"palace-3",TCPHASH); addtolist(tcp_port_types,9995,"palace-4",TCPHASH); addtolist(tcp_port_types,9996,"palace-5",TCPHASH); addtolist(tcp_port_types,9997,"palace-6",TCPHASH); addtolist(tcp_port_types,9998,"distinct32",TCPHASH); addtolist(tcp_port_types,9999,"distinct",TCPHASH); addtolist(tcp_port_types,10000,"ndmp",TCPHASH); addtolist(tcp_port_types,10007,"mvs-capacity",TCPHASH); addtolist(tcp_port_types,10080,"amanda",TCPHASH); addtolist(tcp_port_types,10113,"netiq-endpoint",TCPHASH); addtolist(tcp_port_types,10114,"netiq-qcheck",TCPHASH); addtolist(tcp_port_types,10115,"netiq-endpt",TCPHASH); addtolist(tcp_port_types,10128,"bmc-perf-sd",TCPHASH); addtolist(tcp_port_types,10288,"blocks",TCPHASH); addtolist(tcp_port_types,11000,"irisa",TCPHASH); addtolist(tcp_port_types,11001,"metasys",TCPHASH); addtolist(tcp_port_types,11111,"vce",TCPHASH); addtolist(tcp_port_types,11201,"smsqp",TCPHASH); addtolist(tcp_port_types,11319,"imip",TCPHASH); addtolist(tcp_port_types,11367,"atm-uhas",TCPHASH); addtolist(tcp_port_types,11720,"h323callsigalt",TCPHASH); addtolist(tcp_port_types,12000,"entextxid",TCPHASH); addtolist(tcp_port_types,12001,"entextnetwk",TCPHASH); addtolist(tcp_port_types,12002,"entexthigh",TCPHASH); addtolist(tcp_port_types,12003,"entextmed",TCPHASH); addtolist(tcp_port_types,12004,"entextlow",TCPHASH); addtolist(tcp_port_types,12172,"hivep",TCPHASH); addtolist(tcp_port_types,12753,"tsaf",TCPHASH); addtolist(tcp_port_types,13160,"i-zipqd",TCPHASH); addtolist(tcp_port_types,13223,"powwow-client",TCPHASH); addtolist(tcp_port_types,13224,"powwow-server",TCPHASH); addtolist(tcp_port_types,13720,"bprd",TCPHASH); addtolist(tcp_port_types,13721,"bpbrm",TCPHASH); addtolist(tcp_port_types,13722,"bpjava-msvc",TCPHASH); addtolist(tcp_port_types,13782,"bpcd",TCPHASH); addtolist(tcp_port_types,13783,"vopied",TCPHASH); addtolist(tcp_port_types,13818,"dsmcc-config",TCPHASH); addtolist(tcp_port_types,13819,"dsmcc-session",TCPHASH); addtolist(tcp_port_types,13820,"dsmcc-passthru",TCPHASH); addtolist(tcp_port_types,13821,"dsmcc-download",TCPHASH); addtolist(tcp_port_types,13822,"dsmcc-ccp",TCPHASH); addtolist(tcp_port_types,14001,"itu-sccp-ss7",TCPHASH); addtolist(tcp_port_types,14936,"hde-lcesrvr-1",TCPHASH); addtolist(tcp_port_types,14937,"hde-lcesrvr-2",TCPHASH); addtolist(tcp_port_types,16360,"netserialext1",TCPHASH); addtolist(tcp_port_types,16361,"netserialext2",TCPHASH); addtolist(tcp_port_types,16367,"netserialext3",TCPHASH); addtolist(tcp_port_types,16368,"netserialext4",TCPHASH); addtolist(tcp_port_types,16991,"intel-rci-mp",TCPHASH); addtolist(tcp_port_types,17007,"isode-dua",TCPHASH); addtolist(tcp_port_types,17185,"soundsvirtual",TCPHASH); addtolist(tcp_port_types,17219,"chipper",TCPHASH); addtolist(tcp_port_types,18000,"biimenu",TCPHASH); addtolist(tcp_port_types,18181,"opsec-cvp",TCPHASH); addtolist(tcp_port_types,18182,"opsec-ufp",TCPHASH); addtolist(tcp_port_types,18183,"opsec-sam",TCPHASH); addtolist(tcp_port_types,18184,"opsec-lea",TCPHASH); addtolist(tcp_port_types,18185,"opsec-omi",TCPHASH); addtolist(tcp_port_types,18187,"opsec-ela",TCPHASH); addtolist(tcp_port_types,18463,"ac-cluster",TCPHASH); addtolist(tcp_port_types,18888,"apc-necmp",TCPHASH); addtolist(tcp_port_types,19191,"opsec-uaa",TCPHASH); addtolist(tcp_port_types,19283,"keysrvr",TCPHASH); addtolist(tcp_port_types,19315,"keyshadow",TCPHASH); addtolist(tcp_port_types,19410,"hp-sco",TCPHASH); addtolist(tcp_port_types,19411,"hp-sca",TCPHASH); addtolist(tcp_port_types,19412,"hp-sessmon",TCPHASH); addtolist(tcp_port_types,19541,"jcp",TCPHASH); addtolist(tcp_port_types,20000,"dnp",TCPHASH); addtolist(tcp_port_types,20222,"ipulse-ics",TCPHASH); addtolist(tcp_port_types,20670,"track",TCPHASH); addtolist(tcp_port_types,20999,"athand-mmp",TCPHASH); addtolist(tcp_port_types,21590,"vofr-gateway",TCPHASH); addtolist(tcp_port_types,21845,"webphone",TCPHASH); addtolist(tcp_port_types,21846,"netspeak-is",TCPHASH); addtolist(tcp_port_types,21847,"netspeak-cs",TCPHASH); addtolist(tcp_port_types,21848,"netspeak-acd",TCPHASH); addtolist(tcp_port_types,21849,"netspeak-cps",TCPHASH); addtolist(tcp_port_types,22000,"snapenetio",TCPHASH); addtolist(tcp_port_types,22001,"optocontrol",TCPHASH); addtolist(tcp_port_types,22273,"wnn6",TCPHASH); addtolist(tcp_port_types,22555,"vocaltec-wconf",TCPHASH); addtolist(tcp_port_types,22800,"aws-brf",TCPHASH); addtolist(tcp_port_types,22951,"brf-gw",TCPHASH); addtolist(tcp_port_types,24000,"med-ltp",TCPHASH); addtolist(tcp_port_types,24001,"med-fsp-rx",TCPHASH); addtolist(tcp_port_types,24002,"med-fsp-tx",TCPHASH); addtolist(tcp_port_types,24003,"med-supp",TCPHASH); addtolist(tcp_port_types,24004,"med-ovw",TCPHASH); addtolist(tcp_port_types,24005,"med-ci",TCPHASH); addtolist(tcp_port_types,24006,"med-net-svc",TCPHASH); addtolist(tcp_port_types,24242,"filesphere",TCPHASH); addtolist(tcp_port_types,24386,"intel_rci",TCPHASH); addtolist(tcp_port_types,24554,"binkp",TCPHASH); addtolist(tcp_port_types,24677,"flashfiler",TCPHASH); addtolist(tcp_port_types,25000,"icl-twobase1",TCPHASH); addtolist(tcp_port_types,25001,"icl-twobase2",TCPHASH); addtolist(tcp_port_types,25002,"icl-twobase3",TCPHASH); addtolist(tcp_port_types,25003,"icl-twobase4",TCPHASH); addtolist(tcp_port_types,25004,"icl-twobase5",TCPHASH); addtolist(tcp_port_types,25005,"icl-twobase6",TCPHASH); addtolist(tcp_port_types,25006,"icl-twobase7",TCPHASH); addtolist(tcp_port_types,25007,"icl-twobase8",TCPHASH); addtolist(tcp_port_types,25008,"icl-twobase9",TCPHASH); addtolist(tcp_port_types,25009,"icl-twobase10",TCPHASH); addtolist(tcp_port_types,25793,"vocaltec-hos",TCPHASH); addtolist(tcp_port_types,25901,"niobserver",TCPHASH); addtolist(tcp_port_types,25903,"niprobe",TCPHASH); addtolist(tcp_port_types,26000,"quake",TCPHASH); addtolist(tcp_port_types,26208,"wnn6-ds",TCPHASH); addtolist(tcp_port_types,26262,"k3software-svr",TCPHASH); addtolist(tcp_port_types,26262,"k3software-svr",TCPHASH); addtolist(tcp_port_types,26264,"gserver",TCPHASH); addtolist(tcp_port_types,27345,"imagepump",TCPHASH); addtolist(tcp_port_types,27999,"tw-auth-key",TCPHASH); addtolist(tcp_port_types,32768,"filenet-tms",TCPHASH); addtolist(tcp_port_types,32769,"filenet-rpc",TCPHASH); addtolist(tcp_port_types,32770,"filenet-nch",TCPHASH); addtolist(tcp_port_types,33434,"traceroute",TCPHASH); addtolist(tcp_port_types,36865,"kastenxpipe",TCPHASH); addtolist(tcp_port_types,40841,"cscp",TCPHASH); addtolist(tcp_port_types,43188,"reachout",TCPHASH); addtolist(tcp_port_types,43189,"ndm-agent-port",TCPHASH); addtolist(tcp_port_types,43190,"ip-provision",TCPHASH); addtolist(tcp_port_types,44818,"rockwell-encap",TCPHASH); addtolist(tcp_port_types,45054,"invision-ag",TCPHASH); addtolist(tcp_port_types,45678,"eba",TCPHASH); addtolist(tcp_port_types,45966,"ssr-servermgr",TCPHASH); addtolist(tcp_port_types,47557,"dbbrowse",TCPHASH); addtolist(tcp_port_types,47624,"directplaysrvr",TCPHASH); addtolist(tcp_port_types,47806,"ap",TCPHASH); addtolist(tcp_port_types,47808,"bacnet",TCPHASH); addtolist(tcp_port_types,48000,"nimcontroller",TCPHASH); addtolist(tcp_port_types,48001,"nimspooler",TCPHASH); addtolist(tcp_port_types,48002,"nimhub",TCPHASH); addtolist(tcp_port_types,48003,"nimgtw",TCPHASH); addtolist(tcp_port_types,48556,"com-bardac-dw",TCPHASH); netdiag-1.2/netwatch-1.3.1-2/tcp.ports000066400000000000000000000367331323731111400172700ustar00rootroot000000000000000 1 2 3 5 7 9 11 13 17 18 19 20 21 22 23 24 25 27 29 31 33 35 37 38 39 41 42 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 80 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 105 106 107 108 109 110 111 112 113 113 114 115 116 117 118 119 120 121 122 123 124 125 126 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 242 243 244 245 246 247 248 256 257 258 259 260 261 262 263 264 265 266 267 268 280 281 282 283 284 286 287 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 333 344 345 346 347 348 349 350 351 351 352 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 704 705 706 707 709 710 711 729 730 731 741 742 744 747 748 749 750 751 752 753 754 758 759 760 761 762 763 764 765 767 769 770 771 772 773 774 775 776 777 780 786 787 800 801 810 828 829 847 873 886 887 888 888 900 901 902 903 911 989 990 991 992 993 994 995 996 997 998 999 999 1000 1010 1023 1024 1025 1030 1031 1032 1040 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1110 1111 1112 1114 1115 1116 1117 1122 1123 1155 1161 1162 1169 1180 1188 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1776 1777 1778 1779 1780 1781 1782 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1941 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1957 1960 1961 1962 1963 1964 1965 1966 1967 1972 1973 1974 1975 1976 1977 1978 1979 1984 1985 1986 1987 1988 1989 1989 1990 1991 1992 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2030 2032 2033 2034 2035 2038 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2049 2065 2067 2087 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2165 2166 2180 2181 2200 2201 2202 2213 2220 2221 2222 2223 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2250 2255 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2381 2382 2383 2384 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3000 3001 3002 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3059 3060 3061 3062 3063 3065 3066 3067 3068 3069 3070 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3100 3105 3106 3130 3131 3141 3142 3143 3144 3145 3147 3148 3149 3150 3151 3180 3181 3182 3262 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3421 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3535 3563 3672 3709 3802 3845 3862 3875 3900 3984 3985 3986 3987 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4042 4096 4097 4098 4099 4132 4133 4134 4141 4142 4143 4160 4199 4300 4321 4343 4344 4345 4346 4347 4348 4349 4350 4351 4353 4442 4443 4444 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4500 4501 4545 4546 4547 4567 4568 4600 4601 4672 4800 4801 4802 4827 4837 4838 4868 4869 4885 4983 5000 5001 5002 5003 5004 5005 5006 5007 5010 5011 5020 5021 5042 5050 5051 5052 5055 5056 5057 5060 5061 5066 5069 5071 5093 5099 5145 5150 5151 5152 5165 5190 5191 5192 5193 5200 5201 5202 5203 5236 5272 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5314 5315 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5426 5427 5428 5429 5430 5431 5435 5454 5455 5456 5461 5462 5465 5500 5501 5502 5503 5504 5554 5555 5566 5599 5600 5601 5602 5603 5604 5605 5631 5632 5678 5679 5713 5714 5715 5716 5717 5729 5741 5742 5745 5746 5755 5757 5766 5767 5768 5771 5813 5859 5968 5969 5987 5988 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6123 6141 6142 6143 6144 6145 6146 6147 6148 6149 6253 6300 6321 6322 6346 6347 6389 6455 6456 6471 6500 6501 6502 6503 6505 6506 6507 6508 6547 6548 6549 6550 6558 6580 6581 6582 6665 6666 6667 6668 6669 6670 6672 6673 6701 6714 6767 6768 6790 6831 6841 6842 6850 6888 6961 6962 6963 6964 6965 6966 6969 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7020 7021 7070 7099 7100 7121 7174 7200 7201 7280 7281 7391 7392 7395 7426 7427 7428 7429 7430 7431 7437 7491 7511 7544 7545 7566 7570 7588 7633 7777 7778 7779 7781 7786 7913 7932 7933 7967 7979 7980 7999 8000 8001 8002 8008 8022 8032 8033 8080 8130 8131 8132 8160 8161 8200 8201 8204 8205 8206 8207 8208 8351 8376 8377 8378 8379 8380 8400 8401 8402 8403 8450 8473 8554 8733 8763 8764 8765 8804 8880 8888 8889 8890 8891 8892 8893 8894 8900 8901 9000 9090 9091 9160 9161 9162 9163 9164 9200 9201 9202 9203 9204 9205 9206 9207 9283 9292 9321 9343 9344 9346 9374 9396 9397 9500 9535 9594 9595 9600 9753 9876 9888 9898 9899 9900 9909 9950 9951 9952 9992 9993 9994 9995 9996 9997 9998 9999 10000 10007 10080 10113 10114 10115 10128 10288 11000 11001 11111 11201 11319 11367 11720 12000 12001 12002 12003 12004 12172 12753 13160 13223 13224 13720 13721 13722 13782 13783 13818 13819 13820 13821 13822 14001 14936 14937 16360 16361 16367 16368 16991 17007 17185 17219 18000 18181 18182 18183 18184 18185 18187 18463 18888 19191 19283 19315 19410 19411 19412 19541 20000 20222 20670 20999 21590 21845 21846 21847 21848 21849 22000 22001 22273 22555 22800 22951 24000 24001 24002 24003 24004 24005 24006 24242 24386 24554 24677 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25793 25901 25903 26000 26208 26262 26262 26264 27345 27999 32768 32769 32770 33434 36865 40841 43188 43189 43190 44818 45054 45678 45966 47557 47624 47806 47808 48000 48001 48002 48003 48556 netdiag-1.2/netwatch-1.3.1-2/udp.gen000066400000000000000000005126701323731111400166730ustar00rootroot00000000000000addtolist(udp_port_types,0,"0-reserved",UDPHASH); addtolist(udp_port_types,1,"tcpmux",UDPHASH); addtolist(udp_port_types,2,"compressnet",UDPHASH); addtolist(udp_port_types,3,"compressnet",UDPHASH); addtolist(udp_port_types,5,"rje",UDPHASH); addtolist(udp_port_types,7,"echo",UDPHASH); addtolist(udp_port_types,9,"discard",UDPHASH); addtolist(udp_port_types,11,"systat",UDPHASH); addtolist(udp_port_types,13,"daytime",UDPHASH); addtolist(udp_port_types,17,"qotd",UDPHASH); addtolist(udp_port_types,18,"msp",UDPHASH); addtolist(udp_port_types,19,"chargen",UDPHASH); addtolist(udp_port_types,20,"ftp-data",UDPHASH); addtolist(udp_port_types,21,"ftp",UDPHASH); addtolist(udp_port_types,22,"ssh",UDPHASH); addtolist(udp_port_types,23,"telnet",UDPHASH); addtolist(udp_port_types,24,"priv-mail-system",UDPHASH); addtolist(udp_port_types,25,"smtp",UDPHASH); addtolist(udp_port_types,27,"nsw-fe",UDPHASH); addtolist(udp_port_types,29,"msg-icp",UDPHASH); addtolist(udp_port_types,31,"msg-auth",UDPHASH); addtolist(udp_port_types,33,"dsp",UDPHASH); addtolist(udp_port_types,35,"priv-printer-server",UDPHASH); addtolist(udp_port_types,37,"time",UDPHASH); addtolist(udp_port_types,38,"rap",UDPHASH); addtolist(udp_port_types,39,"rlp",UDPHASH); addtolist(udp_port_types,41,"graphics",UDPHASH); addtolist(udp_port_types,42,"name",UDPHASH); addtolist(udp_port_types,42,"nameserver",UDPHASH); addtolist(udp_port_types,43,"nicname",UDPHASH); addtolist(udp_port_types,44,"mpm-flags",UDPHASH); addtolist(udp_port_types,45,"mpm",UDPHASH); addtolist(udp_port_types,46,"mpm-snd",UDPHASH); addtolist(udp_port_types,47,"ni-ftp",UDPHASH); addtolist(udp_port_types,48,"auditd",UDPHASH); addtolist(udp_port_types,49,"tacacs",UDPHASH); addtolist(udp_port_types,50,"re-mail-ck",UDPHASH); addtolist(udp_port_types,51,"la-maint",UDPHASH); addtolist(udp_port_types,52,"xns-time",UDPHASH); addtolist(udp_port_types,53,"domain",UDPHASH); addtolist(udp_port_types,54,"xns-ch",UDPHASH); addtolist(udp_port_types,55,"isi-gl",UDPHASH); addtolist(udp_port_types,56,"xns-auth",UDPHASH); addtolist(udp_port_types,57,"priv-terminal-access",UDPHASH); addtolist(udp_port_types,58,"xns-mail",UDPHASH); addtolist(udp_port_types,59,"priv-file-service",UDPHASH); addtolist(udp_port_types,60,"60-reserved",UDPHASH); addtolist(udp_port_types,61,"ni-mail",UDPHASH); addtolist(udp_port_types,62,"acas",UDPHASH); addtolist(udp_port_types,63,"whois++",UDPHASH); addtolist(udp_port_types,64,"covia",UDPHASH); addtolist(udp_port_types,65,"tacacs-ds",UDPHASH); addtolist(udp_port_types,66,"sql*net",UDPHASH); addtolist(udp_port_types,67,"bootps",UDPHASH); addtolist(udp_port_types,68,"bootpc",UDPHASH); addtolist(udp_port_types,69,"tftp",UDPHASH); addtolist(udp_port_types,70,"gopher",UDPHASH); addtolist(udp_port_types,71,"netrjs-1",UDPHASH); addtolist(udp_port_types,72,"netrjs-2",UDPHASH); addtolist(udp_port_types,73,"netrjs-3",UDPHASH); addtolist(udp_port_types,74,"netrjs-4",UDPHASH); addtolist(udp_port_types,75,"priv-dial-out-service",UDPHASH); addtolist(udp_port_types,76,"deos",UDPHASH); addtolist(udp_port_types,77,"priv-RJE-service",UDPHASH); addtolist(udp_port_types,78,"vettcp",UDPHASH); addtolist(udp_port_types,79,"finger",UDPHASH); addtolist(udp_port_types,80,"http",UDPHASH); addtolist(udp_port_types,80,"www",UDPHASH); addtolist(udp_port_types,80,"www-http",UDPHASH); addtolist(udp_port_types,81,"hosts2-ns",UDPHASH); addtolist(udp_port_types,82,"xfer",UDPHASH); addtolist(udp_port_types,83,"mit-ml-dev",UDPHASH); addtolist(udp_port_types,84,"ctf",UDPHASH); addtolist(udp_port_types,85,"mit-ml-dev",UDPHASH); addtolist(udp_port_types,86,"mfcobol",UDPHASH); addtolist(udp_port_types,87,"priv-terminal-link",UDPHASH); addtolist(udp_port_types,88,"kerberos",UDPHASH); addtolist(udp_port_types,89,"su-mit-tg",UDPHASH); addtolist(udp_port_types,90,"dnsix",UDPHASH); addtolist(udp_port_types,91,"mit-dov",UDPHASH); addtolist(udp_port_types,92,"npp",UDPHASH); addtolist(udp_port_types,93,"dcp",UDPHASH); addtolist(udp_port_types,94,"objcall",UDPHASH); addtolist(udp_port_types,95,"supdup",UDPHASH); addtolist(udp_port_types,96,"dixie",UDPHASH); addtolist(udp_port_types,97,"swift-rvf",UDPHASH); addtolist(udp_port_types,98,"tacnews",UDPHASH); addtolist(udp_port_types,99,"metagram",UDPHASH); addtolist(udp_port_types,101,"hostname",UDPHASH); addtolist(udp_port_types,102,"iso-tsap",UDPHASH); addtolist(udp_port_types,103,"gppitnp",UDPHASH); addtolist(udp_port_types,104,"acr-nema",UDPHASH); addtolist(udp_port_types,105,"cso",UDPHASH); addtolist(udp_port_types,105,"csnet-ns",UDPHASH); addtolist(udp_port_types,106,"3com-tsmux",UDPHASH); addtolist(udp_port_types,107,"rtelnet",UDPHASH); addtolist(udp_port_types,108,"snagas",UDPHASH); addtolist(udp_port_types,109,"pop2",UDPHASH); addtolist(udp_port_types,110,"pop3",UDPHASH); addtolist(udp_port_types,111,"sunrpc",UDPHASH); addtolist(udp_port_types,112,"mcidas",UDPHASH); addtolist(udp_port_types,113,"auth",UDPHASH); addtolist(udp_port_types,114,"audionews",UDPHASH); addtolist(udp_port_types,115,"sftp",UDPHASH); addtolist(udp_port_types,116,"ansanotify",UDPHASH); addtolist(udp_port_types,117,"uucp-path",UDPHASH); addtolist(udp_port_types,118,"sqlserv",UDPHASH); addtolist(udp_port_types,119,"nntp",UDPHASH); addtolist(udp_port_types,120,"cfdptkt",UDPHASH); addtolist(udp_port_types,121,"erpc",UDPHASH); addtolist(udp_port_types,122,"smakynet",UDPHASH); addtolist(udp_port_types,123,"ntp",UDPHASH); addtolist(udp_port_types,124,"ansatrader",UDPHASH); addtolist(udp_port_types,125,"locus-map",UDPHASH); addtolist(udp_port_types,126,"nxedit",UDPHASH); addtolist(udp_port_types,126,"#unitary",UDPHASH); addtolist(udp_port_types,127,"locus-con",UDPHASH); addtolist(udp_port_types,128,"gss-xlicen",UDPHASH); addtolist(udp_port_types,129,"pwdgen",UDPHASH); addtolist(udp_port_types,130,"cisco-fna",UDPHASH); addtolist(udp_port_types,131,"cisco-tna",UDPHASH); addtolist(udp_port_types,132,"cisco-sys",UDPHASH); addtolist(udp_port_types,133,"statsrv",UDPHASH); addtolist(udp_port_types,134,"ingres-net",UDPHASH); addtolist(udp_port_types,135,"epmap",UDPHASH); addtolist(udp_port_types,136,"profile",UDPHASH); addtolist(udp_port_types,137,"netbios-ns",UDPHASH); addtolist(udp_port_types,138,"netbios-dgm",UDPHASH); addtolist(udp_port_types,139,"netbios-ssn",UDPHASH); addtolist(udp_port_types,140,"emfis-data",UDPHASH); addtolist(udp_port_types,141,"emfis-cntl",UDPHASH); addtolist(udp_port_types,142,"bl-idm",UDPHASH); addtolist(udp_port_types,143,"imap",UDPHASH); addtolist(udp_port_types,144,"uma",UDPHASH); addtolist(udp_port_types,145,"uaac",UDPHASH); addtolist(udp_port_types,146,"iso-tp0",UDPHASH); addtolist(udp_port_types,147,"iso-ip",UDPHASH); addtolist(udp_port_types,148,"jargon",UDPHASH); addtolist(udp_port_types,149,"aed-512",UDPHASH); addtolist(udp_port_types,150,"sql-net",UDPHASH); addtolist(udp_port_types,151,"hems",UDPHASH); addtolist(udp_port_types,152,"bftp",UDPHASH); addtolist(udp_port_types,153,"sgmp",UDPHASH); addtolist(udp_port_types,154,"netsc-prod",UDPHASH); addtolist(udp_port_types,155,"netsc-dev",UDPHASH); addtolist(udp_port_types,156,"sqlsrv",UDPHASH); addtolist(udp_port_types,157,"knet-cmp",UDPHASH); addtolist(udp_port_types,158,"pcmail-srv",UDPHASH); addtolist(udp_port_types,159,"nss-routing",UDPHASH); addtolist(udp_port_types,160,"sgmp-traps",UDPHASH); addtolist(udp_port_types,161,"snmp",UDPHASH); addtolist(udp_port_types,162,"snmptrap",UDPHASH); addtolist(udp_port_types,163,"cmip-man",UDPHASH); addtolist(udp_port_types,164,"smip-agent",UDPHASH); addtolist(udp_port_types,165,"xns-courier",UDPHASH); addtolist(udp_port_types,166,"s-net",UDPHASH); addtolist(udp_port_types,167,"namp",UDPHASH); addtolist(udp_port_types,168,"rsvd",UDPHASH); addtolist(udp_port_types,169,"send",UDPHASH); addtolist(udp_port_types,170,"print-srv",UDPHASH); addtolist(udp_port_types,171,"multiplex",UDPHASH); addtolist(udp_port_types,172,"cl/1",UDPHASH); addtolist(udp_port_types,173,"xyplex-mux",UDPHASH); addtolist(udp_port_types,174,"mailq",UDPHASH); addtolist(udp_port_types,175,"vmnet",UDPHASH); addtolist(udp_port_types,176,"genrad-mux",UDPHASH); addtolist(udp_port_types,177,"xdmcp",UDPHASH); addtolist(udp_port_types,178,"nextstep",UDPHASH); addtolist(udp_port_types,179,"bgp",UDPHASH); addtolist(udp_port_types,180,"ris",UDPHASH); addtolist(udp_port_types,181,"unify",UDPHASH); addtolist(udp_port_types,182,"audit",UDPHASH); addtolist(udp_port_types,183,"ocbinder",UDPHASH); addtolist(udp_port_types,184,"ocserver",UDPHASH); addtolist(udp_port_types,185,"remote-kis",UDPHASH); addtolist(udp_port_types,186,"kis",UDPHASH); addtolist(udp_port_types,187,"aci",UDPHASH); addtolist(udp_port_types,188,"mumps",UDPHASH); addtolist(udp_port_types,189,"qft",UDPHASH); addtolist(udp_port_types,190,"gacp",UDPHASH); addtolist(udp_port_types,191,"prospero",UDPHASH); addtolist(udp_port_types,192,"osu-nms",UDPHASH); addtolist(udp_port_types,193,"srmp",UDPHASH); addtolist(udp_port_types,194,"irc",UDPHASH); addtolist(udp_port_types,195,"dn6-nlm-aud",UDPHASH); addtolist(udp_port_types,196,"dn6-smm-red",UDPHASH); addtolist(udp_port_types,197,"dls",UDPHASH); addtolist(udp_port_types,198,"dls-mon",UDPHASH); addtolist(udp_port_types,199,"smux",UDPHASH); addtolist(udp_port_types,200,"src",UDPHASH); addtolist(udp_port_types,201,"at-rtmp",UDPHASH); addtolist(udp_port_types,202,"at-nbp",UDPHASH); addtolist(udp_port_types,203,"at-3",UDPHASH); addtolist(udp_port_types,204,"at-echo",UDPHASH); addtolist(udp_port_types,205,"at-5",UDPHASH); addtolist(udp_port_types,206,"at-zis",UDPHASH); addtolist(udp_port_types,207,"at-7",UDPHASH); addtolist(udp_port_types,208,"at-8",UDPHASH); addtolist(udp_port_types,209,"qmtp",UDPHASH); addtolist(udp_port_types,210,"z39.50",UDPHASH); addtolist(udp_port_types,211,"914c/g",UDPHASH); addtolist(udp_port_types,212,"anet",UDPHASH); addtolist(udp_port_types,213,"ipx",UDPHASH); addtolist(udp_port_types,214,"vmpwscs",UDPHASH); addtolist(udp_port_types,215,"softpc",UDPHASH); addtolist(udp_port_types,216,"CAIlic",UDPHASH); addtolist(udp_port_types,217,"dbase",UDPHASH); addtolist(udp_port_types,218,"mpp",UDPHASH); addtolist(udp_port_types,219,"uarps",UDPHASH); addtolist(udp_port_types,220,"imap3",UDPHASH); addtolist(udp_port_types,221,"fln-spx",UDPHASH); addtolist(udp_port_types,222,"rsh-spx",UDPHASH); addtolist(udp_port_types,223,"cdc",UDPHASH); addtolist(udp_port_types,224,"masqdialer",UDPHASH); addtolist(udp_port_types,242,"direct",UDPHASH); addtolist(udp_port_types,243,"sur-meas",UDPHASH); addtolist(udp_port_types,244,"inbusiness",UDPHASH); addtolist(udp_port_types,245,"link",UDPHASH); addtolist(udp_port_types,246,"dsp3270",UDPHASH); addtolist(udp_port_types,247,"subntbcst_tftp",UDPHASH); addtolist(udp_port_types,248,"bhfhs",UDPHASH); addtolist(udp_port_types,256,"rap",UDPHASH); addtolist(udp_port_types,257,"set",UDPHASH); addtolist(udp_port_types,258,"yak-chat",UDPHASH); addtolist(udp_port_types,259,"esro-gen",UDPHASH); addtolist(udp_port_types,260,"openport",UDPHASH); addtolist(udp_port_types,261,"nsiiops",UDPHASH); addtolist(udp_port_types,262,"arcisdms",UDPHASH); addtolist(udp_port_types,263,"hdap",UDPHASH); addtolist(udp_port_types,264,"bgmp",UDPHASH); addtolist(udp_port_types,265,"x-bone-ctl",UDPHASH); addtolist(udp_port_types,266,"sst",UDPHASH); addtolist(udp_port_types,267,"td-service",UDPHASH); addtolist(udp_port_types,268,"td-replica",UDPHASH); addtolist(udp_port_types,280,"http-mgmt",UDPHASH); addtolist(udp_port_types,281,"personal-link",UDPHASH); addtolist(udp_port_types,282,"cableport-ax",UDPHASH); addtolist(udp_port_types,283,"rescap",UDPHASH); addtolist(udp_port_types,284,"corerjd",UDPHASH); addtolist(udp_port_types,286,"fxp-1",UDPHASH); addtolist(udp_port_types,287,"k-block",UDPHASH); addtolist(udp_port_types,308,"novastorbakcup",UDPHASH); addtolist(udp_port_types,309,"entrusttime",UDPHASH); addtolist(udp_port_types,310,"bhmds",UDPHASH); addtolist(udp_port_types,311,"asip-webadmin",UDPHASH); addtolist(udp_port_types,312,"vslmp",UDPHASH); addtolist(udp_port_types,313,"magenta-logic",UDPHASH); addtolist(udp_port_types,314,"opalis-robot",UDPHASH); addtolist(udp_port_types,315,"dpsi",UDPHASH); addtolist(udp_port_types,316,"decauth",UDPHASH); addtolist(udp_port_types,317,"zannet",UDPHASH); addtolist(udp_port_types,318,"pkix-timestamp",UDPHASH); addtolist(udp_port_types,319,"ptp-event",UDPHASH); addtolist(udp_port_types,320,"ptp-general",UDPHASH); addtolist(udp_port_types,321,"pip",UDPHASH); addtolist(udp_port_types,322,"rtsps",UDPHASH); addtolist(udp_port_types,333,"texar",UDPHASH); addtolist(udp_port_types,344,"pdap",UDPHASH); addtolist(udp_port_types,345,"pawserv",UDPHASH); addtolist(udp_port_types,346,"zserv",UDPHASH); addtolist(udp_port_types,347,"fatserv",UDPHASH); addtolist(udp_port_types,348,"csi-sgwp",UDPHASH); addtolist(udp_port_types,349,"mftp",UDPHASH); addtolist(udp_port_types,350,"matip-type-a",UDPHASH); addtolist(udp_port_types,351,"matip-type-b",UDPHASH); addtolist(udp_port_types,351,"bhoetty",UDPHASH); addtolist(udp_port_types,352,"dtag-ste-sb",UDPHASH); addtolist(udp_port_types,352,"bhoedap4",UDPHASH); addtolist(udp_port_types,353,"ndsauth",UDPHASH); addtolist(udp_port_types,354,"bh611",UDPHASH); addtolist(udp_port_types,355,"datex-asn",UDPHASH); addtolist(udp_port_types,356,"cloanto-net-1",UDPHASH); addtolist(udp_port_types,357,"bhevent",UDPHASH); addtolist(udp_port_types,358,"shrinkwrap",UDPHASH); addtolist(udp_port_types,359,"tenebris_nts",UDPHASH); addtolist(udp_port_types,360,"scoi2odialog",UDPHASH); addtolist(udp_port_types,361,"semantix",UDPHASH); addtolist(udp_port_types,362,"srssend",UDPHASH); addtolist(udp_port_types,363,"rsvp_tunnel",UDPHASH); addtolist(udp_port_types,364,"aurora-cmgr",UDPHASH); addtolist(udp_port_types,365,"dtk",UDPHASH); addtolist(udp_port_types,366,"odmr",UDPHASH); addtolist(udp_port_types,367,"mortgageware",UDPHASH); addtolist(udp_port_types,368,"qbikgdp",UDPHASH); addtolist(udp_port_types,369,"rpc2portmap",UDPHASH); addtolist(udp_port_types,370,"codaauth2",UDPHASH); addtolist(udp_port_types,371,"clearcase",UDPHASH); addtolist(udp_port_types,372,"ulistproc",UDPHASH); addtolist(udp_port_types,373,"legent-1",UDPHASH); addtolist(udp_port_types,374,"legent-2",UDPHASH); addtolist(udp_port_types,375,"hassle",UDPHASH); addtolist(udp_port_types,376,"nip",UDPHASH); addtolist(udp_port_types,377,"tnETOS",UDPHASH); addtolist(udp_port_types,378,"dsETOS",UDPHASH); addtolist(udp_port_types,379,"is99c",UDPHASH); addtolist(udp_port_types,380,"is99s",UDPHASH); addtolist(udp_port_types,381,"hp-collector",UDPHASH); addtolist(udp_port_types,382,"hp-managed-node",UDPHASH); addtolist(udp_port_types,383,"hp-alarm-mgr",UDPHASH); addtolist(udp_port_types,384,"arns",UDPHASH); addtolist(udp_port_types,385,"ibm-app",UDPHASH); addtolist(udp_port_types,386,"asa",UDPHASH); addtolist(udp_port_types,387,"aurp",UDPHASH); addtolist(udp_port_types,388,"unidata-ldm",UDPHASH); addtolist(udp_port_types,389,"ldap",UDPHASH); addtolist(udp_port_types,390,"uis",UDPHASH); addtolist(udp_port_types,391,"synotics-relay",UDPHASH); addtolist(udp_port_types,392,"synotics-broker",UDPHASH); addtolist(udp_port_types,393,"meta5",UDPHASH); addtolist(udp_port_types,394,"embl-ndt",UDPHASH); addtolist(udp_port_types,395,"netcp",UDPHASH); addtolist(udp_port_types,396,"netware-ip",UDPHASH); addtolist(udp_port_types,397,"mptn",UDPHASH); addtolist(udp_port_types,398,"kryptolan",UDPHASH); addtolist(udp_port_types,399,"iso-tsap-c2",UDPHASH); addtolist(udp_port_types,400,"work-sol",UDPHASH); addtolist(udp_port_types,401,"ups",UDPHASH); addtolist(udp_port_types,402,"genie",UDPHASH); addtolist(udp_port_types,403,"decap",UDPHASH); addtolist(udp_port_types,404,"nced",UDPHASH); addtolist(udp_port_types,405,"ncld",UDPHASH); addtolist(udp_port_types,406,"imsp",UDPHASH); addtolist(udp_port_types,407,"timbuktu",UDPHASH); addtolist(udp_port_types,408,"prm-sm",UDPHASH); addtolist(udp_port_types,409,"prm-nm",UDPHASH); addtolist(udp_port_types,410,"decladebug",UDPHASH); addtolist(udp_port_types,411,"rmt",UDPHASH); addtolist(udp_port_types,412,"synoptics-trap",UDPHASH); addtolist(udp_port_types,413,"smsp",UDPHASH); addtolist(udp_port_types,414,"infoseek",UDPHASH); addtolist(udp_port_types,415,"bnet",UDPHASH); addtolist(udp_port_types,416,"silverplatter",UDPHASH); addtolist(udp_port_types,417,"onmux",UDPHASH); addtolist(udp_port_types,418,"hyper-g",UDPHASH); addtolist(udp_port_types,419,"ariel1",UDPHASH); addtolist(udp_port_types,420,"smpte",UDPHASH); addtolist(udp_port_types,421,"ariel2",UDPHASH); addtolist(udp_port_types,422,"ariel3",UDPHASH); addtolist(udp_port_types,423,"opc-job-start",UDPHASH); addtolist(udp_port_types,424,"opc-job-track",UDPHASH); addtolist(udp_port_types,425,"icad-el",UDPHASH); addtolist(udp_port_types,426,"smartsdp",UDPHASH); addtolist(udp_port_types,427,"svrloc",UDPHASH); addtolist(udp_port_types,428,"ocs_cmu",UDPHASH); addtolist(udp_port_types,429,"ocs_amu",UDPHASH); addtolist(udp_port_types,430,"utmpsd",UDPHASH); addtolist(udp_port_types,431,"utmpcd",UDPHASH); addtolist(udp_port_types,432,"iasd",UDPHASH); addtolist(udp_port_types,433,"nnsp",UDPHASH); addtolist(udp_port_types,434,"mobileip-agent",UDPHASH); addtolist(udp_port_types,435,"mobilip-mn",UDPHASH); addtolist(udp_port_types,436,"dna-cml",UDPHASH); addtolist(udp_port_types,437,"comscm",UDPHASH); addtolist(udp_port_types,438,"dsfgw",UDPHASH); addtolist(udp_port_types,439,"dasp",UDPHASH); addtolist(udp_port_types,440,"sgcp",UDPHASH); addtolist(udp_port_types,441,"decvms-sysmgt",UDPHASH); addtolist(udp_port_types,442,"cvc_hostd",UDPHASH); addtolist(udp_port_types,443,"https",UDPHASH); addtolist(udp_port_types,444,"snpp",UDPHASH); addtolist(udp_port_types,445,"microsoft-ds",UDPHASH); addtolist(udp_port_types,446,"ddm-rdb",UDPHASH); addtolist(udp_port_types,447,"ddm-dfm",UDPHASH); addtolist(udp_port_types,448,"ddm-ssl",UDPHASH); addtolist(udp_port_types,449,"as-servermap",UDPHASH); addtolist(udp_port_types,450,"tserver",UDPHASH); addtolist(udp_port_types,451,"sfs-smp-net",UDPHASH); addtolist(udp_port_types,452,"sfs-config",UDPHASH); addtolist(udp_port_types,453,"creativeserver",UDPHASH); addtolist(udp_port_types,454,"contentserver",UDPHASH); addtolist(udp_port_types,455,"creativepartnr",UDPHASH); addtolist(udp_port_types,456,"macon-udp",UDPHASH); addtolist(udp_port_types,457,"scohelp",UDPHASH); addtolist(udp_port_types,458,"appleqtc",UDPHASH); addtolist(udp_port_types,459,"ampr-rcmd",UDPHASH); addtolist(udp_port_types,460,"skronk",UDPHASH); addtolist(udp_port_types,461,"datasurfsrv",UDPHASH); addtolist(udp_port_types,462,"datasurfsrvsec",UDPHASH); addtolist(udp_port_types,463,"alpes",UDPHASH); addtolist(udp_port_types,464,"kpasswd",UDPHASH); addtolist(udp_port_types,466,"digital-vrc",UDPHASH); addtolist(udp_port_types,467,"mylex-mapd",UDPHASH); addtolist(udp_port_types,468,"photuris",UDPHASH); addtolist(udp_port_types,469,"rcp",UDPHASH); addtolist(udp_port_types,470,"scx-proxy",UDPHASH); addtolist(udp_port_types,471,"mondex",UDPHASH); addtolist(udp_port_types,472,"ljk-login",UDPHASH); addtolist(udp_port_types,473,"hybrid-pop",UDPHASH); addtolist(udp_port_types,474,"tn-tl-w2",UDPHASH); addtolist(udp_port_types,475,"tcpnethaspsrv",UDPHASH); addtolist(udp_port_types,476,"tn-tl-fd1",UDPHASH); addtolist(udp_port_types,477,"ss7ns",UDPHASH); addtolist(udp_port_types,478,"spsc",UDPHASH); addtolist(udp_port_types,479,"iafserver",UDPHASH); addtolist(udp_port_types,480,"iafdbase",UDPHASH); addtolist(udp_port_types,481,"ph",UDPHASH); addtolist(udp_port_types,482,"bgs-nsi",UDPHASH); addtolist(udp_port_types,483,"ulpnet",UDPHASH); addtolist(udp_port_types,484,"integra-sme",UDPHASH); addtolist(udp_port_types,485,"powerburst",UDPHASH); addtolist(udp_port_types,486,"avian",UDPHASH); addtolist(udp_port_types,487,"saft",UDPHASH); addtolist(udp_port_types,488,"gss-http",UDPHASH); addtolist(udp_port_types,489,"nest-protocol",UDPHASH); addtolist(udp_port_types,490,"micom-pfs",UDPHASH); addtolist(udp_port_types,491,"go-login",UDPHASH); addtolist(udp_port_types,492,"ticf-1",UDPHASH); addtolist(udp_port_types,493,"ticf-2",UDPHASH); addtolist(udp_port_types,494,"pov-ray",UDPHASH); addtolist(udp_port_types,495,"intecourier",UDPHASH); addtolist(udp_port_types,496,"pim-rp-disc",UDPHASH); addtolist(udp_port_types,497,"dantz",UDPHASH); addtolist(udp_port_types,498,"siam",UDPHASH); addtolist(udp_port_types,499,"iso-ill",UDPHASH); addtolist(udp_port_types,500,"isakmp",UDPHASH); addtolist(udp_port_types,501,"stmf",UDPHASH); addtolist(udp_port_types,502,"asa-appl-proto",UDPHASH); addtolist(udp_port_types,503,"intrinsa",UDPHASH); addtolist(udp_port_types,504,"citadel",UDPHASH); addtolist(udp_port_types,505,"mailbox-lm",UDPHASH); addtolist(udp_port_types,506,"ohimsrv",UDPHASH); addtolist(udp_port_types,507,"crs",UDPHASH); addtolist(udp_port_types,508,"xvttp",UDPHASH); addtolist(udp_port_types,509,"snare",UDPHASH); addtolist(udp_port_types,510,"fcp",UDPHASH); addtolist(udp_port_types,511,"passgo",UDPHASH); addtolist(udp_port_types,512,"comsat",UDPHASH); addtolist(udp_port_types,512,"biff",UDPHASH); addtolist(udp_port_types,513,"who",UDPHASH); addtolist(udp_port_types,514,"syslog",UDPHASH); addtolist(udp_port_types,515,"printer",UDPHASH); addtolist(udp_port_types,516,"videotex",UDPHASH); addtolist(udp_port_types,517,"talk",UDPHASH); addtolist(udp_port_types,518,"ntalk",UDPHASH); addtolist(udp_port_types,519,"utime",UDPHASH); addtolist(udp_port_types,520,"router",UDPHASH); addtolist(udp_port_types,521,"ripng",UDPHASH); addtolist(udp_port_types,522,"ulp",UDPHASH); addtolist(udp_port_types,523,"ibm-db2",UDPHASH); addtolist(udp_port_types,524,"ncp",UDPHASH); addtolist(udp_port_types,525,"timed",UDPHASH); addtolist(udp_port_types,526,"tempo",UDPHASH); addtolist(udp_port_types,527,"stx",UDPHASH); addtolist(udp_port_types,528,"custix",UDPHASH); addtolist(udp_port_types,529,"irc-serv",UDPHASH); addtolist(udp_port_types,530,"courier",UDPHASH); addtolist(udp_port_types,531,"conference",UDPHASH); addtolist(udp_port_types,532,"netnews",UDPHASH); addtolist(udp_port_types,533,"netwall",UDPHASH); addtolist(udp_port_types,534,"mm-admin",UDPHASH); addtolist(udp_port_types,535,"iiop",UDPHASH); addtolist(udp_port_types,536,"opalis-rdv",UDPHASH); addtolist(udp_port_types,537,"nmsp",UDPHASH); addtolist(udp_port_types,538,"gdomap",UDPHASH); addtolist(udp_port_types,539,"apertus-ldp",UDPHASH); addtolist(udp_port_types,540,"uucp",UDPHASH); addtolist(udp_port_types,541,"uucp-rlogin",UDPHASH); addtolist(udp_port_types,542,"commerce",UDPHASH); addtolist(udp_port_types,543,"klogin",UDPHASH); addtolist(udp_port_types,544,"kshell",UDPHASH); addtolist(udp_port_types,545,"appleqtcsrvr",UDPHASH); addtolist(udp_port_types,546,"dhcpv6-client",UDPHASH); addtolist(udp_port_types,547,"dhcpv6-server",UDPHASH); addtolist(udp_port_types,548,"afpovertcp",UDPHASH); addtolist(udp_port_types,549,"idfp",UDPHASH); addtolist(udp_port_types,550,"new-rwho",UDPHASH); addtolist(udp_port_types,551,"cybercash",UDPHASH); addtolist(udp_port_types,552,"deviceshare",UDPHASH); addtolist(udp_port_types,553,"pirp",UDPHASH); addtolist(udp_port_types,554,"rtsp",UDPHASH); addtolist(udp_port_types,555,"dsf",UDPHASH); addtolist(udp_port_types,556,"remotefs",UDPHASH); addtolist(udp_port_types,557,"openvms-sysipc",UDPHASH); addtolist(udp_port_types,558,"sdnskmp",UDPHASH); addtolist(udp_port_types,559,"teedtap",UDPHASH); addtolist(udp_port_types,560,"rmonitor",UDPHASH); addtolist(udp_port_types,561,"monitor",UDPHASH); addtolist(udp_port_types,562,"chshell",UDPHASH); addtolist(udp_port_types,563,"nntps",UDPHASH); addtolist(udp_port_types,564,"9pfs",UDPHASH); addtolist(udp_port_types,565,"whoami",UDPHASH); addtolist(udp_port_types,566,"streettalk",UDPHASH); addtolist(udp_port_types,567,"banyan-rpc",UDPHASH); addtolist(udp_port_types,568,"ms-shuttle",UDPHASH); addtolist(udp_port_types,569,"ms-rome",UDPHASH); addtolist(udp_port_types,570,"meter",UDPHASH); addtolist(udp_port_types,571,"meter",UDPHASH); addtolist(udp_port_types,572,"sonar",UDPHASH); addtolist(udp_port_types,573,"banyan-vip",UDPHASH); addtolist(udp_port_types,574,"ftp-agent",UDPHASH); addtolist(udp_port_types,575,"vemmi",UDPHASH); addtolist(udp_port_types,576,"ipcd",UDPHASH); addtolist(udp_port_types,577,"vnas",UDPHASH); addtolist(udp_port_types,578,"ipdd",UDPHASH); addtolist(udp_port_types,579,"decbsrv",UDPHASH); addtolist(udp_port_types,580,"sntp-heartbeat",UDPHASH); addtolist(udp_port_types,581,"bdp",UDPHASH); addtolist(udp_port_types,582,"scc-security",UDPHASH); addtolist(udp_port_types,583,"philips-vc",UDPHASH); addtolist(udp_port_types,584,"keyserver",UDPHASH); addtolist(udp_port_types,585,"imap4-ssl",UDPHASH); addtolist(udp_port_types,586,"password-chg",UDPHASH); addtolist(udp_port_types,587,"submission",UDPHASH); addtolist(udp_port_types,588,"cal",UDPHASH); addtolist(udp_port_types,589,"eyelink",UDPHASH); addtolist(udp_port_types,590,"tns-cml",UDPHASH); addtolist(udp_port_types,591,"http-alt",UDPHASH); addtolist(udp_port_types,592,"eudora-set",UDPHASH); addtolist(udp_port_types,593,"http-rpc-epmap",UDPHASH); addtolist(udp_port_types,594,"tpip",UDPHASH); addtolist(udp_port_types,595,"cab-protocol",UDPHASH); addtolist(udp_port_types,596,"smsd",UDPHASH); addtolist(udp_port_types,597,"ptcnameservice",UDPHASH); addtolist(udp_port_types,598,"sco-websrvrmg3",UDPHASH); addtolist(udp_port_types,599,"acp",UDPHASH); addtolist(udp_port_types,600,"ipcserver",UDPHASH); addtolist(udp_port_types,606,"urm",UDPHASH); addtolist(udp_port_types,607,"nqs",UDPHASH); addtolist(udp_port_types,608,"sift-uft",UDPHASH); addtolist(udp_port_types,609,"npmp-trap",UDPHASH); addtolist(udp_port_types,610,"npmp-local",UDPHASH); addtolist(udp_port_types,611,"npmp-gui",UDPHASH); addtolist(udp_port_types,612,"hmmp-ind",UDPHASH); addtolist(udp_port_types,613,"hmmp-op",UDPHASH); addtolist(udp_port_types,614,"sshell",UDPHASH); addtolist(udp_port_types,615,"sco-inetmgr",UDPHASH); addtolist(udp_port_types,616,"sco-sysmgr",UDPHASH); addtolist(udp_port_types,617,"sco-dtmgr",UDPHASH); addtolist(udp_port_types,618,"dei-icda",UDPHASH); addtolist(udp_port_types,619,"digital-evm",UDPHASH); addtolist(udp_port_types,620,"sco-websrvrmgr",UDPHASH); addtolist(udp_port_types,621,"escp-ip",UDPHASH); addtolist(udp_port_types,622,"collaborator",UDPHASH); addtolist(udp_port_types,623,"aux_bus_shunt",UDPHASH); addtolist(udp_port_types,624,"cryptoadmin",UDPHASH); addtolist(udp_port_types,625,"dec_dlm",UDPHASH); addtolist(udp_port_types,626,"asia",UDPHASH); addtolist(udp_port_types,627,"passgo-tivoli",UDPHASH); addtolist(udp_port_types,628,"qmqp",UDPHASH); addtolist(udp_port_types,629,"3com-amp3",UDPHASH); addtolist(udp_port_types,630,"rda",UDPHASH); addtolist(udp_port_types,631,"ipp",UDPHASH); addtolist(udp_port_types,632,"bmpp",UDPHASH); addtolist(udp_port_types,633,"servstat",UDPHASH); addtolist(udp_port_types,634,"ginad",UDPHASH); addtolist(udp_port_types,635,"rlzdbase",UDPHASH); addtolist(udp_port_types,636,"ldaps",UDPHASH); addtolist(udp_port_types,637,"lanserver",UDPHASH); addtolist(udp_port_types,638,"mcns-sec",UDPHASH); addtolist(udp_port_types,639,"msdp",UDPHASH); addtolist(udp_port_types,640,"entrust-sps",UDPHASH); addtolist(udp_port_types,641,"repcmd",UDPHASH); addtolist(udp_port_types,642,"esro-emsdp",UDPHASH); addtolist(udp_port_types,643,"sanity",UDPHASH); addtolist(udp_port_types,644,"dwr",UDPHASH); addtolist(udp_port_types,645,"pssc",UDPHASH); addtolist(udp_port_types,646,"ldp",UDPHASH); addtolist(udp_port_types,647,"dhcp-failover",UDPHASH); addtolist(udp_port_types,648,"rrp",UDPHASH); addtolist(udp_port_types,649,"aminet",UDPHASH); addtolist(udp_port_types,650,"obex",UDPHASH); addtolist(udp_port_types,651,"ieee-mms",UDPHASH); addtolist(udp_port_types,652,"udlr-dtcp",UDPHASH); addtolist(udp_port_types,653,"repscmd",UDPHASH); addtolist(udp_port_types,654,"aodv",UDPHASH); addtolist(udp_port_types,655,"tinc",UDPHASH); addtolist(udp_port_types,656,"spmp",UDPHASH); addtolist(udp_port_types,657,"rmc",UDPHASH); addtolist(udp_port_types,658,"tenfold",UDPHASH); addtolist(udp_port_types,659,"url-rendezvous",UDPHASH); addtolist(udp_port_types,660,"mac-srvr-admin",UDPHASH); addtolist(udp_port_types,661,"hap",UDPHASH); addtolist(udp_port_types,662,"pftp",UDPHASH); addtolist(udp_port_types,663,"purenoise",UDPHASH); addtolist(udp_port_types,664,"secure-aux-bus",UDPHASH); addtolist(udp_port_types,665,"sun-dr",UDPHASH); addtolist(udp_port_types,666,"mdqs",UDPHASH); addtolist(udp_port_types,666,"doom",UDPHASH); addtolist(udp_port_types,667,"disclose",UDPHASH); addtolist(udp_port_types,668,"mecomm",UDPHASH); addtolist(udp_port_types,669,"meregister",UDPHASH); addtolist(udp_port_types,670,"vacdsm-sws",UDPHASH); addtolist(udp_port_types,671,"vacdsm-app",UDPHASH); addtolist(udp_port_types,672,"vpps-qua",UDPHASH); addtolist(udp_port_types,673,"cimplex",UDPHASH); addtolist(udp_port_types,674,"acap",UDPHASH); addtolist(udp_port_types,675,"dctp",UDPHASH); addtolist(udp_port_types,676,"vpps-via",UDPHASH); addtolist(udp_port_types,677,"vpp",UDPHASH); addtolist(udp_port_types,678,"ggf-ncp",UDPHASH); addtolist(udp_port_types,679,"mrm",UDPHASH); addtolist(udp_port_types,680,"entrust-aaas",UDPHASH); addtolist(udp_port_types,681,"entrust-aams",UDPHASH); addtolist(udp_port_types,682,"xfr",UDPHASH); addtolist(udp_port_types,683,"corba-iiop",UDPHASH); addtolist(udp_port_types,684,"corba-iiop-ssl",UDPHASH); addtolist(udp_port_types,685,"mdc-portmapper",UDPHASH); addtolist(udp_port_types,686,"hcp-wismar",UDPHASH); addtolist(udp_port_types,687,"asipregistry",UDPHASH); addtolist(udp_port_types,688,"realm-rusd",UDPHASH); addtolist(udp_port_types,689,"nmap",UDPHASH); addtolist(udp_port_types,690,"vatp",UDPHASH); addtolist(udp_port_types,691,"msexch-routing",UDPHASH); addtolist(udp_port_types,692,"hyperwave-isp",UDPHASH); addtolist(udp_port_types,693,"connendp",UDPHASH); addtolist(udp_port_types,694,"ha-cluster",UDPHASH); addtolist(udp_port_types,695,"ieee-mms-ssl",UDPHASH); addtolist(udp_port_types,696,"rushd",UDPHASH); addtolist(udp_port_types,697,"uuidgen",UDPHASH); addtolist(udp_port_types,698,"olsr",UDPHASH); addtolist(udp_port_types,699,"accessnetwork",UDPHASH); addtolist(udp_port_types,704,"elcsd",UDPHASH); addtolist(udp_port_types,705,"agentx",UDPHASH); addtolist(udp_port_types,706,"silc",UDPHASH); addtolist(udp_port_types,707,"borland-dsj",UDPHASH); addtolist(udp_port_types,709,"entrust-kmsh",UDPHASH); addtolist(udp_port_types,710,"entrust-ash",UDPHASH); addtolist(udp_port_types,711,"cisco-tdp",UDPHASH); addtolist(udp_port_types,729,"netviewdm1",UDPHASH); addtolist(udp_port_types,730,"netviewdm2",UDPHASH); addtolist(udp_port_types,731,"netviewdm3",UDPHASH); addtolist(udp_port_types,741,"netgw",UDPHASH); addtolist(udp_port_types,742,"netrcs",UDPHASH); addtolist(udp_port_types,744,"flexlm",UDPHASH); addtolist(udp_port_types,747,"fujitsu-dev",UDPHASH); addtolist(udp_port_types,748,"ris-cm",UDPHASH); addtolist(udp_port_types,749,"kerberos-adm",UDPHASH); addtolist(udp_port_types,750,"loadav",UDPHASH); addtolist(udp_port_types,750,"kerberos-iv",UDPHASH); addtolist(udp_port_types,751,"pump",UDPHASH); addtolist(udp_port_types,752,"qrh",UDPHASH); addtolist(udp_port_types,753,"rrh",UDPHASH); addtolist(udp_port_types,754,"tell",UDPHASH); addtolist(udp_port_types,758,"nlogin",UDPHASH); addtolist(udp_port_types,759,"con",UDPHASH); addtolist(udp_port_types,760,"ns",UDPHASH); addtolist(udp_port_types,761,"rxe",UDPHASH); addtolist(udp_port_types,762,"quotad",UDPHASH); addtolist(udp_port_types,763,"cycleserv",UDPHASH); addtolist(udp_port_types,764,"omserv",UDPHASH); addtolist(udp_port_types,765,"webster",UDPHASH); addtolist(udp_port_types,767,"phonebook",UDPHASH); addtolist(udp_port_types,769,"vid",UDPHASH); addtolist(udp_port_types,770,"cadlock",UDPHASH); addtolist(udp_port_types,771,"rtip",UDPHASH); addtolist(udp_port_types,772,"cycleserv2",UDPHASH); addtolist(udp_port_types,773,"notify",UDPHASH); addtolist(udp_port_types,774,"acmaint_dbd",UDPHASH); addtolist(udp_port_types,775,"acmaint_transd",UDPHASH); addtolist(udp_port_types,776,"wpages",UDPHASH); addtolist(udp_port_types,777,"multiling-http",UDPHASH); addtolist(udp_port_types,780,"wpgs",UDPHASH); addtolist(udp_port_types,786,"concert",UDPHASH); addtolist(udp_port_types,787,"qsc",UDPHASH); addtolist(udp_port_types,800,"mdbs_daemon",UDPHASH); addtolist(udp_port_types,801,"device",UDPHASH); addtolist(udp_port_types,810,"fcp-udp",UDPHASH); addtolist(udp_port_types,828,"itm-mcell-s",UDPHASH); addtolist(udp_port_types,829,"pkix-3-ca-ra",UDPHASH); addtolist(udp_port_types,847,"dhcp-failover2",UDPHASH); addtolist(udp_port_types,873,"rsync",UDPHASH); addtolist(udp_port_types,886,"iclcnet-locate",UDPHASH); addtolist(udp_port_types,887,"iclcnet_svinfo",UDPHASH); addtolist(udp_port_types,888,"accessbuilder",UDPHASH); addtolist(udp_port_types,900,"omginitialrefs",UDPHASH); addtolist(udp_port_types,901,"smpnameres",UDPHASH); addtolist(udp_port_types,902,"ideafarm-chat",UDPHASH); addtolist(udp_port_types,903,"ideafarm-catch",UDPHASH); addtolist(udp_port_types,911,"xact-backup",UDPHASH); addtolist(udp_port_types,989,"ftps-data",UDPHASH); addtolist(udp_port_types,990,"ftps",UDPHASH); addtolist(udp_port_types,991,"nas",UDPHASH); addtolist(udp_port_types,992,"telnets",UDPHASH); addtolist(udp_port_types,993,"imaps",UDPHASH); addtolist(udp_port_types,994,"ircs",UDPHASH); addtolist(udp_port_types,995,"pop3s",UDPHASH); addtolist(udp_port_types,996,"vsinet",UDPHASH); addtolist(udp_port_types,997,"maitrd",UDPHASH); addtolist(udp_port_types,998,"puparp",UDPHASH); addtolist(udp_port_types,999,"applix",UDPHASH); addtolist(udp_port_types,999,"puprouter",UDPHASH); addtolist(udp_port_types,1000,"cadlock2",UDPHASH); addtolist(udp_port_types,1010,"surf",UDPHASH); addtolist(udp_port_types,1023,"1023-reserved",UDPHASH); addtolist(udp_port_types,1024,"1024-reserved",UDPHASH); addtolist(udp_port_types,1025,"blackjack",UDPHASH); addtolist(udp_port_types,1030,"iad1",UDPHASH); addtolist(udp_port_types,1031,"iad2",UDPHASH); addtolist(udp_port_types,1032,"iad3",UDPHASH); addtolist(udp_port_types,1040,"netarx",UDPHASH); addtolist(udp_port_types,1047,"neod1",UDPHASH); addtolist(udp_port_types,1048,"neod2",UDPHASH); addtolist(udp_port_types,1049,"td-postman",UDPHASH); addtolist(udp_port_types,1050,"cma",UDPHASH); addtolist(udp_port_types,1051,"optima-vnet",UDPHASH); addtolist(udp_port_types,1052,"ddt",UDPHASH); addtolist(udp_port_types,1053,"remote-as",UDPHASH); addtolist(udp_port_types,1054,"brvread",UDPHASH); addtolist(udp_port_types,1055,"ansyslmd",UDPHASH); addtolist(udp_port_types,1056,"vfo",UDPHASH); addtolist(udp_port_types,1057,"startron",UDPHASH); addtolist(udp_port_types,1058,"nim",UDPHASH); addtolist(udp_port_types,1059,"nimreg",UDPHASH); addtolist(udp_port_types,1060,"polestar",UDPHASH); addtolist(udp_port_types,1061,"kiosk",UDPHASH); addtolist(udp_port_types,1062,"veracity",UDPHASH); addtolist(udp_port_types,1063,"kyoceranetdev",UDPHASH); addtolist(udp_port_types,1064,"jstel",UDPHASH); addtolist(udp_port_types,1065,"syscomlan",UDPHASH); addtolist(udp_port_types,1066,"fpo-fns",UDPHASH); addtolist(udp_port_types,1067,"instl_boots",UDPHASH); addtolist(udp_port_types,1068,"instl_bootc",UDPHASH); addtolist(udp_port_types,1069,"cognex-insight",UDPHASH); addtolist(udp_port_types,1070,"gmrupdateserv",UDPHASH); addtolist(udp_port_types,1071,"bsquare-voip",UDPHASH); addtolist(udp_port_types,1072,"cardax",UDPHASH); addtolist(udp_port_types,1073,"bridgecontrol",UDPHASH); addtolist(udp_port_types,1074,"fastechnologlm",UDPHASH); addtolist(udp_port_types,1075,"rdrmshc",UDPHASH); addtolist(udp_port_types,1076,"dab-sti-c",UDPHASH); addtolist(udp_port_types,1077,"imgames",UDPHASH); addtolist(udp_port_types,1078,"emanagecstp",UDPHASH); addtolist(udp_port_types,1079,"asprovatalk",UDPHASH); addtolist(udp_port_types,1080,"socks",UDPHASH); addtolist(udp_port_types,1081,"pvuniwien",UDPHASH); addtolist(udp_port_types,1082,"amt-esd-prot",UDPHASH); addtolist(udp_port_types,1083,"ansoft-lm-1",UDPHASH); addtolist(udp_port_types,1084,"ansoft-lm-2",UDPHASH); addtolist(udp_port_types,1085,"webobjects",UDPHASH); addtolist(udp_port_types,1086,"cplscrambler-lg",UDPHASH); addtolist(udp_port_types,1087,"cplscrambler-in",UDPHASH); addtolist(udp_port_types,1088,"cplscrambler-al",UDPHASH); addtolist(udp_port_types,1089,"ff-annunc",UDPHASH); addtolist(udp_port_types,1090,"ff-fms",UDPHASH); addtolist(udp_port_types,1091,"ff-sm",UDPHASH); addtolist(udp_port_types,1092,"obrpd",UDPHASH); addtolist(udp_port_types,1093,"proofd",UDPHASH); addtolist(udp_port_types,1094,"rootd",UDPHASH); addtolist(udp_port_types,1095,"nicelink",UDPHASH); addtolist(udp_port_types,1096,"cnrprotocol",UDPHASH); addtolist(udp_port_types,1097,"sunclustermgr",UDPHASH); addtolist(udp_port_types,1098,"rmiactivation",UDPHASH); addtolist(udp_port_types,1099,"rmiregistry",UDPHASH); addtolist(udp_port_types,1100,"mctp",UDPHASH); addtolist(udp_port_types,1101,"pt2-discover",UDPHASH); addtolist(udp_port_types,1102,"adobeserver-1",UDPHASH); addtolist(udp_port_types,1103,"adobeserver-2",UDPHASH); addtolist(udp_port_types,1104,"xrl",UDPHASH); addtolist(udp_port_types,1105,"ftranhc",UDPHASH); addtolist(udp_port_types,1106,"isoipsigport-1",UDPHASH); addtolist(udp_port_types,1107,"isoipsigport-2",UDPHASH); addtolist(udp_port_types,1108,"ratio-adp",UDPHASH); addtolist(udp_port_types,1110,"nfsd-keepalive",UDPHASH); addtolist(udp_port_types,1111,"lmsocialserver",UDPHASH); addtolist(udp_port_types,1112,"icp",UDPHASH); addtolist(udp_port_types,1114,"mini-sql",UDPHASH); addtolist(udp_port_types,1115,"ardus-trns",UDPHASH); addtolist(udp_port_types,1116,"ardus-cntl",UDPHASH); addtolist(udp_port_types,1117,"ardus-mtrns",UDPHASH); addtolist(udp_port_types,1122,"availant-mgr",UDPHASH); addtolist(udp_port_types,1123,"murray",UDPHASH); addtolist(udp_port_types,1155,"nfa",UDPHASH); addtolist(udp_port_types,1161,"health-polling",UDPHASH); addtolist(udp_port_types,1162,"health-trap",UDPHASH); addtolist(udp_port_types,1169,"tripwire",UDPHASH); addtolist(udp_port_types,1180,"mc-client",UDPHASH); addtolist(udp_port_types,1188,"hp-webadmin",UDPHASH); addtolist(udp_port_types,1200,"scol",UDPHASH); addtolist(udp_port_types,1201,"nucleus-sand",UDPHASH); addtolist(udp_port_types,1202,"caiccipc",UDPHASH); addtolist(udp_port_types,1203,"ssslic-mgr",UDPHASH); addtolist(udp_port_types,1204,"ssslog-mgr",UDPHASH); addtolist(udp_port_types,1205,"accord-mgc",UDPHASH); addtolist(udp_port_types,1206,"anthony-data",UDPHASH); addtolist(udp_port_types,1207,"metasage",UDPHASH); addtolist(udp_port_types,1208,"seagull-ais",UDPHASH); addtolist(udp_port_types,1209,"ipcd3",UDPHASH); addtolist(udp_port_types,1210,"eoss",UDPHASH); addtolist(udp_port_types,1211,"groove-dpp",UDPHASH); addtolist(udp_port_types,1212,"lupa",UDPHASH); addtolist(udp_port_types,1213,"mpc-lifenet",UDPHASH); addtolist(udp_port_types,1214,"kazaa",UDPHASH); addtolist(udp_port_types,1215,"scanstat-1",UDPHASH); addtolist(udp_port_types,1216,"etebac5",UDPHASH); addtolist(udp_port_types,1217,"hpss-ndapi",UDPHASH); addtolist(udp_port_types,1218,"aeroflight-ads",UDPHASH); addtolist(udp_port_types,1219,"aeroflight-ret",UDPHASH); addtolist(udp_port_types,1220,"qt-serveradmin",UDPHASH); addtolist(udp_port_types,1221,"sweetware-apps",UDPHASH); addtolist(udp_port_types,1222,"nerv",UDPHASH); addtolist(udp_port_types,1223,"tgp",UDPHASH); addtolist(udp_port_types,1224,"vpnz",UDPHASH); addtolist(udp_port_types,1225,"slinkysearch",UDPHASH); addtolist(udp_port_types,1226,"stgxfws",UDPHASH); addtolist(udp_port_types,1227,"dns2go",UDPHASH); addtolist(udp_port_types,1228,"florence",UDPHASH); addtolist(udp_port_types,1229,"novell-zfs",UDPHASH); addtolist(udp_port_types,1230,"periscope",UDPHASH); addtolist(udp_port_types,1231,"menandmice-lpm",UDPHASH); addtolist(udp_port_types,1232,"mtrgtrans",UDPHASH); addtolist(udp_port_types,1233,"univ-appserver",UDPHASH); addtolist(udp_port_types,1234,"search-agent",UDPHASH); addtolist(udp_port_types,1235,"mosaicsyssvc1",UDPHASH); addtolist(udp_port_types,1236,"bvcontrol",UDPHASH); addtolist(udp_port_types,1237,"tsdos390",UDPHASH); addtolist(udp_port_types,1238,"hacl-qs",UDPHASH); addtolist(udp_port_types,1239,"nmsd",UDPHASH); addtolist(udp_port_types,1240,"instantia",UDPHASH); addtolist(udp_port_types,1241,"nessus",UDPHASH); addtolist(udp_port_types,1242,"nmasoverip",UDPHASH); addtolist(udp_port_types,1243,"serialgateway",UDPHASH); addtolist(udp_port_types,1244,"isbconference1",UDPHASH); addtolist(udp_port_types,1245,"isbconference2",UDPHASH); addtolist(udp_port_types,1246,"payrouter",UDPHASH); addtolist(udp_port_types,1247,"visionpyramid",UDPHASH); addtolist(udp_port_types,1248,"hermes",UDPHASH); addtolist(udp_port_types,1249,"mesavistaco",UDPHASH); addtolist(udp_port_types,1250,"swldy-sias",UDPHASH); addtolist(udp_port_types,1251,"servergraph",UDPHASH); addtolist(udp_port_types,1252,"bspne-pcc",UDPHASH); addtolist(udp_port_types,1253,"q55-pcc",UDPHASH); addtolist(udp_port_types,1254,"de-noc",UDPHASH); addtolist(udp_port_types,1255,"de-cache-query",UDPHASH); addtolist(udp_port_types,1256,"de-server",UDPHASH); addtolist(udp_port_types,1257,"shockwave2",UDPHASH); addtolist(udp_port_types,1258,"opennl",UDPHASH); addtolist(udp_port_types,1259,"opennl-voice",UDPHASH); addtolist(udp_port_types,1260,"ibm-ssd",UDPHASH); addtolist(udp_port_types,1261,"mpshrsv",UDPHASH); addtolist(udp_port_types,1262,"qnts-orb",UDPHASH); addtolist(udp_port_types,1263,"dka",UDPHASH); addtolist(udp_port_types,1264,"prat",UDPHASH); addtolist(udp_port_types,1265,"dssiapi",UDPHASH); addtolist(udp_port_types,1266,"dellpwrappks",UDPHASH); addtolist(udp_port_types,1267,"pcmlinux",UDPHASH); addtolist(udp_port_types,1268,"propel-msgsys",UDPHASH); addtolist(udp_port_types,1269,"watilapp",UDPHASH); addtolist(udp_port_types,1270,"opsman",UDPHASH); addtolist(udp_port_types,1271,"dabew",UDPHASH); addtolist(udp_port_types,1272,"cspmlockmgr",UDPHASH); addtolist(udp_port_types,1273,"emc-gateway",UDPHASH); addtolist(udp_port_types,1274,"t1distproc",UDPHASH); addtolist(udp_port_types,1275,"ivcollector",UDPHASH); addtolist(udp_port_types,1276,"ivmanager",UDPHASH); addtolist(udp_port_types,1277,"miva-mqs",UDPHASH); addtolist(udp_port_types,1278,"dellwebadmin-1",UDPHASH); addtolist(udp_port_types,1279,"dellwebadmin-2",UDPHASH); addtolist(udp_port_types,1280,"pictrography",UDPHASH); addtolist(udp_port_types,1281,"healthd",UDPHASH); addtolist(udp_port_types,1282,"emperion",UDPHASH); addtolist(udp_port_types,1283,"productinfo",UDPHASH); addtolist(udp_port_types,1284,"iee-qfx",UDPHASH); addtolist(udp_port_types,1285,"neoiface",UDPHASH); addtolist(udp_port_types,1286,"netuitive",UDPHASH); addtolist(udp_port_types,1288,"navbuddy",UDPHASH); addtolist(udp_port_types,1289,"jwalkserver",UDPHASH); addtolist(udp_port_types,1290,"winjaserver",UDPHASH); addtolist(udp_port_types,1291,"seagulllms",UDPHASH); addtolist(udp_port_types,1292,"dsdn",UDPHASH); addtolist(udp_port_types,1293,"pkt-krb-ipsec",UDPHASH); addtolist(udp_port_types,1294,"cmmdriver",UDPHASH); addtolist(udp_port_types,1295,"eetp",UDPHASH); addtolist(udp_port_types,1296,"dproxy",UDPHASH); addtolist(udp_port_types,1297,"sdproxy",UDPHASH); addtolist(udp_port_types,1298,"lpcp",UDPHASH); addtolist(udp_port_types,1299,"hp-sci",UDPHASH); addtolist(udp_port_types,1300,"h323hostcallsc",UDPHASH); addtolist(udp_port_types,1301,"ci3-software-1",UDPHASH); addtolist(udp_port_types,1302,"ci3-software-2",UDPHASH); addtolist(udp_port_types,1303,"sftsrv",UDPHASH); addtolist(udp_port_types,1304,"boomerang",UDPHASH); addtolist(udp_port_types,1305,"pe-mike",UDPHASH); addtolist(udp_port_types,1306,"re-conn-proto",UDPHASH); addtolist(udp_port_types,1307,"pacmand",UDPHASH); addtolist(udp_port_types,1308,"odsi",UDPHASH); addtolist(udp_port_types,1309,"jtag-server",UDPHASH); addtolist(udp_port_types,1310,"husky",UDPHASH); addtolist(udp_port_types,1311,"rxmon",UDPHASH); addtolist(udp_port_types,1312,"sti-envision",UDPHASH); addtolist(udp_port_types,1313,"bmc_patroldb",UDPHASH); addtolist(udp_port_types,1314,"pdps",UDPHASH); addtolist(udp_port_types,1315,"els",UDPHASH); addtolist(udp_port_types,1316,"exbit-escp",UDPHASH); addtolist(udp_port_types,1317,"vrts-ipcserver",UDPHASH); addtolist(udp_port_types,1318,"krb5gatekeeper",UDPHASH); addtolist(udp_port_types,1319,"panja-icsp",UDPHASH); addtolist(udp_port_types,1320,"panja-axbnet",UDPHASH); addtolist(udp_port_types,1321,"pip",UDPHASH); addtolist(udp_port_types,1322,"novation",UDPHASH); addtolist(udp_port_types,1323,"brcd",UDPHASH); addtolist(udp_port_types,1324,"delta-mcp",UDPHASH); addtolist(udp_port_types,1325,"dx-instrument",UDPHASH); addtolist(udp_port_types,1326,"wimsic",UDPHASH); addtolist(udp_port_types,1327,"ultrex",UDPHASH); addtolist(udp_port_types,1328,"ewall",UDPHASH); addtolist(udp_port_types,1329,"netdb-export",UDPHASH); addtolist(udp_port_types,1330,"streetperfect",UDPHASH); addtolist(udp_port_types,1331,"intersan",UDPHASH); addtolist(udp_port_types,1332,"pcia-rxp-b",UDPHASH); addtolist(udp_port_types,1333,"passwrd-policy",UDPHASH); addtolist(udp_port_types,1334,"writesrv",UDPHASH); addtolist(udp_port_types,1335,"digital-notary",UDPHASH); addtolist(udp_port_types,1336,"ischat",UDPHASH); addtolist(udp_port_types,1337,"menandmice-dns",UDPHASH); addtolist(udp_port_types,1338,"wmc-log-svc",UDPHASH); addtolist(udp_port_types,1339,"kjtsiteserver",UDPHASH); addtolist(udp_port_types,1340,"naap",UDPHASH); addtolist(udp_port_types,1341,"qubes",UDPHASH); addtolist(udp_port_types,1342,"esbroker",UDPHASH); addtolist(udp_port_types,1343,"re101",UDPHASH); addtolist(udp_port_types,1344,"icap",UDPHASH); addtolist(udp_port_types,1345,"vpjp",UDPHASH); addtolist(udp_port_types,1346,"alta-ana-lm",UDPHASH); addtolist(udp_port_types,1347,"bbn-mmc",UDPHASH); addtolist(udp_port_types,1348,"bbn-mmx",UDPHASH); addtolist(udp_port_types,1349,"sbook",UDPHASH); addtolist(udp_port_types,1350,"editbench",UDPHASH); addtolist(udp_port_types,1351,"equationbuilder",UDPHASH); addtolist(udp_port_types,1352,"lotusnote",UDPHASH); addtolist(udp_port_types,1353,"relief",UDPHASH); addtolist(udp_port_types,1354,"rightbrain",UDPHASH); addtolist(udp_port_types,1355,"intuitive-edge",UDPHASH); addtolist(udp_port_types,1356,"cuillamartin",UDPHASH); addtolist(udp_port_types,1357,"pegboard",UDPHASH); addtolist(udp_port_types,1358,"connlcli",UDPHASH); addtolist(udp_port_types,1359,"ftsrv",UDPHASH); addtolist(udp_port_types,1360,"mimer",UDPHASH); addtolist(udp_port_types,1361,"linx",UDPHASH); addtolist(udp_port_types,1362,"timeflies",UDPHASH); addtolist(udp_port_types,1363,"ndm-requester",UDPHASH); addtolist(udp_port_types,1364,"ndm-server",UDPHASH); addtolist(udp_port_types,1365,"adapt-sna",UDPHASH); addtolist(udp_port_types,1366,"netware-csp",UDPHASH); addtolist(udp_port_types,1367,"dcs",UDPHASH); addtolist(udp_port_types,1368,"screencast",UDPHASH); addtolist(udp_port_types,1369,"gv-us",UDPHASH); addtolist(udp_port_types,1370,"us-gv",UDPHASH); addtolist(udp_port_types,1371,"fc-cli",UDPHASH); addtolist(udp_port_types,1372,"fc-ser",UDPHASH); addtolist(udp_port_types,1373,"chromagrafx",UDPHASH); addtolist(udp_port_types,1374,"molly",UDPHASH); addtolist(udp_port_types,1375,"bytex",UDPHASH); addtolist(udp_port_types,1376,"ibm-pps",UDPHASH); addtolist(udp_port_types,1377,"cichlid",UDPHASH); addtolist(udp_port_types,1378,"elan",UDPHASH); addtolist(udp_port_types,1379,"dbreporter",UDPHASH); addtolist(udp_port_types,1380,"telesis-licman",UDPHASH); addtolist(udp_port_types,1381,"apple-licman",UDPHASH); addtolist(udp_port_types,1382,"udt_os",UDPHASH); addtolist(udp_port_types,1383,"gwha",UDPHASH); addtolist(udp_port_types,1384,"os-licman",UDPHASH); addtolist(udp_port_types,1385,"atex_elmd",UDPHASH); addtolist(udp_port_types,1386,"checksum",UDPHASH); addtolist(udp_port_types,1387,"cadsi-lm",UDPHASH); addtolist(udp_port_types,1388,"objective-dbc",UDPHASH); addtolist(udp_port_types,1389,"iclpv-dm",UDPHASH); addtolist(udp_port_types,1390,"iclpv-sc",UDPHASH); addtolist(udp_port_types,1391,"iclpv-sas",UDPHASH); addtolist(udp_port_types,1392,"iclpv-pm",UDPHASH); addtolist(udp_port_types,1393,"iclpv-nls",UDPHASH); addtolist(udp_port_types,1394,"iclpv-nlc",UDPHASH); addtolist(udp_port_types,1395,"iclpv-wsm",UDPHASH); addtolist(udp_port_types,1396,"dvl-activemail",UDPHASH); addtolist(udp_port_types,1397,"audio-activmail",UDPHASH); addtolist(udp_port_types,1398,"video-activmail",UDPHASH); addtolist(udp_port_types,1399,"cadkey-licman",UDPHASH); addtolist(udp_port_types,1400,"cadkey-tablet",UDPHASH); addtolist(udp_port_types,1401,"goldleaf-licman",UDPHASH); addtolist(udp_port_types,1402,"prm-sm-np",UDPHASH); addtolist(udp_port_types,1403,"prm-nm-np",UDPHASH); addtolist(udp_port_types,1404,"igi-lm",UDPHASH); addtolist(udp_port_types,1405,"ibm-res",UDPHASH); addtolist(udp_port_types,1406,"netlabs-lm",UDPHASH); addtolist(udp_port_types,1407,"dbsa-lm",UDPHASH); addtolist(udp_port_types,1408,"sophia-lm",UDPHASH); addtolist(udp_port_types,1409,"here-lm",UDPHASH); addtolist(udp_port_types,1410,"hiq",UDPHASH); addtolist(udp_port_types,1411,"af",UDPHASH); addtolist(udp_port_types,1412,"innosys",UDPHASH); addtolist(udp_port_types,1413,"innosys-acl",UDPHASH); addtolist(udp_port_types,1414,"ibm-mqseries",UDPHASH); addtolist(udp_port_types,1415,"dbstar",UDPHASH); addtolist(udp_port_types,1416,"novell-lu6.2",UDPHASH); addtolist(udp_port_types,1417,"timbuktu-srv1",UDPHASH); addtolist(udp_port_types,1418,"timbuktu-srv2",UDPHASH); addtolist(udp_port_types,1419,"timbuktu-srv3",UDPHASH); addtolist(udp_port_types,1420,"timbuktu-srv4",UDPHASH); addtolist(udp_port_types,1421,"gandalf-lm",UDPHASH); addtolist(udp_port_types,1422,"autodesk-lm",UDPHASH); addtolist(udp_port_types,1423,"essbase",UDPHASH); addtolist(udp_port_types,1424,"hybrid",UDPHASH); addtolist(udp_port_types,1425,"zion-lm",UDPHASH); addtolist(udp_port_types,1426,"sais",UDPHASH); addtolist(udp_port_types,1427,"mloadd",UDPHASH); addtolist(udp_port_types,1428,"informatik-lm",UDPHASH); addtolist(udp_port_types,1429,"nms",UDPHASH); addtolist(udp_port_types,1430,"tpdu",UDPHASH); addtolist(udp_port_types,1431,"rgtp",UDPHASH); addtolist(udp_port_types,1432,"blueberry-lm",UDPHASH); addtolist(udp_port_types,1433,"ms-sql-s",UDPHASH); addtolist(udp_port_types,1434,"ms-sql-m",UDPHASH); addtolist(udp_port_types,1435,"ibm-cics",UDPHASH); addtolist(udp_port_types,1436,"saism",UDPHASH); addtolist(udp_port_types,1437,"tabula",UDPHASH); addtolist(udp_port_types,1438,"eicon-server",UDPHASH); addtolist(udp_port_types,1439,"eicon-x25",UDPHASH); addtolist(udp_port_types,1440,"eicon-slp",UDPHASH); addtolist(udp_port_types,1441,"cadis-1",UDPHASH); addtolist(udp_port_types,1442,"cadis-2",UDPHASH); addtolist(udp_port_types,1443,"ies-lm",UDPHASH); addtolist(udp_port_types,1444,"marcam-lm",UDPHASH); addtolist(udp_port_types,1445,"proxima-lm",UDPHASH); addtolist(udp_port_types,1446,"ora-lm",UDPHASH); addtolist(udp_port_types,1447,"apri-lm",UDPHASH); addtolist(udp_port_types,1448,"oc-lm",UDPHASH); addtolist(udp_port_types,1449,"peport",UDPHASH); addtolist(udp_port_types,1450,"dwf",UDPHASH); addtolist(udp_port_types,1451,"infoman",UDPHASH); addtolist(udp_port_types,1452,"gtegsc-lm",UDPHASH); addtolist(udp_port_types,1453,"genie-lm",UDPHASH); addtolist(udp_port_types,1454,"interhdl_elmd",UDPHASH); addtolist(udp_port_types,1455,"esl-lm",UDPHASH); addtolist(udp_port_types,1456,"dca",UDPHASH); addtolist(udp_port_types,1457,"valisys-lm",UDPHASH); addtolist(udp_port_types,1458,"nrcabq-lm",UDPHASH); addtolist(udp_port_types,1459,"proshare1",UDPHASH); addtolist(udp_port_types,1460,"proshare2",UDPHASH); addtolist(udp_port_types,1461,"ibm_wrless_lan",UDPHASH); addtolist(udp_port_types,1462,"world-lm",UDPHASH); addtolist(udp_port_types,1463,"nucleus",UDPHASH); addtolist(udp_port_types,1464,"msl_lmd",UDPHASH); addtolist(udp_port_types,1465,"pipes",UDPHASH); addtolist(udp_port_types,1466,"oceansoft-lm",UDPHASH); addtolist(udp_port_types,1467,"csdmbase",UDPHASH); addtolist(udp_port_types,1468,"csdm",UDPHASH); addtolist(udp_port_types,1469,"aal-lm",UDPHASH); addtolist(udp_port_types,1470,"uaiact",UDPHASH); addtolist(udp_port_types,1471,"csdmbase",UDPHASH); addtolist(udp_port_types,1472,"csdm",UDPHASH); addtolist(udp_port_types,1473,"openmath",UDPHASH); addtolist(udp_port_types,1474,"telefinder",UDPHASH); addtolist(udp_port_types,1475,"taligent-lm",UDPHASH); addtolist(udp_port_types,1476,"clvm-cfg",UDPHASH); addtolist(udp_port_types,1477,"ms-sna-server",UDPHASH); addtolist(udp_port_types,1478,"ms-sna-base",UDPHASH); addtolist(udp_port_types,1479,"dberegister",UDPHASH); addtolist(udp_port_types,1480,"pacerforum",UDPHASH); addtolist(udp_port_types,1481,"airs",UDPHASH); addtolist(udp_port_types,1482,"miteksys-lm",UDPHASH); addtolist(udp_port_types,1483,"afs",UDPHASH); addtolist(udp_port_types,1484,"confluent",UDPHASH); addtolist(udp_port_types,1485,"lansource",UDPHASH); addtolist(udp_port_types,1486,"nms_topo_serv",UDPHASH); addtolist(udp_port_types,1487,"localinfosrvr",UDPHASH); addtolist(udp_port_types,1488,"docstor",UDPHASH); addtolist(udp_port_types,1489,"dmdocbroker",UDPHASH); addtolist(udp_port_types,1490,"insitu-conf",UDPHASH); addtolist(udp_port_types,1491,"anynetgateway",UDPHASH); addtolist(udp_port_types,1492,"stone-design-1",UDPHASH); addtolist(udp_port_types,1493,"netmap_lm",UDPHASH); addtolist(udp_port_types,1494,"ica",UDPHASH); addtolist(udp_port_types,1495,"cvc",UDPHASH); addtolist(udp_port_types,1496,"liberty-lm",UDPHASH); addtolist(udp_port_types,1497,"rfx-lm",UDPHASH); addtolist(udp_port_types,1498,"sybase-sqlany",UDPHASH); addtolist(udp_port_types,1499,"fhc",UDPHASH); addtolist(udp_port_types,1500,"vlsi-lm",UDPHASH); addtolist(udp_port_types,1501,"saiscm",UDPHASH); addtolist(udp_port_types,1502,"shivadiscovery",UDPHASH); addtolist(udp_port_types,1503,"imtc-mcs",UDPHASH); addtolist(udp_port_types,1504,"evb-elm",UDPHASH); addtolist(udp_port_types,1505,"funkproxy",UDPHASH); addtolist(udp_port_types,1506,"utcd",UDPHASH); addtolist(udp_port_types,1507,"symplex",UDPHASH); addtolist(udp_port_types,1508,"diagmond",UDPHASH); addtolist(udp_port_types,1509,"robcad-lm",UDPHASH); addtolist(udp_port_types,1510,"mvx-lm",UDPHASH); addtolist(udp_port_types,1511,"3l-l1",UDPHASH); addtolist(udp_port_types,1512,"wins",UDPHASH); addtolist(udp_port_types,1513,"fujitsu-dtc",UDPHASH); addtolist(udp_port_types,1514,"fujitsu-dtcns",UDPHASH); addtolist(udp_port_types,1515,"ifor-protocol",UDPHASH); addtolist(udp_port_types,1516,"vpad",UDPHASH); addtolist(udp_port_types,1517,"vpac",UDPHASH); addtolist(udp_port_types,1518,"vpvd",UDPHASH); addtolist(udp_port_types,1519,"vpvc",UDPHASH); addtolist(udp_port_types,1520,"atm-zip-office",UDPHASH); addtolist(udp_port_types,1521,"ncube-lm",UDPHASH); addtolist(udp_port_types,1522,"ricardo-lm",UDPHASH); addtolist(udp_port_types,1523,"cichild-lm",UDPHASH); addtolist(udp_port_types,1524,"ingreslock",UDPHASH); addtolist(udp_port_types,1525,"orasrv",UDPHASH); addtolist(udp_port_types,1525,"prospero-np",UDPHASH); addtolist(udp_port_types,1526,"pdap-np",UDPHASH); addtolist(udp_port_types,1527,"tlisrv",UDPHASH); addtolist(udp_port_types,1528,"mciautoreg",UDPHASH); addtolist(udp_port_types,1529,"coauthor",UDPHASH); addtolist(udp_port_types,1530,"rap-service",UDPHASH); addtolist(udp_port_types,1531,"rap-listen",UDPHASH); addtolist(udp_port_types,1532,"miroconnect",UDPHASH); addtolist(udp_port_types,1533,"virtual-places",UDPHASH); addtolist(udp_port_types,1534,"micromuse-lm",UDPHASH); addtolist(udp_port_types,1535,"ampr-info",UDPHASH); addtolist(udp_port_types,1536,"ampr-inter",UDPHASH); addtolist(udp_port_types,1537,"sdsc-lm",UDPHASH); addtolist(udp_port_types,1538,"3ds-lm",UDPHASH); addtolist(udp_port_types,1539,"intellistor-lm",UDPHASH); addtolist(udp_port_types,1540,"rds",UDPHASH); addtolist(udp_port_types,1541,"rds2",UDPHASH); addtolist(udp_port_types,1542,"gridgen-elmd",UDPHASH); addtolist(udp_port_types,1543,"simba-cs",UDPHASH); addtolist(udp_port_types,1544,"aspeclmd",UDPHASH); addtolist(udp_port_types,1545,"vistium-share",UDPHASH); addtolist(udp_port_types,1546,"abbaccuray",UDPHASH); addtolist(udp_port_types,1547,"laplink",UDPHASH); addtolist(udp_port_types,1548,"axon-lm",UDPHASH); addtolist(udp_port_types,1549,"shivasound",UDPHASH); addtolist(udp_port_types,1550,"3m-image-lm",UDPHASH); addtolist(udp_port_types,1551,"hecmtl-db",UDPHASH); addtolist(udp_port_types,1552,"pciarray",UDPHASH); addtolist(udp_port_types,1553,"sna-cs",UDPHASH); addtolist(udp_port_types,1554,"caci-lm",UDPHASH); addtolist(udp_port_types,1555,"livelan",UDPHASH); addtolist(udp_port_types,1556,"ashwin",UDPHASH); addtolist(udp_port_types,1557,"arbortext-lm",UDPHASH); addtolist(udp_port_types,1558,"xingmpeg",UDPHASH); addtolist(udp_port_types,1559,"web2host",UDPHASH); addtolist(udp_port_types,1560,"asci-val",UDPHASH); addtolist(udp_port_types,1561,"facilityview",UDPHASH); addtolist(udp_port_types,1562,"pconnectmgr",UDPHASH); addtolist(udp_port_types,1563,"cadabra-lm",UDPHASH); addtolist(udp_port_types,1564,"pay-per-view",UDPHASH); addtolist(udp_port_types,1565,"winddlb",UDPHASH); addtolist(udp_port_types,1566,"corelvideo",UDPHASH); addtolist(udp_port_types,1567,"jlicelmd",UDPHASH); addtolist(udp_port_types,1568,"tsspmap",UDPHASH); addtolist(udp_port_types,1569,"ets",UDPHASH); addtolist(udp_port_types,1570,"orbixd",UDPHASH); addtolist(udp_port_types,1571,"rdb-dbs-disp",UDPHASH); addtolist(udp_port_types,1572,"chip-lm",UDPHASH); addtolist(udp_port_types,1573,"itscomm-ns",UDPHASH); addtolist(udp_port_types,1574,"mvel-lm",UDPHASH); addtolist(udp_port_types,1575,"oraclenames",UDPHASH); addtolist(udp_port_types,1576,"moldflow-lm",UDPHASH); addtolist(udp_port_types,1577,"hypercube-lm",UDPHASH); addtolist(udp_port_types,1578,"jacobus-lm",UDPHASH); addtolist(udp_port_types,1579,"ioc-sea-lm",UDPHASH); addtolist(udp_port_types,1580,"tn-tl-r2",UDPHASH); addtolist(udp_port_types,1581,"mil-2045-47001",UDPHASH); addtolist(udp_port_types,1582,"msims",UDPHASH); addtolist(udp_port_types,1583,"simbaexpress",UDPHASH); addtolist(udp_port_types,1584,"tn-tl-fd2",UDPHASH); addtolist(udp_port_types,1585,"intv",UDPHASH); addtolist(udp_port_types,1586,"ibm-abtact",UDPHASH); addtolist(udp_port_types,1587,"pra_elmd",UDPHASH); addtolist(udp_port_types,1588,"triquest-lm",UDPHASH); addtolist(udp_port_types,1589,"vqp",UDPHASH); addtolist(udp_port_types,1590,"gemini-lm",UDPHASH); addtolist(udp_port_types,1591,"ncpm-pm",UDPHASH); addtolist(udp_port_types,1592,"commonspace",UDPHASH); addtolist(udp_port_types,1593,"mainsoft-lm",UDPHASH); addtolist(udp_port_types,1594,"sixtrak",UDPHASH); addtolist(udp_port_types,1595,"radio",UDPHASH); addtolist(udp_port_types,1596,"radio-bc",UDPHASH); addtolist(udp_port_types,1597,"orbplus-iiop",UDPHASH); addtolist(udp_port_types,1598,"picknfs",UDPHASH); addtolist(udp_port_types,1599,"simbaservices",UDPHASH); addtolist(udp_port_types,1600,"issd",UDPHASH); addtolist(udp_port_types,1601,"aas",UDPHASH); addtolist(udp_port_types,1602,"inspect",UDPHASH); addtolist(udp_port_types,1603,"picodbc",UDPHASH); addtolist(udp_port_types,1604,"icabrowser",UDPHASH); addtolist(udp_port_types,1605,"slp",UDPHASH); addtolist(udp_port_types,1606,"slm-api",UDPHASH); addtolist(udp_port_types,1607,"stt",UDPHASH); addtolist(udp_port_types,1608,"smart-lm",UDPHASH); addtolist(udp_port_types,1609,"isysg-lm",UDPHASH); addtolist(udp_port_types,1610,"taurus-wh",UDPHASH); addtolist(udp_port_types,1611,"ill",UDPHASH); addtolist(udp_port_types,1612,"netbill-trans",UDPHASH); addtolist(udp_port_types,1613,"netbill-keyrep",UDPHASH); addtolist(udp_port_types,1614,"netbill-cred",UDPHASH); addtolist(udp_port_types,1615,"netbill-auth",UDPHASH); addtolist(udp_port_types,1616,"netbill-prod",UDPHASH); addtolist(udp_port_types,1617,"nimrod-agent",UDPHASH); addtolist(udp_port_types,1618,"skytelnet",UDPHASH); addtolist(udp_port_types,1619,"xs-openstorage",UDPHASH); addtolist(udp_port_types,1620,"faxportwinport",UDPHASH); addtolist(udp_port_types,1621,"softdataphone",UDPHASH); addtolist(udp_port_types,1622,"ontime",UDPHASH); addtolist(udp_port_types,1623,"jaleosnd",UDPHASH); addtolist(udp_port_types,1624,"udp-sr-port",UDPHASH); addtolist(udp_port_types,1625,"svs-omagent",UDPHASH); addtolist(udp_port_types,1626,"shockwave",UDPHASH); addtolist(udp_port_types,1627,"t128-gateway",UDPHASH); addtolist(udp_port_types,1628,"lontalk-norm",UDPHASH); addtolist(udp_port_types,1629,"lontalk-urgnt",UDPHASH); addtolist(udp_port_types,1630,"oraclenet8cman",UDPHASH); addtolist(udp_port_types,1631,"visitview",UDPHASH); addtolist(udp_port_types,1632,"pammratc",UDPHASH); addtolist(udp_port_types,1633,"pammrpc",UDPHASH); addtolist(udp_port_types,1634,"loaprobe",UDPHASH); addtolist(udp_port_types,1635,"edb-server1",UDPHASH); addtolist(udp_port_types,1636,"cncp",UDPHASH); addtolist(udp_port_types,1637,"cnap",UDPHASH); addtolist(udp_port_types,1638,"cnip",UDPHASH); addtolist(udp_port_types,1639,"cert-initiator",UDPHASH); addtolist(udp_port_types,1640,"cert-responder",UDPHASH); addtolist(udp_port_types,1641,"invision",UDPHASH); addtolist(udp_port_types,1642,"isis-am",UDPHASH); addtolist(udp_port_types,1643,"isis-ambc",UDPHASH); addtolist(udp_port_types,1645,"datametrics",UDPHASH); addtolist(udp_port_types,1646,"sa-msg-port",UDPHASH); addtolist(udp_port_types,1647,"rsap",UDPHASH); addtolist(udp_port_types,1648,"concurrent-lm",UDPHASH); addtolist(udp_port_types,1649,"kermit",UDPHASH); addtolist(udp_port_types,1650,"nkd",UDPHASH); addtolist(udp_port_types,1651,"shiva_confsrvr",UDPHASH); addtolist(udp_port_types,1652,"xnmp",UDPHASH); addtolist(udp_port_types,1653,"alphatech-lm",UDPHASH); addtolist(udp_port_types,1654,"stargatealerts",UDPHASH); addtolist(udp_port_types,1655,"dec-mbadmin",UDPHASH); addtolist(udp_port_types,1656,"dec-mbadmin-h",UDPHASH); addtolist(udp_port_types,1657,"fujitsu-mmpdc",UDPHASH); addtolist(udp_port_types,1658,"sixnetudr",UDPHASH); addtolist(udp_port_types,1659,"sg-lm",UDPHASH); addtolist(udp_port_types,1660,"skip-mc-gikreq",UDPHASH); addtolist(udp_port_types,1661,"netview-aix-1",UDPHASH); addtolist(udp_port_types,1662,"netview-aix-2",UDPHASH); addtolist(udp_port_types,1663,"netview-aix-3",UDPHASH); addtolist(udp_port_types,1664,"netview-aix-4",UDPHASH); addtolist(udp_port_types,1665,"netview-aix-5",UDPHASH); addtolist(udp_port_types,1666,"netview-aix-6",UDPHASH); addtolist(udp_port_types,1667,"netview-aix-7",UDPHASH); addtolist(udp_port_types,1668,"netview-aix-8",UDPHASH); addtolist(udp_port_types,1669,"netview-aix-9",UDPHASH); addtolist(udp_port_types,1670,"netview-aix-10",UDPHASH); addtolist(udp_port_types,1671,"netview-aix-11",UDPHASH); addtolist(udp_port_types,1672,"netview-aix-12",UDPHASH); addtolist(udp_port_types,1673,"proshare-mc-1",UDPHASH); addtolist(udp_port_types,1674,"proshare-mc-2",UDPHASH); addtolist(udp_port_types,1675,"pdp",UDPHASH); addtolist(udp_port_types,1676,"netcomm2",UDPHASH); addtolist(udp_port_types,1677,"groupwise",UDPHASH); addtolist(udp_port_types,1678,"prolink",UDPHASH); addtolist(udp_port_types,1679,"darcorp-lm",UDPHASH); addtolist(udp_port_types,1680,"microcom-sbp",UDPHASH); addtolist(udp_port_types,1681,"sd-elmd",UDPHASH); addtolist(udp_port_types,1682,"lanyon-lantern",UDPHASH); addtolist(udp_port_types,1683,"ncpm-hip",UDPHASH); addtolist(udp_port_types,1684,"snaresecure",UDPHASH); addtolist(udp_port_types,1685,"n2nremote",UDPHASH); addtolist(udp_port_types,1686,"cvmon",UDPHASH); addtolist(udp_port_types,1687,"nsjtp-ctrl",UDPHASH); addtolist(udp_port_types,1688,"nsjtp-data",UDPHASH); addtolist(udp_port_types,1689,"firefox",UDPHASH); addtolist(udp_port_types,1690,"ng-umds",UDPHASH); addtolist(udp_port_types,1691,"empire-empuma",UDPHASH); addtolist(udp_port_types,1692,"sstsys-lm",UDPHASH); addtolist(udp_port_types,1693,"rrirtr",UDPHASH); addtolist(udp_port_types,1694,"rrimwm",UDPHASH); addtolist(udp_port_types,1695,"rrilwm",UDPHASH); addtolist(udp_port_types,1696,"rrifmm",UDPHASH); addtolist(udp_port_types,1697,"rrisat",UDPHASH); addtolist(udp_port_types,1698,"rsvp-encap-1",UDPHASH); addtolist(udp_port_types,1699,"rsvp-encap-2",UDPHASH); addtolist(udp_port_types,1700,"mps-raft",UDPHASH); addtolist(udp_port_types,1701,"l2f",UDPHASH); addtolist(udp_port_types,1701,"l2tp",UDPHASH); addtolist(udp_port_types,1702,"deskshare",UDPHASH); addtolist(udp_port_types,1703,"hb-engine",UDPHASH); addtolist(udp_port_types,1704,"bcs-broker",UDPHASH); addtolist(udp_port_types,1705,"slingshot",UDPHASH); addtolist(udp_port_types,1706,"jetform",UDPHASH); addtolist(udp_port_types,1707,"vdmplay",UDPHASH); addtolist(udp_port_types,1708,"gat-lmd",UDPHASH); addtolist(udp_port_types,1709,"centra",UDPHASH); addtolist(udp_port_types,1710,"impera",UDPHASH); addtolist(udp_port_types,1711,"pptconference",UDPHASH); addtolist(udp_port_types,1712,"registrar",UDPHASH); addtolist(udp_port_types,1713,"conferencetalk",UDPHASH); addtolist(udp_port_types,1714,"sesi-lm",UDPHASH); addtolist(udp_port_types,1715,"houdini-lm",UDPHASH); addtolist(udp_port_types,1716,"xmsg",UDPHASH); addtolist(udp_port_types,1717,"fj-hdnet",UDPHASH); addtolist(udp_port_types,1718,"h323gatedisc",UDPHASH); addtolist(udp_port_types,1719,"h323gatestat",UDPHASH); addtolist(udp_port_types,1720,"h323hostcall",UDPHASH); addtolist(udp_port_types,1721,"caicci",UDPHASH); addtolist(udp_port_types,1722,"hks-lm",UDPHASH); addtolist(udp_port_types,1723,"pptp",UDPHASH); addtolist(udp_port_types,1724,"csbphonemaster",UDPHASH); addtolist(udp_port_types,1725,"iden-ralp",UDPHASH); addtolist(udp_port_types,1726,"iberiagames",UDPHASH); addtolist(udp_port_types,1727,"winddx",UDPHASH); addtolist(udp_port_types,1728,"telindus",UDPHASH); addtolist(udp_port_types,1729,"citynl",UDPHASH); addtolist(udp_port_types,1730,"roketz",UDPHASH); addtolist(udp_port_types,1731,"msiccp",UDPHASH); addtolist(udp_port_types,1732,"proxim",UDPHASH); addtolist(udp_port_types,1733,"siipat",UDPHASH); addtolist(udp_port_types,1734,"cambertx-lm",UDPHASH); addtolist(udp_port_types,1735,"privatechat",UDPHASH); addtolist(udp_port_types,1736,"street-stream",UDPHASH); addtolist(udp_port_types,1737,"ultimad",UDPHASH); addtolist(udp_port_types,1738,"gamegen1",UDPHASH); addtolist(udp_port_types,1739,"webaccess",UDPHASH); addtolist(udp_port_types,1740,"encore",UDPHASH); addtolist(udp_port_types,1741,"cisco-net-mgmt",UDPHASH); addtolist(udp_port_types,1742,"3Com-nsd",UDPHASH); addtolist(udp_port_types,1743,"cinegrfx-lm",UDPHASH); addtolist(udp_port_types,1744,"ncpm-ft",UDPHASH); addtolist(udp_port_types,1745,"remote-winsock",UDPHASH); addtolist(udp_port_types,1746,"ftrapid-1",UDPHASH); addtolist(udp_port_types,1747,"ftrapid-2",UDPHASH); addtolist(udp_port_types,1748,"oracle-em1",UDPHASH); addtolist(udp_port_types,1749,"aspen-services",UDPHASH); addtolist(udp_port_types,1750,"sslp",UDPHASH); addtolist(udp_port_types,1751,"swiftnet",UDPHASH); addtolist(udp_port_types,1752,"lofr-lm",UDPHASH); addtolist(udp_port_types,1753,"translogic-lm",UDPHASH); addtolist(udp_port_types,1754,"oracle-em2",UDPHASH); addtolist(udp_port_types,1755,"ms-streaming",UDPHASH); addtolist(udp_port_types,1756,"capfast-lmd",UDPHASH); addtolist(udp_port_types,1757,"cnhrp",UDPHASH); addtolist(udp_port_types,1758,"tftp-mcast",UDPHASH); addtolist(udp_port_types,1759,"spss-lm",UDPHASH); addtolist(udp_port_types,1760,"www-ldap-gw",UDPHASH); addtolist(udp_port_types,1761,"cft-0",UDPHASH); addtolist(udp_port_types,1762,"cft-1",UDPHASH); addtolist(udp_port_types,1763,"cft-2",UDPHASH); addtolist(udp_port_types,1764,"cft-3",UDPHASH); addtolist(udp_port_types,1765,"cft-4",UDPHASH); addtolist(udp_port_types,1766,"cft-5",UDPHASH); addtolist(udp_port_types,1767,"cft-6",UDPHASH); addtolist(udp_port_types,1768,"cft-7",UDPHASH); addtolist(udp_port_types,1769,"bmc-net-adm",UDPHASH); addtolist(udp_port_types,1770,"bmc-net-svc",UDPHASH); addtolist(udp_port_types,1771,"vaultbase",UDPHASH); addtolist(udp_port_types,1772,"essweb-gw",UDPHASH); addtolist(udp_port_types,1773,"kmscontrol",UDPHASH); addtolist(udp_port_types,1774,"global-dtserv",UDPHASH); addtolist(udp_port_types,1776,"femis",UDPHASH); addtolist(udp_port_types,1777,"powerguardian",UDPHASH); addtolist(udp_port_types,1778,"prodigy-intrnet",UDPHASH); addtolist(udp_port_types,1779,"pharmasoft",UDPHASH); addtolist(udp_port_types,1780,"dpkeyserv",UDPHASH); addtolist(udp_port_types,1781,"answersoft-lm",UDPHASH); addtolist(udp_port_types,1782,"hp-hcip",UDPHASH); addtolist(udp_port_types,1784,"finle-lm",UDPHASH); addtolist(udp_port_types,1785,"windlm",UDPHASH); addtolist(udp_port_types,1786,"funk-logger",UDPHASH); addtolist(udp_port_types,1787,"funk-license",UDPHASH); addtolist(udp_port_types,1788,"psmond",UDPHASH); addtolist(udp_port_types,1789,"hello",UDPHASH); addtolist(udp_port_types,1790,"nmsp",UDPHASH); addtolist(udp_port_types,1791,"ea1",UDPHASH); addtolist(udp_port_types,1792,"ibm-dt-2",UDPHASH); addtolist(udp_port_types,1793,"rsc-robot",UDPHASH); addtolist(udp_port_types,1794,"cera-bcm",UDPHASH); addtolist(udp_port_types,1795,"dpi-proxy",UDPHASH); addtolist(udp_port_types,1796,"vocaltec-admin",UDPHASH); addtolist(udp_port_types,1797,"uma",UDPHASH); addtolist(udp_port_types,1798,"etp",UDPHASH); addtolist(udp_port_types,1799,"netrisk",UDPHASH); addtolist(udp_port_types,1800,"ansys-lm",UDPHASH); addtolist(udp_port_types,1801,"msmq",UDPHASH); addtolist(udp_port_types,1802,"concomp1",UDPHASH); addtolist(udp_port_types,1803,"hp-hcip-gwy",UDPHASH); addtolist(udp_port_types,1804,"enl",UDPHASH); addtolist(udp_port_types,1805,"enl-name",UDPHASH); addtolist(udp_port_types,1806,"musiconline",UDPHASH); addtolist(udp_port_types,1807,"fhsp",UDPHASH); addtolist(udp_port_types,1808,"oracle-vp2",UDPHASH); addtolist(udp_port_types,1809,"oracle-vp1",UDPHASH); addtolist(udp_port_types,1810,"jerand-lm",UDPHASH); addtolist(udp_port_types,1811,"scientia-sdb",UDPHASH); addtolist(udp_port_types,1812,"radius",UDPHASH); addtolist(udp_port_types,1813,"radius-acct",UDPHASH); addtolist(udp_port_types,1814,"tdp-suite",UDPHASH); addtolist(udp_port_types,1815,"mmpft",UDPHASH); addtolist(udp_port_types,1816,"harp",UDPHASH); addtolist(udp_port_types,1817,"rkb-oscs",UDPHASH); addtolist(udp_port_types,1818,"etftp",UDPHASH); addtolist(udp_port_types,1819,"plato-lm",UDPHASH); addtolist(udp_port_types,1820,"mcagent",UDPHASH); addtolist(udp_port_types,1821,"donnyworld",UDPHASH); addtolist(udp_port_types,1822,"es-elmd",UDPHASH); addtolist(udp_port_types,1823,"unisys-lm",UDPHASH); addtolist(udp_port_types,1824,"metrics-pas",UDPHASH); addtolist(udp_port_types,1825,"direcpc-video",UDPHASH); addtolist(udp_port_types,1826,"ardt",UDPHASH); addtolist(udp_port_types,1827,"asi",UDPHASH); addtolist(udp_port_types,1828,"itm-mcell-u",UDPHASH); addtolist(udp_port_types,1829,"optika-emedia",UDPHASH); addtolist(udp_port_types,1830,"net8-cman",UDPHASH); addtolist(udp_port_types,1831,"myrtle",UDPHASH); addtolist(udp_port_types,1832,"tht-treasure",UDPHASH); addtolist(udp_port_types,1833,"udpradio",UDPHASH); addtolist(udp_port_types,1834,"ardusuni",UDPHASH); addtolist(udp_port_types,1835,"ardusmul",UDPHASH); addtolist(udp_port_types,1836,"ste-smsc",UDPHASH); addtolist(udp_port_types,1837,"csoft1",UDPHASH); addtolist(udp_port_types,1838,"talnet",UDPHASH); addtolist(udp_port_types,1839,"netopia-vo1",UDPHASH); addtolist(udp_port_types,1840,"netopia-vo2",UDPHASH); addtolist(udp_port_types,1841,"netopia-vo3",UDPHASH); addtolist(udp_port_types,1842,"netopia-vo4",UDPHASH); addtolist(udp_port_types,1843,"netopia-vo5",UDPHASH); addtolist(udp_port_types,1844,"direcpc-dll",UDPHASH); addtolist(udp_port_types,1845,"altalink",UDPHASH); addtolist(udp_port_types,1846,"tunstall-pnc",UDPHASH); addtolist(udp_port_types,1847,"slp-notify",UDPHASH); addtolist(udp_port_types,1848,"fjdocdist",UDPHASH); addtolist(udp_port_types,1849,"alpha-sms",UDPHASH); addtolist(udp_port_types,1850,"gsi",UDPHASH); addtolist(udp_port_types,1851,"ctcd",UDPHASH); addtolist(udp_port_types,1852,"virtual-time",UDPHASH); addtolist(udp_port_types,1853,"vids-avtp",UDPHASH); addtolist(udp_port_types,1854,"buddy-draw",UDPHASH); addtolist(udp_port_types,1855,"fiorano-rtrsvc",UDPHASH); addtolist(udp_port_types,1856,"fiorano-msgsvc",UDPHASH); addtolist(udp_port_types,1857,"datacaptor",UDPHASH); addtolist(udp_port_types,1858,"privateark",UDPHASH); addtolist(udp_port_types,1859,"gammafetchsvr",UDPHASH); addtolist(udp_port_types,1860,"sunscalar-svc",UDPHASH); addtolist(udp_port_types,1861,"lecroy-vicp",UDPHASH); addtolist(udp_port_types,1862,"techra-server",UDPHASH); addtolist(udp_port_types,1863,"msnp",UDPHASH); addtolist(udp_port_types,1864,"paradym-31port",UDPHASH); addtolist(udp_port_types,1865,"entp",UDPHASH); addtolist(udp_port_types,1866,"swrmi",UDPHASH); addtolist(udp_port_types,1867,"udrive",UDPHASH); addtolist(udp_port_types,1868,"viziblebrowser",UDPHASH); addtolist(udp_port_types,1869,"yestrader",UDPHASH); addtolist(udp_port_types,1870,"sunscalar-dns",UDPHASH); addtolist(udp_port_types,1871,"canocentral0",UDPHASH); addtolist(udp_port_types,1872,"canocentral1",UDPHASH); addtolist(udp_port_types,1873,"fjmpjps",UDPHASH); addtolist(udp_port_types,1874,"fjswapsnp",UDPHASH); addtolist(udp_port_types,1875,"westell-stats",UDPHASH); addtolist(udp_port_types,1876,"ewcappsrv",UDPHASH); addtolist(udp_port_types,1877,"hp-webqosdb",UDPHASH); addtolist(udp_port_types,1878,"drmsmc",UDPHASH); addtolist(udp_port_types,1879,"nettgain-nms",UDPHASH); addtolist(udp_port_types,1880,"vsat-control",UDPHASH); addtolist(udp_port_types,1881,"ibm-mqseries2",UDPHASH); addtolist(udp_port_types,1882,"ecsqdmn",UDPHASH); addtolist(udp_port_types,1883,"ibm-mqisdp",UDPHASH); addtolist(udp_port_types,1884,"idmaps",UDPHASH); addtolist(udp_port_types,1885,"vrtstrapserver",UDPHASH); addtolist(udp_port_types,1886,"leoip",UDPHASH); addtolist(udp_port_types,1887,"filex-lport",UDPHASH); addtolist(udp_port_types,1888,"ncconfig",UDPHASH); addtolist(udp_port_types,1889,"unify-adapter",UDPHASH); addtolist(udp_port_types,1890,"wilkenlistener",UDPHASH); addtolist(udp_port_types,1891,"childkey-notif",UDPHASH); addtolist(udp_port_types,1892,"childkey-ctrl",UDPHASH); addtolist(udp_port_types,1893,"elad",UDPHASH); addtolist(udp_port_types,1894,"o2server-port",UDPHASH); addtolist(udp_port_types,1895,"vista-4gl",UDPHASH); addtolist(udp_port_types,1896,"b-novative-ls",UDPHASH); addtolist(udp_port_types,1897,"metaagent",UDPHASH); addtolist(udp_port_types,1898,"cymtec-port",UDPHASH); addtolist(udp_port_types,1899,"mc2studios",UDPHASH); addtolist(udp_port_types,1900,"ssdp",UDPHASH); addtolist(udp_port_types,1901,"fjicl-tep-a",UDPHASH); addtolist(udp_port_types,1902,"fjicl-tep-b",UDPHASH); addtolist(udp_port_types,1903,"linkname",UDPHASH); addtolist(udp_port_types,1904,"fjicl-tep-c",UDPHASH); addtolist(udp_port_types,1905,"sugp",UDPHASH); addtolist(udp_port_types,1906,"tpmd",UDPHASH); addtolist(udp_port_types,1907,"intrastar",UDPHASH); addtolist(udp_port_types,1908,"dawn",UDPHASH); addtolist(udp_port_types,1909,"global-wlink",UDPHASH); addtolist(udp_port_types,1910,"ultrabac",UDPHASH); addtolist(udp_port_types,1911,"mtp",UDPHASH); addtolist(udp_port_types,1912,"rhp-iibp",UDPHASH); addtolist(udp_port_types,1913,"armadp",UDPHASH); addtolist(udp_port_types,1914,"elm-momentum",UDPHASH); addtolist(udp_port_types,1915,"facelink",UDPHASH); addtolist(udp_port_types,1916,"persona",UDPHASH); addtolist(udp_port_types,1917,"noagent",UDPHASH); addtolist(udp_port_types,1918,"can-nds",UDPHASH); addtolist(udp_port_types,1919,"can-dch",UDPHASH); addtolist(udp_port_types,1920,"can-ferret",UDPHASH); addtolist(udp_port_types,1921,"noadmin",UDPHASH); addtolist(udp_port_types,1922,"tapestry",UDPHASH); addtolist(udp_port_types,1923,"spice",UDPHASH); addtolist(udp_port_types,1924,"xiip",UDPHASH); addtolist(udp_port_types,1925,"discovery-port",UDPHASH); addtolist(udp_port_types,1926,"egs",UDPHASH); addtolist(udp_port_types,1927,"videte-cipc",UDPHASH); addtolist(udp_port_types,1928,"emsd-port",UDPHASH); addtolist(udp_port_types,1929,"bandwiz-system",UDPHASH); addtolist(udp_port_types,1930,"driveappserver",UDPHASH); addtolist(udp_port_types,1931,"amdsched",UDPHASH); addtolist(udp_port_types,1932,"ctt-broker",UDPHASH); addtolist(udp_port_types,1941,"dic-aida",UDPHASH); addtolist(udp_port_types,1944,"close-combat",UDPHASH); addtolist(udp_port_types,1945,"dialogic-elmd",UDPHASH); addtolist(udp_port_types,1946,"tekpls",UDPHASH); addtolist(udp_port_types,1947,"hlserver",UDPHASH); addtolist(udp_port_types,1948,"eye2eye",UDPHASH); addtolist(udp_port_types,1949,"ismaeasdaqlive",UDPHASH); addtolist(udp_port_types,1950,"ismaeasdaqtest",UDPHASH); addtolist(udp_port_types,1951,"bcs-lmserver",UDPHASH); addtolist(udp_port_types,1952,"mpnjsc",UDPHASH); addtolist(udp_port_types,1953,"rapidbase",UDPHASH); addtolist(udp_port_types,1957,"unix-status",UDPHASH); addtolist(udp_port_types,1960,"nasmanager",UDPHASH); addtolist(udp_port_types,1961,"bts-appserver",UDPHASH); addtolist(udp_port_types,1962,"biap-mp",UDPHASH); addtolist(udp_port_types,1963,"webmachine",UDPHASH); addtolist(udp_port_types,1964,"solid-e-engine",UDPHASH); addtolist(udp_port_types,1965,"tivoli-npm",UDPHASH); addtolist(udp_port_types,1966,"slush",UDPHASH); addtolist(udp_port_types,1967,"sns-quote",UDPHASH); addtolist(udp_port_types,1972,"intersys-cache",UDPHASH); addtolist(udp_port_types,1973,"dlsrap",UDPHASH); addtolist(udp_port_types,1974,"drp",UDPHASH); addtolist(udp_port_types,1975,"tcoflashagent",UDPHASH); addtolist(udp_port_types,1976,"tcoregagent",UDPHASH); addtolist(udp_port_types,1977,"tcoaddressbook",UDPHASH); addtolist(udp_port_types,1978,"unisql",UDPHASH); addtolist(udp_port_types,1979,"unisql-java",UDPHASH); addtolist(udp_port_types,1984,"bb",UDPHASH); addtolist(udp_port_types,1985,"hsrp",UDPHASH); addtolist(udp_port_types,1986,"licensedaemon",UDPHASH); addtolist(udp_port_types,1987,"tr-rsrb-p1",UDPHASH); addtolist(udp_port_types,1988,"tr-rsrb-p2",UDPHASH); addtolist(udp_port_types,1989,"tr-rsrb-p3",UDPHASH); addtolist(udp_port_types,1989,"mshnet",UDPHASH); addtolist(udp_port_types,1990,"stun-p1",UDPHASH); addtolist(udp_port_types,1991,"stun-p2",UDPHASH); addtolist(udp_port_types,1992,"stun-p3",UDPHASH); addtolist(udp_port_types,1992,"ipsendmsg",UDPHASH); addtolist(udp_port_types,1993,"snmp-tcp-port",UDPHASH); addtolist(udp_port_types,1994,"stun-port",UDPHASH); addtolist(udp_port_types,1995,"perf-port",UDPHASH); addtolist(udp_port_types,1996,"tr-rsrb-port",UDPHASH); addtolist(udp_port_types,1997,"gdp-port",UDPHASH); addtolist(udp_port_types,1998,"x25-svc-port",UDPHASH); addtolist(udp_port_types,1999,"tcp-id-port",UDPHASH); addtolist(udp_port_types,2000,"callbook",UDPHASH); addtolist(udp_port_types,2001,"wizard",UDPHASH); addtolist(udp_port_types,2002,"globe",UDPHASH); addtolist(udp_port_types,2004,"emce",UDPHASH); addtolist(udp_port_types,2005,"oracle",UDPHASH); addtolist(udp_port_types,2006,"raid-cc",UDPHASH); addtolist(udp_port_types,2007,"raid-am",UDPHASH); addtolist(udp_port_types,2008,"terminaldb",UDPHASH); addtolist(udp_port_types,2009,"whosockami",UDPHASH); addtolist(udp_port_types,2010,"pipe_server",UDPHASH); addtolist(udp_port_types,2011,"servserv",UDPHASH); addtolist(udp_port_types,2012,"raid-ac",UDPHASH); addtolist(udp_port_types,2013,"raid-cd",UDPHASH); addtolist(udp_port_types,2014,"raid-sf",UDPHASH); addtolist(udp_port_types,2015,"raid-cs",UDPHASH); addtolist(udp_port_types,2016,"bootserver",UDPHASH); addtolist(udp_port_types,2017,"bootclient",UDPHASH); addtolist(udp_port_types,2018,"rellpack",UDPHASH); addtolist(udp_port_types,2019,"about",UDPHASH); addtolist(udp_port_types,2020,"xinupageserver",UDPHASH); addtolist(udp_port_types,2021,"xinuexpansion1",UDPHASH); addtolist(udp_port_types,2022,"xinuexpansion2",UDPHASH); addtolist(udp_port_types,2023,"xinuexpansion3",UDPHASH); addtolist(udp_port_types,2024,"xinuexpansion4",UDPHASH); addtolist(udp_port_types,2025,"xribs",UDPHASH); addtolist(udp_port_types,2026,"scrabble",UDPHASH); addtolist(udp_port_types,2027,"shadowserver",UDPHASH); addtolist(udp_port_types,2028,"submitserver",UDPHASH); addtolist(udp_port_types,2030,"device2",UDPHASH); addtolist(udp_port_types,2032,"blackboard",UDPHASH); addtolist(udp_port_types,2033,"glogger",UDPHASH); addtolist(udp_port_types,2034,"scoremgr",UDPHASH); addtolist(udp_port_types,2035,"imsldoc",UDPHASH); addtolist(udp_port_types,2038,"objectmanager",UDPHASH); addtolist(udp_port_types,2040,"lam",UDPHASH); addtolist(udp_port_types,2041,"interbase",UDPHASH); addtolist(udp_port_types,2042,"isis",UDPHASH); addtolist(udp_port_types,2043,"isis-bcast",UDPHASH); addtolist(udp_port_types,2044,"rimsl",UDPHASH); addtolist(udp_port_types,2045,"cdfunc",UDPHASH); addtolist(udp_port_types,2046,"sdfunc",UDPHASH); addtolist(udp_port_types,2047,"dls",UDPHASH); addtolist(udp_port_types,2048,"dls-monitor",UDPHASH); addtolist(udp_port_types,2049,"shilp",UDPHASH); addtolist(udp_port_types,2049,"nfs",UDPHASH); addtolist(udp_port_types,2065,"dlsrpn",UDPHASH); addtolist(udp_port_types,2067,"dlswpn",UDPHASH); addtolist(udp_port_types,2087,"eli",UDPHASH); addtolist(udp_port_types,2089,"sep",UDPHASH); addtolist(udp_port_types,2090,"lrp",UDPHASH); addtolist(udp_port_types,2091,"prp",UDPHASH); addtolist(udp_port_types,2092,"descent3",UDPHASH); addtolist(udp_port_types,2093,"nbx-cc",UDPHASH); addtolist(udp_port_types,2094,"nbx-au",UDPHASH); addtolist(udp_port_types,2095,"nbx-ser",UDPHASH); addtolist(udp_port_types,2096,"nbx-dir",UDPHASH); addtolist(udp_port_types,2097,"jetformpreview",UDPHASH); addtolist(udp_port_types,2098,"dialog-port",UDPHASH); addtolist(udp_port_types,2099,"h2250-annex-g",UDPHASH); addtolist(udp_port_types,2100,"amiganetfs",UDPHASH); addtolist(udp_port_types,2101,"rtcm-sc104",UDPHASH); addtolist(udp_port_types,2102,"zephyr-srv",UDPHASH); addtolist(udp_port_types,2103,"zephyr-clt",UDPHASH); addtolist(udp_port_types,2104,"zephyr-hm",UDPHASH); addtolist(udp_port_types,2105,"minipay",UDPHASH); addtolist(udp_port_types,2106,"mzap",UDPHASH); addtolist(udp_port_types,2107,"bintec-admin",UDPHASH); addtolist(udp_port_types,2108,"comcam",UDPHASH); addtolist(udp_port_types,2109,"ergolight",UDPHASH); addtolist(udp_port_types,2110,"umsp",UDPHASH); addtolist(udp_port_types,2111,"dsatp",UDPHASH); addtolist(udp_port_types,2112,"idonix-metanet",UDPHASH); addtolist(udp_port_types,2113,"hsl-storm",UDPHASH); addtolist(udp_port_types,2114,"newheights",UDPHASH); addtolist(udp_port_types,2115,"kdm",UDPHASH); addtolist(udp_port_types,2116,"ccowcmr",UDPHASH); addtolist(udp_port_types,2117,"mentaclient",UDPHASH); addtolist(udp_port_types,2118,"mentaserver",UDPHASH); addtolist(udp_port_types,2119,"gsigatekeeper",UDPHASH); addtolist(udp_port_types,2120,"qencp",UDPHASH); addtolist(udp_port_types,2121,"scientia-ssdb",UDPHASH); addtolist(udp_port_types,2122,"caupc-remote",UDPHASH); addtolist(udp_port_types,2123,"gtp-control",UDPHASH); addtolist(udp_port_types,2124,"elatelink",UDPHASH); addtolist(udp_port_types,2125,"lockstep",UDPHASH); addtolist(udp_port_types,2126,"pktcable-cops",UDPHASH); addtolist(udp_port_types,2127,"index-pc-wb",UDPHASH); addtolist(udp_port_types,2128,"net-steward",UDPHASH); addtolist(udp_port_types,2129,"cs-live",UDPHASH); addtolist(udp_port_types,2130,"swc-xds",UDPHASH); addtolist(udp_port_types,2131,"avantageb2b",UDPHASH); addtolist(udp_port_types,2132,"avail-epmap",UDPHASH); addtolist(udp_port_types,2133,"zymed-zpp",UDPHASH); addtolist(udp_port_types,2134,"avenue",UDPHASH); addtolist(udp_port_types,2135,"gris",UDPHASH); addtolist(udp_port_types,2136,"appworxsrv",UDPHASH); addtolist(udp_port_types,2137,"connect",UDPHASH); addtolist(udp_port_types,2138,"unbind-cluster",UDPHASH); addtolist(udp_port_types,2139,"ias-auth",UDPHASH); addtolist(udp_port_types,2140,"ias-reg",UDPHASH); addtolist(udp_port_types,2141,"ias-admind",UDPHASH); addtolist(udp_port_types,2142,"tdm-over-ip",UDPHASH); addtolist(udp_port_types,2143,"lv-jc",UDPHASH); addtolist(udp_port_types,2144,"lv-ffx",UDPHASH); addtolist(udp_port_types,2145,"lv-pici",UDPHASH); addtolist(udp_port_types,2146,"lv-not",UDPHASH); addtolist(udp_port_types,2147,"lv-auth",UDPHASH); addtolist(udp_port_types,2148,"veritas-ucl",UDPHASH); addtolist(udp_port_types,2149,"acptsys",UDPHASH); addtolist(udp_port_types,2150,"dynamic3d",UDPHASH); addtolist(udp_port_types,2151,"docent",UDPHASH); addtolist(udp_port_types,2152,"gtp-user",UDPHASH); addtolist(udp_port_types,2165,"x-bone-api",UDPHASH); addtolist(udp_port_types,2166,"iwserver",UDPHASH); addtolist(udp_port_types,2180,"mc-gt-srv",UDPHASH); addtolist(udp_port_types,2181,"eforward",UDPHASH); addtolist(udp_port_types,2200,"ici",UDPHASH); addtolist(udp_port_types,2201,"ats",UDPHASH); addtolist(udp_port_types,2202,"imtc-map",UDPHASH); addtolist(udp_port_types,2213,"kali",UDPHASH); addtolist(udp_port_types,2220,"netiq",UDPHASH); addtolist(udp_port_types,2221,"rockwell-csp1",UDPHASH); addtolist(udp_port_types,2222,"rockwell-csp2",UDPHASH); addtolist(udp_port_types,2223,"rockwell-csp3",UDPHASH); addtolist(udp_port_types,2232,"ivs-video",UDPHASH); addtolist(udp_port_types,2233,"infocrypt",UDPHASH); addtolist(udp_port_types,2234,"directplay",UDPHASH); addtolist(udp_port_types,2235,"sercomm-wlink",UDPHASH); addtolist(udp_port_types,2236,"nani",UDPHASH); addtolist(udp_port_types,2237,"optech-port1-lm",UDPHASH); addtolist(udp_port_types,2238,"aviva-sna",UDPHASH); addtolist(udp_port_types,2239,"imagequery",UDPHASH); addtolist(udp_port_types,2240,"recipe",UDPHASH); addtolist(udp_port_types,2241,"ivsd",UDPHASH); addtolist(udp_port_types,2242,"foliocorp",UDPHASH); addtolist(udp_port_types,2243,"magicom",UDPHASH); addtolist(udp_port_types,2244,"nmsserver",UDPHASH); addtolist(udp_port_types,2245,"hao",UDPHASH); addtolist(udp_port_types,2250,"remote-collab",UDPHASH); addtolist(udp_port_types,2255,"vrtp",UDPHASH); addtolist(udp_port_types,2279,"xmquery",UDPHASH); addtolist(udp_port_types,2280,"lnvpoller",UDPHASH); addtolist(udp_port_types,2281,"lnvconsole",UDPHASH); addtolist(udp_port_types,2282,"lnvalarm",UDPHASH); addtolist(udp_port_types,2283,"lnvstatus",UDPHASH); addtolist(udp_port_types,2284,"lnvmaps",UDPHASH); addtolist(udp_port_types,2285,"lnvmailmon",UDPHASH); addtolist(udp_port_types,2286,"nas-metering",UDPHASH); addtolist(udp_port_types,2287,"dna",UDPHASH); addtolist(udp_port_types,2288,"netml",UDPHASH); addtolist(udp_port_types,2294,"konshus-lm",UDPHASH); addtolist(udp_port_types,2295,"advant-lm",UDPHASH); addtolist(udp_port_types,2296,"theta-lm",UDPHASH); addtolist(udp_port_types,2297,"d2k-datamover1",UDPHASH); addtolist(udp_port_types,2298,"d2k-datamover2",UDPHASH); addtolist(udp_port_types,2299,"pc-telecommute",UDPHASH); addtolist(udp_port_types,2300,"cvmmon",UDPHASH); addtolist(udp_port_types,2301,"cpq-wbem",UDPHASH); addtolist(udp_port_types,2302,"binderysupport",UDPHASH); addtolist(udp_port_types,2303,"proxy-gateway",UDPHASH); addtolist(udp_port_types,2304,"attachmate-uts",UDPHASH); addtolist(udp_port_types,2305,"mt-scaleserver",UDPHASH); addtolist(udp_port_types,2306,"tappi-boxnet",UDPHASH); addtolist(udp_port_types,2307,"pehelp",UDPHASH); addtolist(udp_port_types,2308,"sdhelp",UDPHASH); addtolist(udp_port_types,2309,"sdserver",UDPHASH); addtolist(udp_port_types,2310,"sdclient",UDPHASH); addtolist(udp_port_types,2311,"messageservice",UDPHASH); addtolist(udp_port_types,2313,"iapp",UDPHASH); addtolist(udp_port_types,2314,"cr-websystems",UDPHASH); addtolist(udp_port_types,2315,"precise-sft",UDPHASH); addtolist(udp_port_types,2316,"sent-lm",UDPHASH); addtolist(udp_port_types,2317,"attachmate-g32",UDPHASH); addtolist(udp_port_types,2318,"cadencecontrol",UDPHASH); addtolist(udp_port_types,2319,"infolibria",UDPHASH); addtolist(udp_port_types,2320,"siebel-ns",UDPHASH); addtolist(udp_port_types,2321,"rdlap",UDPHASH); addtolist(udp_port_types,2322,"ofsd",UDPHASH); addtolist(udp_port_types,2323,"3d-nfsd",UDPHASH); addtolist(udp_port_types,2324,"cosmocall",UDPHASH); addtolist(udp_port_types,2325,"designspace-lm",UDPHASH); addtolist(udp_port_types,2326,"idcp",UDPHASH); addtolist(udp_port_types,2327,"xingcsm",UDPHASH); addtolist(udp_port_types,2328,"netrix-sftm",UDPHASH); addtolist(udp_port_types,2329,"nvd",UDPHASH); addtolist(udp_port_types,2330,"tscchat",UDPHASH); addtolist(udp_port_types,2331,"agentview",UDPHASH); addtolist(udp_port_types,2332,"rcc-host",UDPHASH); addtolist(udp_port_types,2333,"snapp",UDPHASH); addtolist(udp_port_types,2334,"ace-client",UDPHASH); addtolist(udp_port_types,2335,"ace-proxy",UDPHASH); addtolist(udp_port_types,2336,"appleugcontrol",UDPHASH); addtolist(udp_port_types,2337,"ideesrv",UDPHASH); addtolist(udp_port_types,2338,"norton-lambert",UDPHASH); addtolist(udp_port_types,2339,"3com-webview",UDPHASH); addtolist(udp_port_types,2340,"wrs_registry",UDPHASH); addtolist(udp_port_types,2341,"xiostatus",UDPHASH); addtolist(udp_port_types,2342,"manage-exec",UDPHASH); addtolist(udp_port_types,2343,"nati-logos",UDPHASH); addtolist(udp_port_types,2344,"fcmsys",UDPHASH); addtolist(udp_port_types,2345,"dbm",UDPHASH); addtolist(udp_port_types,2346,"redstorm_join",UDPHASH); addtolist(udp_port_types,2347,"redstorm_find",UDPHASH); addtolist(udp_port_types,2348,"redstorm_info",UDPHASH); addtolist(udp_port_types,2349,"redstorm_diag",UDPHASH); addtolist(udp_port_types,2350,"psbserver",UDPHASH); addtolist(udp_port_types,2351,"psrserver",UDPHASH); addtolist(udp_port_types,2352,"pslserver",UDPHASH); addtolist(udp_port_types,2353,"pspserver",UDPHASH); addtolist(udp_port_types,2354,"psprserver",UDPHASH); addtolist(udp_port_types,2355,"psdbserver",UDPHASH); addtolist(udp_port_types,2356,"gxtelmd",UDPHASH); addtolist(udp_port_types,2357,"unihub-server",UDPHASH); addtolist(udp_port_types,2358,"futrix",UDPHASH); addtolist(udp_port_types,2359,"flukeserver",UDPHASH); addtolist(udp_port_types,2360,"nexstorindltd",UDPHASH); addtolist(udp_port_types,2361,"tl1",UDPHASH); addtolist(udp_port_types,2362,"digiman",UDPHASH); addtolist(udp_port_types,2363,"mediacntrlnfsd",UDPHASH); addtolist(udp_port_types,2364,"oi-2000",UDPHASH); addtolist(udp_port_types,2365,"dbref",UDPHASH); addtolist(udp_port_types,2366,"qip-login",UDPHASH); addtolist(udp_port_types,2367,"service-ctrl",UDPHASH); addtolist(udp_port_types,2368,"opentable",UDPHASH); addtolist(udp_port_types,2369,"acs2000-dsp",UDPHASH); addtolist(udp_port_types,2370,"l3-hbmon",UDPHASH); addtolist(udp_port_types,2381,"compaq-https",UDPHASH); addtolist(udp_port_types,2382,"ms-olap3",UDPHASH); addtolist(udp_port_types,2383,"ms-olap4",UDPHASH); addtolist(udp_port_types,2384,"sd-request",UDPHASH); addtolist(udp_port_types,2389,"ovsessionmgr",UDPHASH); addtolist(udp_port_types,2390,"rsmtp",UDPHASH); addtolist(udp_port_types,2391,"3com-net-mgmt",UDPHASH); addtolist(udp_port_types,2392,"tacticalauth",UDPHASH); addtolist(udp_port_types,2393,"ms-olap1",UDPHASH); addtolist(udp_port_types,2394,"ms-olap2",UDPHASH); addtolist(udp_port_types,2395,"lan900_remote",UDPHASH); addtolist(udp_port_types,2396,"wusage",UDPHASH); addtolist(udp_port_types,2397,"ncl",UDPHASH); addtolist(udp_port_types,2398,"orbiter",UDPHASH); addtolist(udp_port_types,2399,"fmpro-fdal",UDPHASH); addtolist(udp_port_types,2400,"opequus-server",UDPHASH); addtolist(udp_port_types,2401,"cvspserver",UDPHASH); addtolist(udp_port_types,2402,"taskmaster2000",UDPHASH); addtolist(udp_port_types,2403,"taskmaster2000",UDPHASH); addtolist(udp_port_types,2404,"iec870-5-104",UDPHASH); addtolist(udp_port_types,2405,"trc-netpoll",UDPHASH); addtolist(udp_port_types,2406,"jediserver",UDPHASH); addtolist(udp_port_types,2407,"orion",UDPHASH); addtolist(udp_port_types,2408,"optimanet",UDPHASH); addtolist(udp_port_types,2409,"sns-protocol",UDPHASH); addtolist(udp_port_types,2410,"vrts-registry",UDPHASH); addtolist(udp_port_types,2411,"netwave-ap-mgmt",UDPHASH); addtolist(udp_port_types,2412,"cdn",UDPHASH); addtolist(udp_port_types,2413,"orion-rmi-reg",UDPHASH); addtolist(udp_port_types,2414,"beeyond",UDPHASH); addtolist(udp_port_types,2415,"comtest",UDPHASH); addtolist(udp_port_types,2416,"rmtserver",UDPHASH); addtolist(udp_port_types,2417,"composit-server",UDPHASH); addtolist(udp_port_types,2418,"cas",UDPHASH); addtolist(udp_port_types,2419,"attachmate-s2s",UDPHASH); addtolist(udp_port_types,2420,"dslremote-mgmt",UDPHASH); addtolist(udp_port_types,2421,"g-talk",UDPHASH); addtolist(udp_port_types,2422,"crmsbits",UDPHASH); addtolist(udp_port_types,2423,"rnrp",UDPHASH); addtolist(udp_port_types,2424,"kofax-svr",UDPHASH); addtolist(udp_port_types,2425,"fjitsuappmgr",UDPHASH); addtolist(udp_port_types,2426,"appliantudp",UDPHASH); addtolist(udp_port_types,2427,"mgcp-gateway",UDPHASH); addtolist(udp_port_types,2428,"ott",UDPHASH); addtolist(udp_port_types,2429,"ft-role",UDPHASH); addtolist(udp_port_types,2430,"venus",UDPHASH); addtolist(udp_port_types,2431,"venus-se",UDPHASH); addtolist(udp_port_types,2432,"codasrv",UDPHASH); addtolist(udp_port_types,2433,"codasrv-se",UDPHASH); addtolist(udp_port_types,2434,"pxc-epmap",UDPHASH); addtolist(udp_port_types,2435,"optilogic",UDPHASH); addtolist(udp_port_types,2436,"topx",UDPHASH); addtolist(udp_port_types,2437,"unicontrol",UDPHASH); addtolist(udp_port_types,2438,"msp",UDPHASH); addtolist(udp_port_types,2439,"sybasedbsynch",UDPHASH); addtolist(udp_port_types,2440,"spearway",UDPHASH); addtolist(udp_port_types,2441,"pvsw-inet",UDPHASH); addtolist(udp_port_types,2442,"netangel",UDPHASH); addtolist(udp_port_types,2443,"powerclientcsf",UDPHASH); addtolist(udp_port_types,2444,"btpp2sectrans",UDPHASH); addtolist(udp_port_types,2445,"dtn1",UDPHASH); addtolist(udp_port_types,2446,"bues_service",UDPHASH); addtolist(udp_port_types,2447,"ovwdb",UDPHASH); addtolist(udp_port_types,2448,"hpppssvr",UDPHASH); addtolist(udp_port_types,2449,"ratl",UDPHASH); addtolist(udp_port_types,2450,"netadmin",UDPHASH); addtolist(udp_port_types,2451,"netchat",UDPHASH); addtolist(udp_port_types,2452,"snifferclient",UDPHASH); addtolist(udp_port_types,2453,"madge-om",UDPHASH); addtolist(udp_port_types,2454,"indx-dds",UDPHASH); addtolist(udp_port_types,2455,"wago-io-system",UDPHASH); addtolist(udp_port_types,2456,"altav-remmgt",UDPHASH); addtolist(udp_port_types,2457,"rapido-ip",UDPHASH); addtolist(udp_port_types,2458,"griffin",UDPHASH); addtolist(udp_port_types,2459,"community",UDPHASH); addtolist(udp_port_types,2460,"ms-theater",UDPHASH); addtolist(udp_port_types,2461,"qadmifoper",UDPHASH); addtolist(udp_port_types,2462,"qadmifevent",UDPHASH); addtolist(udp_port_types,2463,"symbios-raid",UDPHASH); addtolist(udp_port_types,2464,"direcpc-si",UDPHASH); addtolist(udp_port_types,2465,"lbm",UDPHASH); addtolist(udp_port_types,2466,"lbf",UDPHASH); addtolist(udp_port_types,2467,"high-criteria",UDPHASH); addtolist(udp_port_types,2468,"qip-msgd",UDPHASH); addtolist(udp_port_types,2469,"mti-tcs-comm",UDPHASH); addtolist(udp_port_types,2470,"taskman-port",UDPHASH); addtolist(udp_port_types,2471,"seaodbc",UDPHASH); addtolist(udp_port_types,2472,"c3",UDPHASH); addtolist(udp_port_types,2473,"aker-cdp",UDPHASH); addtolist(udp_port_types,2474,"vitalanalysis",UDPHASH); addtolist(udp_port_types,2475,"ace-server",UDPHASH); addtolist(udp_port_types,2476,"ace-svr-prop",UDPHASH); addtolist(udp_port_types,2477,"ssm-cvs",UDPHASH); addtolist(udp_port_types,2478,"ssm-cssps",UDPHASH); addtolist(udp_port_types,2479,"ssm-els",UDPHASH); addtolist(udp_port_types,2480,"lingwood",UDPHASH); addtolist(udp_port_types,2481,"giop",UDPHASH); addtolist(udp_port_types,2482,"giop-ssl",UDPHASH); addtolist(udp_port_types,2483,"ttc",UDPHASH); addtolist(udp_port_types,2484,"ttc-ssl",UDPHASH); addtolist(udp_port_types,2485,"netobjects1",UDPHASH); addtolist(udp_port_types,2486,"netobjects2",UDPHASH); addtolist(udp_port_types,2487,"pns",UDPHASH); addtolist(udp_port_types,2488,"moy-corp",UDPHASH); addtolist(udp_port_types,2489,"tsilb",UDPHASH); addtolist(udp_port_types,2490,"qip-qdhcp",UDPHASH); addtolist(udp_port_types,2491,"conclave-cpp",UDPHASH); addtolist(udp_port_types,2492,"groove",UDPHASH); addtolist(udp_port_types,2493,"talarian-mqs",UDPHASH); addtolist(udp_port_types,2494,"bmc-ar",UDPHASH); addtolist(udp_port_types,2495,"fast-rem-serv",UDPHASH); addtolist(udp_port_types,2496,"dirgis",UDPHASH); addtolist(udp_port_types,2497,"quaddb",UDPHASH); addtolist(udp_port_types,2498,"odn-castraq",UDPHASH); addtolist(udp_port_types,2499,"unicontrol",UDPHASH); addtolist(udp_port_types,2500,"rtsserv",UDPHASH); addtolist(udp_port_types,2501,"rtsclient",UDPHASH); addtolist(udp_port_types,2502,"kentrox-prot",UDPHASH); addtolist(udp_port_types,2503,"nms-dpnss",UDPHASH); addtolist(udp_port_types,2504,"wlbs",UDPHASH); addtolist(udp_port_types,2505,"torque-traffic",UDPHASH); addtolist(udp_port_types,2506,"jbroker",UDPHASH); addtolist(udp_port_types,2507,"spock",UDPHASH); addtolist(udp_port_types,2508,"jdatastore",UDPHASH); addtolist(udp_port_types,2509,"fjmpss",UDPHASH); addtolist(udp_port_types,2510,"fjappmgrbulk",UDPHASH); addtolist(udp_port_types,2511,"metastorm",UDPHASH); addtolist(udp_port_types,2512,"citrixima",UDPHASH); addtolist(udp_port_types,2513,"citrixadmin",UDPHASH); addtolist(udp_port_types,2514,"facsys-ntp",UDPHASH); addtolist(udp_port_types,2515,"facsys-router",UDPHASH); addtolist(udp_port_types,2516,"maincontrol",UDPHASH); addtolist(udp_port_types,2517,"call-sig-trans",UDPHASH); addtolist(udp_port_types,2518,"willy",UDPHASH); addtolist(udp_port_types,2519,"globmsgsvc",UDPHASH); addtolist(udp_port_types,2520,"pvsw",UDPHASH); addtolist(udp_port_types,2521,"adaptecmgr",UDPHASH); addtolist(udp_port_types,2522,"windb",UDPHASH); addtolist(udp_port_types,2523,"qke-llc-v3",UDPHASH); addtolist(udp_port_types,2524,"optiwave-lm",UDPHASH); addtolist(udp_port_types,2525,"ms-v-worlds",UDPHASH); addtolist(udp_port_types,2526,"ema-sent-lm",UDPHASH); addtolist(udp_port_types,2527,"iqserver",UDPHASH); addtolist(udp_port_types,2528,"ncr_ccl",UDPHASH); addtolist(udp_port_types,2529,"utsftp",UDPHASH); addtolist(udp_port_types,2530,"vrcommerce",UDPHASH); addtolist(udp_port_types,2531,"ito-e-gui",UDPHASH); addtolist(udp_port_types,2532,"ovtopmd",UDPHASH); addtolist(udp_port_types,2533,"snifferserver",UDPHASH); addtolist(udp_port_types,2534,"combox-web-acc",UDPHASH); addtolist(udp_port_types,2535,"madcap",UDPHASH); addtolist(udp_port_types,2536,"btpp2audctr1",UDPHASH); addtolist(udp_port_types,2537,"upgrade",UDPHASH); addtolist(udp_port_types,2538,"vnwk-prapi",UDPHASH); addtolist(udp_port_types,2539,"vsiadmin",UDPHASH); addtolist(udp_port_types,2540,"lonworks",UDPHASH); addtolist(udp_port_types,2541,"lonworks2",UDPHASH); addtolist(udp_port_types,2542,"davinci",UDPHASH); addtolist(udp_port_types,2543,"reftek",UDPHASH); addtolist(udp_port_types,2545,"sis-emt",UDPHASH); addtolist(udp_port_types,2546,"vytalvaultbrtp",UDPHASH); addtolist(udp_port_types,2547,"vytalvaultvsmp",UDPHASH); addtolist(udp_port_types,2548,"vytalvaultpipe",UDPHASH); addtolist(udp_port_types,2549,"ipass",UDPHASH); addtolist(udp_port_types,2550,"ads",UDPHASH); addtolist(udp_port_types,2551,"isg-uda-server",UDPHASH); addtolist(udp_port_types,2552,"call-logging",UDPHASH); addtolist(udp_port_types,2553,"efidiningport",UDPHASH); addtolist(udp_port_types,2554,"vcnet-link-v10",UDPHASH); addtolist(udp_port_types,2555,"compaq-wcp",UDPHASH); addtolist(udp_port_types,2556,"nicetec-nmsvc",UDPHASH); addtolist(udp_port_types,2557,"nicetec-mgmt",UDPHASH); addtolist(udp_port_types,2558,"pclemultimedia",UDPHASH); addtolist(udp_port_types,2559,"lstp",UDPHASH); addtolist(udp_port_types,2560,"labrat",UDPHASH); addtolist(udp_port_types,2561,"mosaixcc",UDPHASH); addtolist(udp_port_types,2562,"delibo",UDPHASH); addtolist(udp_port_types,2563,"cti-redwood",UDPHASH); addtolist(udp_port_types,2565,"coord-svr",UDPHASH); addtolist(udp_port_types,2566,"pcs-pcw",UDPHASH); addtolist(udp_port_types,2567,"clp",UDPHASH); addtolist(udp_port_types,2568,"spamtrap",UDPHASH); addtolist(udp_port_types,2569,"sonuscallsig",UDPHASH); addtolist(udp_port_types,2570,"hs-port",UDPHASH); addtolist(udp_port_types,2571,"cecsvc",UDPHASH); addtolist(udp_port_types,2572,"ibp",UDPHASH); addtolist(udp_port_types,2573,"trustestablish",UDPHASH); addtolist(udp_port_types,2574,"blockade-bpsp",UDPHASH); addtolist(udp_port_types,2575,"hl7",UDPHASH); addtolist(udp_port_types,2576,"tclprodebugger",UDPHASH); addtolist(udp_port_types,2577,"scipticslsrvr",UDPHASH); addtolist(udp_port_types,2578,"rvs-isdn-dcp",UDPHASH); addtolist(udp_port_types,2579,"mpfoncl",UDPHASH); addtolist(udp_port_types,2580,"tributary",UDPHASH); addtolist(udp_port_types,2581,"argis-te",UDPHASH); addtolist(udp_port_types,2582,"argis-ds",UDPHASH); addtolist(udp_port_types,2583,"mon",UDPHASH); addtolist(udp_port_types,2584,"cyaserv",UDPHASH); addtolist(udp_port_types,2585,"netx-server",UDPHASH); addtolist(udp_port_types,2586,"netx-agent",UDPHASH); addtolist(udp_port_types,2587,"masc",UDPHASH); addtolist(udp_port_types,2588,"privilege",UDPHASH); addtolist(udp_port_types,2589,"quartus-tcl",UDPHASH); addtolist(udp_port_types,2590,"idotdist",UDPHASH); addtolist(udp_port_types,2591,"maytagshuffle",UDPHASH); addtolist(udp_port_types,2592,"netrek",UDPHASH); addtolist(udp_port_types,2593,"mns-mail",UDPHASH); addtolist(udp_port_types,2594,"dts",UDPHASH); addtolist(udp_port_types,2595,"worldfusion1",UDPHASH); addtolist(udp_port_types,2596,"worldfusion2",UDPHASH); addtolist(udp_port_types,2597,"homesteadglory",UDPHASH); addtolist(udp_port_types,2598,"citriximaclient",UDPHASH); addtolist(udp_port_types,2599,"meridiandata",UDPHASH); addtolist(udp_port_types,2600,"hpstgmgr",UDPHASH); addtolist(udp_port_types,2601,"discp-client",UDPHASH); addtolist(udp_port_types,2602,"discp-server",UDPHASH); addtolist(udp_port_types,2603,"servicemeter",UDPHASH); addtolist(udp_port_types,2604,"nsc-ccs",UDPHASH); addtolist(udp_port_types,2605,"nsc-posa",UDPHASH); addtolist(udp_port_types,2606,"netmon",UDPHASH); addtolist(udp_port_types,2607,"connection",UDPHASH); addtolist(udp_port_types,2608,"wag-service",UDPHASH); addtolist(udp_port_types,2609,"system-monitor",UDPHASH); addtolist(udp_port_types,2610,"versa-tek",UDPHASH); addtolist(udp_port_types,2611,"lionhead",UDPHASH); addtolist(udp_port_types,2612,"qpasa-agent",UDPHASH); addtolist(udp_port_types,2613,"smntubootstrap",UDPHASH); addtolist(udp_port_types,2614,"neveroffline",UDPHASH); addtolist(udp_port_types,2615,"firepower",UDPHASH); addtolist(udp_port_types,2616,"appswitch-emp",UDPHASH); addtolist(udp_port_types,2617,"cmadmin",UDPHASH); addtolist(udp_port_types,2618,"priority-e-com",UDPHASH); addtolist(udp_port_types,2619,"bruce",UDPHASH); addtolist(udp_port_types,2620,"lpsrecommender",UDPHASH); addtolist(udp_port_types,2621,"miles-apart",UDPHASH); addtolist(udp_port_types,2622,"metricadbc",UDPHASH); addtolist(udp_port_types,2623,"lmdp",UDPHASH); addtolist(udp_port_types,2624,"aria",UDPHASH); addtolist(udp_port_types,2625,"blwnkl-port",UDPHASH); addtolist(udp_port_types,2626,"gbjd816",UDPHASH); addtolist(udp_port_types,2627,"moshebeeri",UDPHASH); addtolist(udp_port_types,2628,"dict",UDPHASH); addtolist(udp_port_types,2629,"sitaraserver",UDPHASH); addtolist(udp_port_types,2630,"sitaramgmt",UDPHASH); addtolist(udp_port_types,2631,"sitaradir",UDPHASH); addtolist(udp_port_types,2632,"irdg-post",UDPHASH); addtolist(udp_port_types,2633,"interintelli",UDPHASH); addtolist(udp_port_types,2634,"pk-electronics",UDPHASH); addtolist(udp_port_types,2635,"backburner",UDPHASH); addtolist(udp_port_types,2636,"solve",UDPHASH); addtolist(udp_port_types,2637,"imdocsvc",UDPHASH); addtolist(udp_port_types,2638,"sybaseanywhere",UDPHASH); addtolist(udp_port_types,2639,"aminet",UDPHASH); addtolist(udp_port_types,2640,"sai_sentlm",UDPHASH); addtolist(udp_port_types,2641,"hdl-srv",UDPHASH); addtolist(udp_port_types,2642,"tragic",UDPHASH); addtolist(udp_port_types,2643,"gte-samp",UDPHASH); addtolist(udp_port_types,2644,"travsoft-ipx-t",UDPHASH); addtolist(udp_port_types,2645,"novell-ipx-cmd",UDPHASH); addtolist(udp_port_types,2646,"and-lm",UDPHASH); addtolist(udp_port_types,2647,"syncserver",UDPHASH); addtolist(udp_port_types,2648,"upsnotifyprot",UDPHASH); addtolist(udp_port_types,2649,"vpsipport",UDPHASH); addtolist(udp_port_types,2650,"eristwoguns",UDPHASH); addtolist(udp_port_types,2651,"ebinsite",UDPHASH); addtolist(udp_port_types,2652,"interpathpanel",UDPHASH); addtolist(udp_port_types,2653,"sonus",UDPHASH); addtolist(udp_port_types,2654,"corel_vncadmin",UDPHASH); addtolist(udp_port_types,2655,"unglue",UDPHASH); addtolist(udp_port_types,2656,"kana",UDPHASH); addtolist(udp_port_types,2657,"sns-dispatcher",UDPHASH); addtolist(udp_port_types,2658,"sns-admin",UDPHASH); addtolist(udp_port_types,2659,"sns-query",UDPHASH); addtolist(udp_port_types,2660,"gcmonitor",UDPHASH); addtolist(udp_port_types,2661,"olhost",UDPHASH); addtolist(udp_port_types,2662,"bintec-capi",UDPHASH); addtolist(udp_port_types,2663,"bintec-tapi",UDPHASH); addtolist(udp_port_types,2664,"patrol-mq-gm",UDPHASH); addtolist(udp_port_types,2665,"patrol-mq-nm",UDPHASH); addtolist(udp_port_types,2666,"extensis",UDPHASH); addtolist(udp_port_types,2667,"alarm-clock-s",UDPHASH); addtolist(udp_port_types,2668,"alarm-clock-c",UDPHASH); addtolist(udp_port_types,2669,"toad",UDPHASH); addtolist(udp_port_types,2670,"tve-announce",UDPHASH); addtolist(udp_port_types,2671,"newlixreg",UDPHASH); addtolist(udp_port_types,2672,"nhserver",UDPHASH); addtolist(udp_port_types,2673,"firstcall42",UDPHASH); addtolist(udp_port_types,2674,"ewnn",UDPHASH); addtolist(udp_port_types,2675,"ttc-etap",UDPHASH); addtolist(udp_port_types,2676,"simslink",UDPHASH); addtolist(udp_port_types,2677,"gadgetgate1way",UDPHASH); addtolist(udp_port_types,2678,"gadgetgate2way",UDPHASH); addtolist(udp_port_types,2679,"syncserverssl",UDPHASH); addtolist(udp_port_types,2680,"pxc-sapxom",UDPHASH); addtolist(udp_port_types,2681,"mpnjsomb",UDPHASH); addtolist(udp_port_types,2682,"srsp",UDPHASH); addtolist(udp_port_types,2683,"ncdloadbalance",UDPHASH); addtolist(udp_port_types,2684,"mpnjsosv",UDPHASH); addtolist(udp_port_types,2685,"mpnjsocl",UDPHASH); addtolist(udp_port_types,2686,"mpnjsomg",UDPHASH); addtolist(udp_port_types,2687,"pq-lic-mgmt",UDPHASH); addtolist(udp_port_types,2688,"md-cg-http",UDPHASH); addtolist(udp_port_types,2689,"fastlynx",UDPHASH); addtolist(udp_port_types,2690,"hp-nnm-data",UDPHASH); addtolist(udp_port_types,2691,"itinternet",UDPHASH); addtolist(udp_port_types,2692,"admins-lms",UDPHASH); addtolist(udp_port_types,2693,"belarc-http",UDPHASH); addtolist(udp_port_types,2694,"pwrsevent",UDPHASH); addtolist(udp_port_types,2695,"vspread",UDPHASH); addtolist(udp_port_types,2696,"unifyadmin",UDPHASH); addtolist(udp_port_types,2697,"oce-snmp-trap",UDPHASH); addtolist(udp_port_types,2698,"mck-ivpip",UDPHASH); addtolist(udp_port_types,2699,"csoft-plusclnt",UDPHASH); addtolist(udp_port_types,2700,"tqdata",UDPHASH); addtolist(udp_port_types,2701,"sms-rcinfo",UDPHASH); addtolist(udp_port_types,2702,"sms-xfer",UDPHASH); addtolist(udp_port_types,2703,"sms-chat",UDPHASH); addtolist(udp_port_types,2704,"sms-remctrl",UDPHASH); addtolist(udp_port_types,2705,"sds-admin",UDPHASH); addtolist(udp_port_types,2706,"ncdmirroring",UDPHASH); addtolist(udp_port_types,2707,"emcsymapiport",UDPHASH); addtolist(udp_port_types,2708,"banyan-net",UDPHASH); addtolist(udp_port_types,2709,"supermon",UDPHASH); addtolist(udp_port_types,2710,"sso-service",UDPHASH); addtolist(udp_port_types,2711,"sso-control",UDPHASH); addtolist(udp_port_types,2712,"aocp",UDPHASH); addtolist(udp_port_types,2713,"raven1",UDPHASH); addtolist(udp_port_types,2715,"hpstgmgr2",UDPHASH); addtolist(udp_port_types,2716,"inova-ip-disco",UDPHASH); addtolist(udp_port_types,2717,"pn-requester",UDPHASH); addtolist(udp_port_types,2718,"pn-requester2",UDPHASH); addtolist(udp_port_types,2719,"scan-change",UDPHASH); addtolist(udp_port_types,2720,"wkars",UDPHASH); addtolist(udp_port_types,2721,"smart-diagnose",UDPHASH); addtolist(udp_port_types,2722,"proactivesrvr",UDPHASH); addtolist(udp_port_types,2723,"watchdognt",UDPHASH); addtolist(udp_port_types,2724,"qotps",UDPHASH); addtolist(udp_port_types,2725,"msolap-ptp2",UDPHASH); addtolist(udp_port_types,2726,"tams",UDPHASH); addtolist(udp_port_types,2727,"mgcp-callagent",UDPHASH); addtolist(udp_port_types,2728,"sqdr",UDPHASH); addtolist(udp_port_types,2729,"tcim-control",UDPHASH); addtolist(udp_port_types,2730,"nec-raidplus",UDPHASH); addtolist(udp_port_types,2731,"netdragon-msngr",UDPHASH); addtolist(udp_port_types,2732,"g5m",UDPHASH); addtolist(udp_port_types,2733,"signet-ctf",UDPHASH); addtolist(udp_port_types,2734,"ccs-software",UDPHASH); addtolist(udp_port_types,2735,"netiq-mc",UDPHASH); addtolist(udp_port_types,2736,"radwiz-nms-srv",UDPHASH); addtolist(udp_port_types,2737,"srp-feedback",UDPHASH); addtolist(udp_port_types,2738,"ndl-tcp-ois-gw",UDPHASH); addtolist(udp_port_types,2739,"tn-timing",UDPHASH); addtolist(udp_port_types,2740,"alarm",UDPHASH); addtolist(udp_port_types,2741,"tsb",UDPHASH); addtolist(udp_port_types,2742,"tsb2",UDPHASH); addtolist(udp_port_types,2743,"murx",UDPHASH); addtolist(udp_port_types,2744,"honyaku",UDPHASH); addtolist(udp_port_types,2745,"urbisnet",UDPHASH); addtolist(udp_port_types,2746,"cpudpencap",UDPHASH); addtolist(udp_port_types,2747,"fjippol-swrly",UDPHASH); addtolist(udp_port_types,2748,"fjippol-polsvr",UDPHASH); addtolist(udp_port_types,2749,"fjippol-cnsl",UDPHASH); addtolist(udp_port_types,2750,"fjippol-port1",UDPHASH); addtolist(udp_port_types,2751,"fjippol-port2",UDPHASH); addtolist(udp_port_types,2752,"rsisysaccess",UDPHASH); addtolist(udp_port_types,2753,"de-spot",UDPHASH); addtolist(udp_port_types,2754,"apollo-cc",UDPHASH); addtolist(udp_port_types,2755,"expresspay",UDPHASH); addtolist(udp_port_types,2756,"simplement-tie",UDPHASH); addtolist(udp_port_types,2757,"cnrp",UDPHASH); addtolist(udp_port_types,2758,"apollo-status",UDPHASH); addtolist(udp_port_types,2759,"apollo-gms",UDPHASH); addtolist(udp_port_types,2760,"sabams",UDPHASH); addtolist(udp_port_types,2761,"dicom-iscl",UDPHASH); addtolist(udp_port_types,2762,"dicom-tls",UDPHASH); addtolist(udp_port_types,2763,"desktop-dna",UDPHASH); addtolist(udp_port_types,2764,"data-insurance",UDPHASH); addtolist(udp_port_types,2765,"qip-audup",UDPHASH); addtolist(udp_port_types,2766,"compaq-scp",UDPHASH); addtolist(udp_port_types,2767,"uadtc",UDPHASH); addtolist(udp_port_types,2768,"uacs",UDPHASH); addtolist(udp_port_types,2769,"singlept-mvs",UDPHASH); addtolist(udp_port_types,2770,"veronica",UDPHASH); addtolist(udp_port_types,2771,"vergencecm",UDPHASH); addtolist(udp_port_types,2772,"auris",UDPHASH); addtolist(udp_port_types,2773,"pcbakcup1",UDPHASH); addtolist(udp_port_types,2774,"pcbakcup2",UDPHASH); addtolist(udp_port_types,2775,"smpp",UDPHASH); addtolist(udp_port_types,2776,"ridgeway1",UDPHASH); addtolist(udp_port_types,2777,"ridgeway2",UDPHASH); addtolist(udp_port_types,2778,"gwen-sonya",UDPHASH); addtolist(udp_port_types,2779,"lbc-sync",UDPHASH); addtolist(udp_port_types,2780,"lbc-control",UDPHASH); addtolist(udp_port_types,2781,"whosells",UDPHASH); addtolist(udp_port_types,2782,"everydayrc",UDPHASH); addtolist(udp_port_types,2783,"aises",UDPHASH); addtolist(udp_port_types,2784,"www-dev",UDPHASH); addtolist(udp_port_types,2785,"aic-np",UDPHASH); addtolist(udp_port_types,2786,"aic-oncrpc",UDPHASH); addtolist(udp_port_types,2787,"piccolo",UDPHASH); addtolist(udp_port_types,2788,"fryeserv",UDPHASH); addtolist(udp_port_types,2789,"media-agent",UDPHASH); addtolist(udp_port_types,2790,"plgproxy",UDPHASH); addtolist(udp_port_types,2791,"mtport-regist",UDPHASH); addtolist(udp_port_types,2792,"f5-globalsite",UDPHASH); addtolist(udp_port_types,2793,"initlsmsad",UDPHASH); addtolist(udp_port_types,2794,"aaftp",UDPHASH); addtolist(udp_port_types,2795,"livestats",UDPHASH); addtolist(udp_port_types,2796,"ac-tech",UDPHASH); addtolist(udp_port_types,2797,"esp-encap",UDPHASH); addtolist(udp_port_types,2798,"tmesis-upshot",UDPHASH); addtolist(udp_port_types,2799,"icon-discover",UDPHASH); addtolist(udp_port_types,2800,"acc-raid",UDPHASH); addtolist(udp_port_types,2801,"igcp",UDPHASH); addtolist(udp_port_types,2802,"veritas-udp1",UDPHASH); addtolist(udp_port_types,2803,"btprjctrl",UDPHASH); addtolist(udp_port_types,2804,"telexis-vtu",UDPHASH); addtolist(udp_port_types,2805,"wta-wsp-s",UDPHASH); addtolist(udp_port_types,2806,"cspuni",UDPHASH); addtolist(udp_port_types,2807,"cspmulti",UDPHASH); addtolist(udp_port_types,2808,"j-lan-p",UDPHASH); addtolist(udp_port_types,2809,"corbaloc",UDPHASH); addtolist(udp_port_types,2810,"netsteward",UDPHASH); addtolist(udp_port_types,2811,"gsiftp",UDPHASH); addtolist(udp_port_types,2812,"atmtcp",UDPHASH); addtolist(udp_port_types,2813,"llm-pass",UDPHASH); addtolist(udp_port_types,2814,"llm-csv",UDPHASH); addtolist(udp_port_types,2815,"lbc-measure",UDPHASH); addtolist(udp_port_types,2816,"lbc-watchdog",UDPHASH); addtolist(udp_port_types,2817,"nmsigport",UDPHASH); addtolist(udp_port_types,2818,"rmlnk",UDPHASH); addtolist(udp_port_types,2819,"fc-faultnotify",UDPHASH); addtolist(udp_port_types,2820,"univision",UDPHASH); addtolist(udp_port_types,2821,"vml-dms",UDPHASH); addtolist(udp_port_types,2822,"ka0wuc",UDPHASH); addtolist(udp_port_types,2823,"cqg-netlan",UDPHASH); addtolist(udp_port_types,2826,"slc-systemlog",UDPHASH); addtolist(udp_port_types,2827,"slc-ctrlrloops",UDPHASH); addtolist(udp_port_types,2828,"itm-lm",UDPHASH); addtolist(udp_port_types,2829,"silkp1",UDPHASH); addtolist(udp_port_types,2830,"silkp2",UDPHASH); addtolist(udp_port_types,2831,"silkp3",UDPHASH); addtolist(udp_port_types,2832,"silkp4",UDPHASH); addtolist(udp_port_types,2833,"glishd",UDPHASH); addtolist(udp_port_types,2834,"evtp",UDPHASH); addtolist(udp_port_types,2835,"evtp-data",UDPHASH); addtolist(udp_port_types,2836,"catalyst",UDPHASH); addtolist(udp_port_types,2837,"repliweb",UDPHASH); addtolist(udp_port_types,2838,"starbot",UDPHASH); addtolist(udp_port_types,2839,"nmsigport",UDPHASH); addtolist(udp_port_types,2840,"l3-exprt",UDPHASH); addtolist(udp_port_types,2841,"l3-ranger",UDPHASH); addtolist(udp_port_types,2842,"l3-hawk",UDPHASH); addtolist(udp_port_types,2843,"pdnet",UDPHASH); addtolist(udp_port_types,2844,"bpcp-poll",UDPHASH); addtolist(udp_port_types,2845,"bpcp-trap",UDPHASH); addtolist(udp_port_types,2846,"aimpp-hello",UDPHASH); addtolist(udp_port_types,2847,"aimpp-port-req",UDPHASH); addtolist(udp_port_types,2848,"amt-blc-port",UDPHASH); addtolist(udp_port_types,2849,"fxp",UDPHASH); addtolist(udp_port_types,2850,"metaconsole",UDPHASH); addtolist(udp_port_types,2851,"webemshttp",UDPHASH); addtolist(udp_port_types,2852,"bears-01",UDPHASH); addtolist(udp_port_types,2853,"ispipes",UDPHASH); addtolist(udp_port_types,2854,"infomover",UDPHASH); addtolist(udp_port_types,2856,"cesdinv",UDPHASH); addtolist(udp_port_types,2857,"simctlp",UDPHASH); addtolist(udp_port_types,2858,"ecnp",UDPHASH); addtolist(udp_port_types,2859,"activememory",UDPHASH); addtolist(udp_port_types,2860,"dialpad-voice1",UDPHASH); addtolist(udp_port_types,2861,"dialpad-voice2",UDPHASH); addtolist(udp_port_types,2862,"ttg-protocol",UDPHASH); addtolist(udp_port_types,2863,"sonardata",UDPHASH); addtolist(udp_port_types,2864,"astromed-main",UDPHASH); addtolist(udp_port_types,2865,"pit-vpn",UDPHASH); addtolist(udp_port_types,2866,"lwlistener",UDPHASH); addtolist(udp_port_types,2867,"esps-portal",UDPHASH); addtolist(udp_port_types,2868,"npep-messaging",UDPHASH); addtolist(udp_port_types,2869,"icslap",UDPHASH); addtolist(udp_port_types,2870,"daishi",UDPHASH); addtolist(udp_port_types,2871,"msi-selectplay",UDPHASH); addtolist(udp_port_types,2872,"contract",UDPHASH); addtolist(udp_port_types,2873,"paspar2-zoomin",UDPHASH); addtolist(udp_port_types,2874,"dxmessagebase1",UDPHASH); addtolist(udp_port_types,2875,"dxmessagebase2",UDPHASH); addtolist(udp_port_types,2876,"sps-tunnel",UDPHASH); addtolist(udp_port_types,2877,"bluelance",UDPHASH); addtolist(udp_port_types,2878,"aap",UDPHASH); addtolist(udp_port_types,2879,"ucentric-ds",UDPHASH); addtolist(udp_port_types,2880,"synapse",UDPHASH); addtolist(udp_port_types,2881,"ndsp",UDPHASH); addtolist(udp_port_types,2882,"ndtp",UDPHASH); addtolist(udp_port_types,2883,"ndnp",UDPHASH); addtolist(udp_port_types,2884,"flashmsg",UDPHASH); addtolist(udp_port_types,2885,"topflow",UDPHASH); addtolist(udp_port_types,2886,"responselogic",UDPHASH); addtolist(udp_port_types,2887,"aironetddp",UDPHASH); addtolist(udp_port_types,2888,"spcsdlobby",UDPHASH); addtolist(udp_port_types,2889,"rsom",UDPHASH); addtolist(udp_port_types,2890,"cspclmulti",UDPHASH); addtolist(udp_port_types,2891,"cinegrfx-elmd",UDPHASH); addtolist(udp_port_types,2892,"snifferdata",UDPHASH); addtolist(udp_port_types,2893,"vseconnector",UDPHASH); addtolist(udp_port_types,2894,"abacus-remote",UDPHASH); addtolist(udp_port_types,2895,"natuslink",UDPHASH); addtolist(udp_port_types,2896,"ecovisiong6-1",UDPHASH); addtolist(udp_port_types,2897,"citrix-rtmp",UDPHASH); addtolist(udp_port_types,2898,"appliance-cfg",UDPHASH); addtolist(udp_port_types,2899,"powergemplus",UDPHASH); addtolist(udp_port_types,2900,"quicksuite",UDPHASH); addtolist(udp_port_types,2901,"allstorcns",UDPHASH); addtolist(udp_port_types,2902,"netaspi",UDPHASH); addtolist(udp_port_types,2903,"suitcase",UDPHASH); addtolist(udp_port_types,2904,"m2ua",UDPHASH); addtolist(udp_port_types,2905,"m3ua",UDPHASH); addtolist(udp_port_types,2906,"caller9",UDPHASH); addtolist(udp_port_types,2907,"webmethods-b2b",UDPHASH); addtolist(udp_port_types,2908,"mao",UDPHASH); addtolist(udp_port_types,2909,"funk-dialout",UDPHASH); addtolist(udp_port_types,2910,"tdaccess",UDPHASH); addtolist(udp_port_types,2911,"blockade",UDPHASH); addtolist(udp_port_types,2912,"epicon",UDPHASH); addtolist(udp_port_types,2913,"boosterware",UDPHASH); addtolist(udp_port_types,2914,"gamelobby",UDPHASH); addtolist(udp_port_types,2915,"tksocket",UDPHASH); addtolist(udp_port_types,2916,"elvin_server",UDPHASH); addtolist(udp_port_types,2917,"elvin_client",UDPHASH); addtolist(udp_port_types,2918,"kastenchasepad",UDPHASH); addtolist(udp_port_types,2919,"roboer",UDPHASH); addtolist(udp_port_types,2920,"roboeda",UDPHASH); addtolist(udp_port_types,2921,"cesdcdman",UDPHASH); addtolist(udp_port_types,2922,"cesdcdtrn",UDPHASH); addtolist(udp_port_types,2923,"wta-wsp-wtp-s",UDPHASH); addtolist(udp_port_types,2924,"precise-vip",UDPHASH); addtolist(udp_port_types,2926,"mobile-file-dl",UDPHASH); addtolist(udp_port_types,2927,"unimobilectrl",UDPHASH); addtolist(udp_port_types,2928,"redstone-cpss",UDPHASH); addtolist(udp_port_types,2929,"panja-webadmin",UDPHASH); addtolist(udp_port_types,2930,"panja-weblinx",UDPHASH); addtolist(udp_port_types,2931,"circle-x",UDPHASH); addtolist(udp_port_types,2932,"incp",UDPHASH); addtolist(udp_port_types,2933,"4-tieropmgw",UDPHASH); addtolist(udp_port_types,2934,"4-tieropmcli",UDPHASH); addtolist(udp_port_types,2935,"qtp",UDPHASH); addtolist(udp_port_types,2936,"otpatch",UDPHASH); addtolist(udp_port_types,2937,"pnaconsult-lm",UDPHASH); addtolist(udp_port_types,2938,"sm-pas-1",UDPHASH); addtolist(udp_port_types,2939,"sm-pas-2",UDPHASH); addtolist(udp_port_types,2940,"sm-pas-3",UDPHASH); addtolist(udp_port_types,2941,"sm-pas-4",UDPHASH); addtolist(udp_port_types,2942,"sm-pas-5",UDPHASH); addtolist(udp_port_types,2943,"ttnrepository",UDPHASH); addtolist(udp_port_types,2944,"megaco-h248",UDPHASH); addtolist(udp_port_types,2945,"h248-binary",UDPHASH); addtolist(udp_port_types,2946,"fjsvmpor",UDPHASH); addtolist(udp_port_types,2947,"gpsd",UDPHASH); addtolist(udp_port_types,2948,"wap-push",UDPHASH); addtolist(udp_port_types,2949,"wap-pushsecure",UDPHASH); addtolist(udp_port_types,2950,"esip",UDPHASH); addtolist(udp_port_types,2951,"ottp",UDPHASH); addtolist(udp_port_types,2952,"mpfwsas",UDPHASH); addtolist(udp_port_types,2953,"ovalarmsrv",UDPHASH); addtolist(udp_port_types,2954,"ovalarmsrv-cmd",UDPHASH); addtolist(udp_port_types,2955,"csnotify",UDPHASH); addtolist(udp_port_types,2956,"ovrimosdbman",UDPHASH); addtolist(udp_port_types,2957,"jmact5",UDPHASH); addtolist(udp_port_types,2958,"jmact6",UDPHASH); addtolist(udp_port_types,2959,"rmopagt",UDPHASH); addtolist(udp_port_types,2960,"dfoxserver",UDPHASH); addtolist(udp_port_types,2961,"boldsoft-lm",UDPHASH); addtolist(udp_port_types,2962,"iph-policy-cli",UDPHASH); addtolist(udp_port_types,2963,"iph-policy-adm",UDPHASH); addtolist(udp_port_types,2964,"bullant-srap",UDPHASH); addtolist(udp_port_types,2965,"bullant-rap",UDPHASH); addtolist(udp_port_types,2966,"idp-infotrieve",UDPHASH); addtolist(udp_port_types,2967,"ssc-agent",UDPHASH); addtolist(udp_port_types,2968,"enpp",UDPHASH); addtolist(udp_port_types,2969,"essp",UDPHASH); addtolist(udp_port_types,2970,"index-net",UDPHASH); addtolist(udp_port_types,2971,"netclip",UDPHASH); addtolist(udp_port_types,2972,"pmsm-webrctl",UDPHASH); addtolist(udp_port_types,2973,"svnetworks",UDPHASH); addtolist(udp_port_types,2974,"signal",UDPHASH); addtolist(udp_port_types,2975,"fjmpcm",UDPHASH); addtolist(udp_port_types,2976,"cns-srv-port",UDPHASH); addtolist(udp_port_types,2977,"ttc-etap-ns",UDPHASH); addtolist(udp_port_types,2978,"ttc-etap-ds",UDPHASH); addtolist(udp_port_types,2979,"h263-video",UDPHASH); addtolist(udp_port_types,2980,"wimd",UDPHASH); addtolist(udp_port_types,2981,"mylxamport",UDPHASH); addtolist(udp_port_types,2982,"iwb-whiteboard",UDPHASH); addtolist(udp_port_types,2983,"netplan",UDPHASH); addtolist(udp_port_types,2984,"hpidsadmin",UDPHASH); addtolist(udp_port_types,2985,"hpidsagnet",UDPHASH); addtolist(udp_port_types,2986,"stonefalls",UDPHASH); addtolist(udp_port_types,2987,"identify",UDPHASH); addtolist(udp_port_types,2988,"classify",UDPHASH); addtolist(udp_port_types,2989,"zarkov",UDPHASH); addtolist(udp_port_types,2990,"boscap",UDPHASH); addtolist(udp_port_types,2991,"wkstn-mon",UDPHASH); addtolist(udp_port_types,2992,"itb301",UDPHASH); addtolist(udp_port_types,2993,"veritas-vis1",UDPHASH); addtolist(udp_port_types,2994,"veritas-vis2",UDPHASH); addtolist(udp_port_types,2995,"idrs",UDPHASH); addtolist(udp_port_types,2996,"vsixml",UDPHASH); addtolist(udp_port_types,2997,"rebol",UDPHASH); addtolist(udp_port_types,2998,"realsecure",UDPHASH); addtolist(udp_port_types,2999,"remoteware-un",UDPHASH); addtolist(udp_port_types,3000,"hbci",UDPHASH); addtolist(udp_port_types,3000,"remoteware-cl",UDPHASH); addtolist(udp_port_types,3001,"redwood-broker",UDPHASH); addtolist(udp_port_types,3002,"exlm-agent",UDPHASH); addtolist(udp_port_types,3002,"remoteware-srv",UDPHASH); addtolist(udp_port_types,3003,"cgms",UDPHASH); addtolist(udp_port_types,3004,"csoftragent",UDPHASH); addtolist(udp_port_types,3005,"geniuslm",UDPHASH); addtolist(udp_port_types,3006,"ii-admin",UDPHASH); addtolist(udp_port_types,3007,"lotusmtap",UDPHASH); addtolist(udp_port_types,3008,"midnight-tech",UDPHASH); addtolist(udp_port_types,3009,"pxc-ntfy",UDPHASH); addtolist(udp_port_types,3010,"ping-pong",UDPHASH); addtolist(udp_port_types,3011,"trusted-web",UDPHASH); addtolist(udp_port_types,3012,"twsdss",UDPHASH); addtolist(udp_port_types,3013,"gilatskysurfer",UDPHASH); addtolist(udp_port_types,3014,"broker_service",UDPHASH); addtolist(udp_port_types,3015,"nati-dstp",UDPHASH); addtolist(udp_port_types,3016,"notify_srvr",UDPHASH); addtolist(udp_port_types,3017,"event_listener",UDPHASH); addtolist(udp_port_types,3018,"srvc_registry",UDPHASH); addtolist(udp_port_types,3019,"resource_mgr",UDPHASH); addtolist(udp_port_types,3020,"cifs",UDPHASH); addtolist(udp_port_types,3021,"agriserver",UDPHASH); addtolist(udp_port_types,3022,"csregagent",UDPHASH); addtolist(udp_port_types,3023,"magicnotes",UDPHASH); addtolist(udp_port_types,3024,"nds_sso",UDPHASH); addtolist(udp_port_types,3025,"arepa-raft",UDPHASH); addtolist(udp_port_types,3026,"agri-gateway",UDPHASH); addtolist(udp_port_types,3027,"LiebDevMgmt_C",UDPHASH); addtolist(udp_port_types,3028,"LiebDevMgmt_DM",UDPHASH); addtolist(udp_port_types,3029,"LiebDevMgmt_A",UDPHASH); addtolist(udp_port_types,3030,"arepa-cas",UDPHASH); addtolist(udp_port_types,3031,"agentvu",UDPHASH); addtolist(udp_port_types,3032,"redwood-chat",UDPHASH); addtolist(udp_port_types,3033,"pdb",UDPHASH); addtolist(udp_port_types,3034,"osmosis-aeea",UDPHASH); addtolist(udp_port_types,3035,"fjsv-gssagt",UDPHASH); addtolist(udp_port_types,3036,"hagel-dump",UDPHASH); addtolist(udp_port_types,3037,"hp-san-mgmt",UDPHASH); addtolist(udp_port_types,3038,"santak-ups",UDPHASH); addtolist(udp_port_types,3039,"cogitate",UDPHASH); addtolist(udp_port_types,3040,"tomato-springs",UDPHASH); addtolist(udp_port_types,3041,"di-traceware",UDPHASH); addtolist(udp_port_types,3042,"journee",UDPHASH); addtolist(udp_port_types,3043,"brp",UDPHASH); addtolist(udp_port_types,3045,"responsenet",UDPHASH); addtolist(udp_port_types,3046,"di-ase",UDPHASH); addtolist(udp_port_types,3047,"hlserver",UDPHASH); addtolist(udp_port_types,3048,"pctrader",UDPHASH); addtolist(udp_port_types,3049,"nsws",UDPHASH); addtolist(udp_port_types,3050,"gds_db",UDPHASH); addtolist(udp_port_types,3051,"galaxy-server",UDPHASH); addtolist(udp_port_types,3052,"apcpcns",UDPHASH); addtolist(udp_port_types,3053,"dsom-server",UDPHASH); addtolist(udp_port_types,3054,"amt-cnf-prot",UDPHASH); addtolist(udp_port_types,3055,"policyserver",UDPHASH); addtolist(udp_port_types,3056,"cdl-server",UDPHASH); addtolist(udp_port_types,3057,"goahead-fldup",UDPHASH); addtolist(udp_port_types,3058,"videobeans",UDPHASH); addtolist(udp_port_types,3060,"interserver",UDPHASH); addtolist(udp_port_types,3061,"cautcpd",UDPHASH); addtolist(udp_port_types,3062,"ncacn-ip-tcp",UDPHASH); addtolist(udp_port_types,3063,"ncadg-ip-udp",UDPHASH); addtolist(udp_port_types,3065,"slinterbase",UDPHASH); addtolist(udp_port_types,3066,"netattachsdmp",UDPHASH); addtolist(udp_port_types,3067,"fjhpjp",UDPHASH); addtolist(udp_port_types,3068,"ls3bcast",UDPHASH); addtolist(udp_port_types,3069,"ls3",UDPHASH); addtolist(udp_port_types,3070,"mgxswitch",UDPHASH); addtolist(udp_port_types,3075,"orbix-locator",UDPHASH); addtolist(udp_port_types,3076,"orbix-config",UDPHASH); addtolist(udp_port_types,3077,"orbix-loc-ssl",UDPHASH); addtolist(udp_port_types,3078,"orbix-cfg-ssl",UDPHASH); addtolist(udp_port_types,3079,"lv-frontpanel",UDPHASH); addtolist(udp_port_types,3080,"stm_pproc",UDPHASH); addtolist(udp_port_types,3081,"tl1-lv",UDPHASH); addtolist(udp_port_types,3082,"tl1-raw",UDPHASH); addtolist(udp_port_types,3083,"tl1-telnet",UDPHASH); addtolist(udp_port_types,3084,"itm-mccs",UDPHASH); addtolist(udp_port_types,3085,"pcihreq",UDPHASH); addtolist(udp_port_types,3086,"jdl-dbkitchen",UDPHASH); addtolist(udp_port_types,3100,"opcon-xps",UDPHASH); addtolist(udp_port_types,3105,"cardbox",UDPHASH); addtolist(udp_port_types,3106,"cardbox-http",UDPHASH); addtolist(udp_port_types,3130,"icpv2",UDPHASH); addtolist(udp_port_types,3131,"netbookmark",UDPHASH); addtolist(udp_port_types,3141,"vmodem",UDPHASH); addtolist(udp_port_types,3142,"rdc-wh-eos",UDPHASH); addtolist(udp_port_types,3143,"seaview",UDPHASH); addtolist(udp_port_types,3144,"tarantella",UDPHASH); addtolist(udp_port_types,3145,"csi-lfap",UDPHASH); addtolist(udp_port_types,3147,"rfio",UDPHASH); addtolist(udp_port_types,3148,"nm-game-admin",UDPHASH); addtolist(udp_port_types,3149,"nm-game-server",UDPHASH); addtolist(udp_port_types,3150,"nm-asses-admin",UDPHASH); addtolist(udp_port_types,3151,"nm-assessor",UDPHASH); addtolist(udp_port_types,3180,"mc-brk-srv",UDPHASH); addtolist(udp_port_types,3181,"bmcpatrolagent",UDPHASH); addtolist(udp_port_types,3182,"bmcpatrolrnvu",UDPHASH); addtolist(udp_port_types,3262,"necp",UDPHASH); addtolist(udp_port_types,3264,"ccmail",UDPHASH); addtolist(udp_port_types,3265,"altav-tunnel",UDPHASH); addtolist(udp_port_types,3266,"ns-cfg-server",UDPHASH); addtolist(udp_port_types,3267,"ibm-dial-out",UDPHASH); addtolist(udp_port_types,3268,"msft-gc",UDPHASH); addtolist(udp_port_types,3269,"msft-gc-ssl",UDPHASH); addtolist(udp_port_types,3270,"verismart",UDPHASH); addtolist(udp_port_types,3271,"csoft-prev",UDPHASH); addtolist(udp_port_types,3272,"user-manager",UDPHASH); addtolist(udp_port_types,3273,"sxmp",UDPHASH); addtolist(udp_port_types,3274,"ordinox-server",UDPHASH); addtolist(udp_port_types,3275,"samd",UDPHASH); addtolist(udp_port_types,3276,"maxim-asics",UDPHASH); addtolist(udp_port_types,3277,"awg-proxy",UDPHASH); addtolist(udp_port_types,3278,"lkcmserver",UDPHASH); addtolist(udp_port_types,3279,"admind",UDPHASH); addtolist(udp_port_types,3280,"vs-server",UDPHASH); addtolist(udp_port_types,3281,"sysopt",UDPHASH); addtolist(udp_port_types,3282,"datusorb",UDPHASH); addtolist(udp_port_types,3283,"net-assistant",UDPHASH); addtolist(udp_port_types,3284,"4talk",UDPHASH); addtolist(udp_port_types,3285,"plato",UDPHASH); addtolist(udp_port_types,3286,"e-net",UDPHASH); addtolist(udp_port_types,3287,"directvdata",UDPHASH); addtolist(udp_port_types,3288,"cops",UDPHASH); addtolist(udp_port_types,3289,"enpc",UDPHASH); addtolist(udp_port_types,3290,"caps-lm",UDPHASH); addtolist(udp_port_types,3291,"sah-lm",UDPHASH); addtolist(udp_port_types,3292,"cart-o-rama",UDPHASH); addtolist(udp_port_types,3293,"fg-fps",UDPHASH); addtolist(udp_port_types,3294,"fg-gip",UDPHASH); addtolist(udp_port_types,3295,"dyniplookup",UDPHASH); addtolist(udp_port_types,3296,"rib-slm",UDPHASH); addtolist(udp_port_types,3297,"cytel-lm",UDPHASH); addtolist(udp_port_types,3298,"transview",UDPHASH); addtolist(udp_port_types,3299,"pdrncs",UDPHASH); addtolist(udp_port_types,3302,"mcs-fastmail",UDPHASH); addtolist(udp_port_types,3303,"opsession-clnt",UDPHASH); addtolist(udp_port_types,3304,"opsession-srvr",UDPHASH); addtolist(udp_port_types,3305,"odette-ftp",UDPHASH); addtolist(udp_port_types,3306,"mysql",UDPHASH); addtolist(udp_port_types,3307,"opsession-prxy",UDPHASH); addtolist(udp_port_types,3308,"tns-server",UDPHASH); addtolist(udp_port_types,3309,"tns-adv",UDPHASH); addtolist(udp_port_types,3310,"dyna-access",UDPHASH); addtolist(udp_port_types,3311,"mcns-tel-ret",UDPHASH); addtolist(udp_port_types,3312,"appman-server",UDPHASH); addtolist(udp_port_types,3313,"uorb",UDPHASH); addtolist(udp_port_types,3314,"uohost",UDPHASH); addtolist(udp_port_types,3315,"cdid",UDPHASH); addtolist(udp_port_types,3316,"aicc-cmi",UDPHASH); addtolist(udp_port_types,3317,"vsaiport",UDPHASH); addtolist(udp_port_types,3318,"ssrip",UDPHASH); addtolist(udp_port_types,3319,"sdt-lmd",UDPHASH); addtolist(udp_port_types,3320,"officelink2000",UDPHASH); addtolist(udp_port_types,3321,"vnsstr",UDPHASH); addtolist(udp_port_types,3326,"sftu",UDPHASH); addtolist(udp_port_types,3327,"bbars",UDPHASH); addtolist(udp_port_types,3328,"egptlm",UDPHASH); addtolist(udp_port_types,3329,"hp-device-disc",UDPHASH); addtolist(udp_port_types,3330,"mcs-calypsoicf",UDPHASH); addtolist(udp_port_types,3331,"mcs-messaging",UDPHASH); addtolist(udp_port_types,3332,"mcs-mailsvr",UDPHASH); addtolist(udp_port_types,3333,"dec-notes",UDPHASH); addtolist(udp_port_types,3334,"directv-web",UDPHASH); addtolist(udp_port_types,3335,"directv-soft",UDPHASH); addtolist(udp_port_types,3336,"directv-tick",UDPHASH); addtolist(udp_port_types,3337,"directv-catlg",UDPHASH); addtolist(udp_port_types,3338,"anet-b",UDPHASH); addtolist(udp_port_types,3339,"anet-l",UDPHASH); addtolist(udp_port_types,3340,"anet-m",UDPHASH); addtolist(udp_port_types,3341,"anet-h",UDPHASH); addtolist(udp_port_types,3342,"webtie",UDPHASH); addtolist(udp_port_types,3343,"ms-cluster-net",UDPHASH); addtolist(udp_port_types,3344,"bnt-manager",UDPHASH); addtolist(udp_port_types,3345,"influence",UDPHASH); addtolist(udp_port_types,3346,"trnsprntproxy",UDPHASH); addtolist(udp_port_types,3347,"phoenix-rpc",UDPHASH); addtolist(udp_port_types,3348,"pangolin-laser",UDPHASH); addtolist(udp_port_types,3349,"chevinservices",UDPHASH); addtolist(udp_port_types,3350,"findviatv",UDPHASH); addtolist(udp_port_types,3351,"btrieve",UDPHASH); addtolist(udp_port_types,3352,"ssql",UDPHASH); addtolist(udp_port_types,3353,"fatpipe",UDPHASH); addtolist(udp_port_types,3354,"suitjd",UDPHASH); addtolist(udp_port_types,3355,"ordinox-dbase",UDPHASH); addtolist(udp_port_types,3356,"upnotifyps",UDPHASH); addtolist(udp_port_types,3357,"adtech-test",UDPHASH); addtolist(udp_port_types,3358,"mpsysrmsvr",UDPHASH); addtolist(udp_port_types,3359,"wg-netforce",UDPHASH); addtolist(udp_port_types,3360,"kv-server",UDPHASH); addtolist(udp_port_types,3361,"kv-agent",UDPHASH); addtolist(udp_port_types,3362,"dj-ilm",UDPHASH); addtolist(udp_port_types,3363,"nati-vi-server",UDPHASH); addtolist(udp_port_types,3364,"creativeserver",UDPHASH); addtolist(udp_port_types,3365,"contentserver",UDPHASH); addtolist(udp_port_types,3366,"creativepartnr",UDPHASH); addtolist(udp_port_types,3372,"tip2",UDPHASH); addtolist(udp_port_types,3373,"lavenir-lm",UDPHASH); addtolist(udp_port_types,3374,"cluster-disc",UDPHASH); addtolist(udp_port_types,3375,"vsnm-agent",UDPHASH); addtolist(udp_port_types,3376,"cdbroker",UDPHASH); addtolist(udp_port_types,3377,"cogsys-lm",UDPHASH); addtolist(udp_port_types,3378,"wsicopy",UDPHASH); addtolist(udp_port_types,3379,"socorfs",UDPHASH); addtolist(udp_port_types,3380,"sns-channels",UDPHASH); addtolist(udp_port_types,3381,"geneous",UDPHASH); addtolist(udp_port_types,3382,"fujitsu-neat",UDPHASH); addtolist(udp_port_types,3383,"esp-lm",UDPHASH); addtolist(udp_port_types,3384,"hp-clic",UDPHASH); addtolist(udp_port_types,3385,"qnxnetman",UDPHASH); addtolist(udp_port_types,3386,"gprs-sig",UDPHASH); addtolist(udp_port_types,3387,"backroomnet",UDPHASH); addtolist(udp_port_types,3388,"cbserver",UDPHASH); addtolist(udp_port_types,3389,"ms-wbt-server",UDPHASH); addtolist(udp_port_types,3390,"dsc",UDPHASH); addtolist(udp_port_types,3391,"savant",UDPHASH); addtolist(udp_port_types,3392,"efi-lm",UDPHASH); addtolist(udp_port_types,3393,"d2k-tapestry1",UDPHASH); addtolist(udp_port_types,3394,"d2k-tapestry2",UDPHASH); addtolist(udp_port_types,3395,"dyna-lm",UDPHASH); addtolist(udp_port_types,3396,"printer_agent",UDPHASH); addtolist(udp_port_types,3397,"cloanto-lm",UDPHASH); addtolist(udp_port_types,3398,"mercantile",UDPHASH); addtolist(udp_port_types,3399,"csms",UDPHASH); addtolist(udp_port_types,3400,"csms2",UDPHASH); addtolist(udp_port_types,3401,"filecast",UDPHASH); addtolist(udp_port_types,3421,"bmap",UDPHASH); addtolist(udp_port_types,3455,"prsvp",UDPHASH); addtolist(udp_port_types,3456,"vat",UDPHASH); addtolist(udp_port_types,3457,"vat-control",UDPHASH); addtolist(udp_port_types,3458,"d3winosfi",UDPHASH); addtolist(udp_port_types,3459,"integral",UDPHASH); addtolist(udp_port_types,3460,"edm-manager",UDPHASH); addtolist(udp_port_types,3461,"edm-stager",UDPHASH); addtolist(udp_port_types,3462,"edm-std-notify",UDPHASH); addtolist(udp_port_types,3463,"edm-adm-notify",UDPHASH); addtolist(udp_port_types,3464,"edm-mgr-sync",UDPHASH); addtolist(udp_port_types,3465,"edm-mgr-cntrl",UDPHASH); addtolist(udp_port_types,3466,"workflow",UDPHASH); addtolist(udp_port_types,3467,"rcst",UDPHASH); addtolist(udp_port_types,3468,"ttcmremotectrl",UDPHASH); addtolist(udp_port_types,3469,"pluribus",UDPHASH); addtolist(udp_port_types,3470,"jt400",UDPHASH); addtolist(udp_port_types,3471,"jt400-ssl",UDPHASH); addtolist(udp_port_types,3535,"ms-la",UDPHASH); addtolist(udp_port_types,3563,"watcomdebug",UDPHASH); addtolist(udp_port_types,3672,"harlequinorb",UDPHASH); addtolist(udp_port_types,3709,"ca-idms",UDPHASH); addtolist(udp_port_types,3802,"vhd",UDPHASH); addtolist(udp_port_types,3845,"v-one-spp",UDPHASH); addtolist(udp_port_types,3862,"giga-pocket",UDPHASH); addtolist(udp_port_types,3875,"pnbscada",UDPHASH); addtolist(udp_port_types,3900,"udt_os",UDPHASH); addtolist(udp_port_types,3984,"mapper-nodemgr",UDPHASH); addtolist(udp_port_types,3985,"mapper-mapethd",UDPHASH); addtolist(udp_port_types,3986,"mapper-ws_ethd",UDPHASH); addtolist(udp_port_types,3987,"centerline",UDPHASH); addtolist(udp_port_types,4000,"terabase",UDPHASH); addtolist(udp_port_types,4001,"newoak",UDPHASH); addtolist(udp_port_types,4002,"pxc-spvr-ft",UDPHASH); addtolist(udp_port_types,4003,"pxc-splr-ft",UDPHASH); addtolist(udp_port_types,4004,"pxc-roid",UDPHASH); addtolist(udp_port_types,4005,"pxc-pin",UDPHASH); addtolist(udp_port_types,4006,"pxc-spvr",UDPHASH); addtolist(udp_port_types,4007,"pxc-splr",UDPHASH); addtolist(udp_port_types,4008,"netcheque",UDPHASH); addtolist(udp_port_types,4009,"chimera-hwm",UDPHASH); addtolist(udp_port_types,4010,"samsung-unidex",UDPHASH); addtolist(udp_port_types,4011,"altserviceboot",UDPHASH); addtolist(udp_port_types,4012,"pda-gate",UDPHASH); addtolist(udp_port_types,4013,"acl-manager",UDPHASH); addtolist(udp_port_types,4014,"taiclock",UDPHASH); addtolist(udp_port_types,4015,"talarian-mcast1",UDPHASH); addtolist(udp_port_types,4016,"talarian-mcast2",UDPHASH); addtolist(udp_port_types,4017,"talarian-mcast3",UDPHASH); addtolist(udp_port_types,4018,"talarian-mcast4",UDPHASH); addtolist(udp_port_types,4019,"talarian-mcast5",UDPHASH); addtolist(udp_port_types,4042,"ldxp",UDPHASH); addtolist(udp_port_types,4096,"bre",UDPHASH); addtolist(udp_port_types,4097,"patrolview",UDPHASH); addtolist(udp_port_types,4098,"drmsfsd",UDPHASH); addtolist(udp_port_types,4099,"dpcp",UDPHASH); addtolist(udp_port_types,4132,"nuts_dem",UDPHASH); addtolist(udp_port_types,4133,"nuts_bootp",UDPHASH); addtolist(udp_port_types,4134,"nifty-hmi",UDPHASH); addtolist(udp_port_types,4141,"oirtgsvc",UDPHASH); addtolist(udp_port_types,4142,"oidocsvc",UDPHASH); addtolist(udp_port_types,4143,"oidsr",UDPHASH); addtolist(udp_port_types,4160,"jini-discovery",UDPHASH); addtolist(udp_port_types,4199,"eims-admin",UDPHASH); addtolist(udp_port_types,4300,"corelccam",UDPHASH); addtolist(udp_port_types,4321,"rwhois",UDPHASH); addtolist(udp_port_types,4343,"unicall",UDPHASH); addtolist(udp_port_types,4344,"vinainstall",UDPHASH); addtolist(udp_port_types,4345,"m4-network-as",UDPHASH); addtolist(udp_port_types,4346,"elanlm",UDPHASH); addtolist(udp_port_types,4347,"lansurveyor",UDPHASH); addtolist(udp_port_types,4348,"itose",UDPHASH); addtolist(udp_port_types,4349,"fsportmap",UDPHASH); addtolist(udp_port_types,4350,"net-device",UDPHASH); addtolist(udp_port_types,4351,"plcy-net-svcs",UDPHASH); addtolist(udp_port_types,4353,"f5-iquery",UDPHASH); addtolist(udp_port_types,4442,"saris",UDPHASH); addtolist(udp_port_types,4443,"pharos",UDPHASH); addtolist(udp_port_types,4444,"krb524",UDPHASH); addtolist(udp_port_types,4444,"nv-video",UDPHASH); addtolist(udp_port_types,4445,"upnotifyp",UDPHASH); addtolist(udp_port_types,4446,"n1-fwp",UDPHASH); addtolist(udp_port_types,4447,"n1-rmgmt",UDPHASH); addtolist(udp_port_types,4448,"asc-slmd",UDPHASH); addtolist(udp_port_types,4449,"privatewire",UDPHASH); addtolist(udp_port_types,4450,"camp",UDPHASH); addtolist(udp_port_types,4451,"ctisystemmsg",UDPHASH); addtolist(udp_port_types,4452,"ctiprogramload",UDPHASH); addtolist(udp_port_types,4453,"nssalertmgr",UDPHASH); addtolist(udp_port_types,4454,"nssagentmgr",UDPHASH); addtolist(udp_port_types,4455,"prchat-user",UDPHASH); addtolist(udp_port_types,4456,"prchat-server",UDPHASH); addtolist(udp_port_types,4457,"prRegister",UDPHASH); addtolist(udp_port_types,4500,"sae-urn",UDPHASH); addtolist(udp_port_types,4501,"urn-x-cdchoice",UDPHASH); addtolist(udp_port_types,4545,"worldscores",UDPHASH); addtolist(udp_port_types,4546,"sf-lm",UDPHASH); addtolist(udp_port_types,4547,"lanner-lm",UDPHASH); addtolist(udp_port_types,4567,"tram",UDPHASH); addtolist(udp_port_types,4568,"bmc-reporting",UDPHASH); addtolist(udp_port_types,4600,"piranha1",UDPHASH); addtolist(udp_port_types,4601,"piranha2",UDPHASH); addtolist(udp_port_types,4672,"rfa",UDPHASH); addtolist(udp_port_types,4800,"iims",UDPHASH); addtolist(udp_port_types,4801,"iwec",UDPHASH); addtolist(udp_port_types,4802,"ilss",UDPHASH); addtolist(udp_port_types,4827,"htcp",UDPHASH); addtolist(udp_port_types,4837,"varadero-0",UDPHASH); addtolist(udp_port_types,4838,"varadero-1",UDPHASH); addtolist(udp_port_types,4839,"varadero-2",UDPHASH); addtolist(udp_port_types,4839,"varadero-2",UDPHASH); addtolist(udp_port_types,4868,"phrelay",UDPHASH); addtolist(udp_port_types,4869,"phrelaydbg",UDPHASH); addtolist(udp_port_types,4885,"abbs",UDPHASH); addtolist(udp_port_types,4983,"att-intercom",UDPHASH); addtolist(udp_port_types,5000,"commplex-main",UDPHASH); addtolist(udp_port_types,5001,"commplex-link",UDPHASH); addtolist(udp_port_types,5002,"rfe",UDPHASH); addtolist(udp_port_types,5003,"fmpro-internal",UDPHASH); addtolist(udp_port_types,5004,"avt-profile-1",UDPHASH); addtolist(udp_port_types,5005,"avt-profile-2",UDPHASH); addtolist(udp_port_types,5006,"wsm-server",UDPHASH); addtolist(udp_port_types,5007,"wsm-server-ssl",UDPHASH); addtolist(udp_port_types,5010,"telelpathstart",UDPHASH); addtolist(udp_port_types,5011,"telelpathattack",UDPHASH); addtolist(udp_port_types,5020,"zenginkyo-1",UDPHASH); addtolist(udp_port_types,5021,"zenginkyo-2",UDPHASH); addtolist(udp_port_types,5042,"asnaacceler8db",UDPHASH); addtolist(udp_port_types,5050,"mmcc",UDPHASH); addtolist(udp_port_types,5051,"ita-agent",UDPHASH); addtolist(udp_port_types,5052,"ita-manager",UDPHASH); addtolist(udp_port_types,5055,"unot",UDPHASH); addtolist(udp_port_types,5056,"intecom-ps1",UDPHASH); addtolist(udp_port_types,5057,"intecom-ps2",UDPHASH); addtolist(udp_port_types,5060,"sip",UDPHASH); addtolist(udp_port_types,5061,"sip-tls",UDPHASH); addtolist(udp_port_types,5066,"stanag-5066",UDPHASH); addtolist(udp_port_types,5069,"i-net-2000-npr",UDPHASH); addtolist(udp_port_types,5071,"powerschool",UDPHASH); addtolist(udp_port_types,5093,"sentinel-lm",UDPHASH); addtolist(udp_port_types,5099,"sentlm-srv2srv",UDPHASH); addtolist(udp_port_types,5145,"rmonitor_secure",UDPHASH); addtolist(udp_port_types,5150,"atmp",UDPHASH); addtolist(udp_port_types,5151,"esri_sde",UDPHASH); addtolist(udp_port_types,5152,"sde-discovery",UDPHASH); addtolist(udp_port_types,5165,"ife_icorp",UDPHASH); addtolist(udp_port_types,5190,"aol",UDPHASH); addtolist(udp_port_types,5191,"aol-1",UDPHASH); addtolist(udp_port_types,5192,"aol-2",UDPHASH); addtolist(udp_port_types,5193,"aol-3",UDPHASH); addtolist(udp_port_types,5200,"targus-getdata",UDPHASH); addtolist(udp_port_types,5201,"targus-getdata1",UDPHASH); addtolist(udp_port_types,5202,"targus-getdata2",UDPHASH); addtolist(udp_port_types,5203,"targus-getdata3",UDPHASH); addtolist(udp_port_types,5236,"padl2sim",UDPHASH); addtolist(udp_port_types,5272,"pk",UDPHASH); addtolist(udp_port_types,5300,"hacl-hb",UDPHASH); addtolist(udp_port_types,5301,"hacl-gs",UDPHASH); addtolist(udp_port_types,5302,"hacl-cfg",UDPHASH); addtolist(udp_port_types,5303,"hacl-probe",UDPHASH); addtolist(udp_port_types,5304,"hacl-local",UDPHASH); addtolist(udp_port_types,5305,"hacl-test",UDPHASH); addtolist(udp_port_types,5306,"sun-mc-grp",UDPHASH); addtolist(udp_port_types,5307,"sco-aip",UDPHASH); addtolist(udp_port_types,5308,"cfengine",UDPHASH); addtolist(udp_port_types,5309,"jprinter",UDPHASH); addtolist(udp_port_types,5310,"outlaws",UDPHASH); addtolist(udp_port_types,5311,"tmlogin",UDPHASH); addtolist(udp_port_types,5314,"opalis-rbt-ipc",UDPHASH); addtolist(udp_port_types,5315,"hacl-poll",UDPHASH); addtolist(udp_port_types,5400,"excerpt",UDPHASH); addtolist(udp_port_types,5401,"excerpts",UDPHASH); addtolist(udp_port_types,5402,"mftp",UDPHASH); addtolist(udp_port_types,5403,"hpoms-ci-lstn",UDPHASH); addtolist(udp_port_types,5404,"hpoms-dps-lstn",UDPHASH); addtolist(udp_port_types,5405,"netsupport",UDPHASH); addtolist(udp_port_types,5406,"systemics-sox",UDPHASH); addtolist(udp_port_types,5407,"foresyte-clear",UDPHASH); addtolist(udp_port_types,5408,"foresyte-sec",UDPHASH); addtolist(udp_port_types,5409,"salient-dtasrv",UDPHASH); addtolist(udp_port_types,5410,"salient-usrmgr",UDPHASH); addtolist(udp_port_types,5411,"actnet",UDPHASH); addtolist(udp_port_types,5412,"continuus",UDPHASH); addtolist(udp_port_types,5413,"wwiotalk",UDPHASH); addtolist(udp_port_types,5414,"statusd",UDPHASH); addtolist(udp_port_types,5415,"ns-server",UDPHASH); addtolist(udp_port_types,5416,"sns-gateway",UDPHASH); addtolist(udp_port_types,5417,"sns-agent",UDPHASH); addtolist(udp_port_types,5418,"mcntp",UDPHASH); addtolist(udp_port_types,5419,"dj-ice",UDPHASH); addtolist(udp_port_types,5420,"cylink-c",UDPHASH); addtolist(udp_port_types,5421,"netsupport2",UDPHASH); addtolist(udp_port_types,5422,"salient-mux",UDPHASH); addtolist(udp_port_types,5423,"virtualuser",UDPHASH); addtolist(udp_port_types,5426,"devbasic",UDPHASH); addtolist(udp_port_types,5427,"sco-peer-tta",UDPHASH); addtolist(udp_port_types,5428,"telaconsole",UDPHASH); addtolist(udp_port_types,5429,"base",UDPHASH); addtolist(udp_port_types,5430,"radec-corp",UDPHASH); addtolist(udp_port_types,5431,"park-agnet",UDPHASH); addtolist(udp_port_types,5435,"dttl",UDPHASH); addtolist(udp_port_types,5454,"apc-tcp-udp-4",UDPHASH); addtolist(udp_port_types,5455,"apc-tcp-udp-5",UDPHASH); addtolist(udp_port_types,5456,"apc-tcp-udp-6",UDPHASH); addtolist(udp_port_types,5461,"silkmeter",UDPHASH); addtolist(udp_port_types,5462,"ttl-publisher",UDPHASH); addtolist(udp_port_types,5465,"netops-broker",UDPHASH); addtolist(udp_port_types,5500,"fcp-addr-srvr1",UDPHASH); addtolist(udp_port_types,5501,"fcp-addr-srvr2",UDPHASH); addtolist(udp_port_types,5502,"fcp-srvr-inst1",UDPHASH); addtolist(udp_port_types,5503,"fcp-srvr-inst2",UDPHASH); addtolist(udp_port_types,5504,"fcp-cics-gw1",UDPHASH); addtolist(udp_port_types,5554,"sgi-esphttp",UDPHASH); addtolist(udp_port_types,5555,"personal-agent",UDPHASH); addtolist(udp_port_types,5566,"udpplus",UDPHASH); addtolist(udp_port_types,5599,"esinstall",UDPHASH); addtolist(udp_port_types,5600,"esmmanager",UDPHASH); addtolist(udp_port_types,5601,"esmagent",UDPHASH); addtolist(udp_port_types,5602,"a1-msc",UDPHASH); addtolist(udp_port_types,5603,"a1-bs",UDPHASH); addtolist(udp_port_types,5604,"a3-sdunode",UDPHASH); addtolist(udp_port_types,5605,"a4-sdunode",UDPHASH); addtolist(udp_port_types,5631,"pcanywheredata",UDPHASH); addtolist(udp_port_types,5632,"pcanywherestat",UDPHASH); addtolist(udp_port_types,5678,"rrac",UDPHASH); addtolist(udp_port_types,5679,"dccm",UDPHASH); addtolist(udp_port_types,5713,"proshareaudio",UDPHASH); addtolist(udp_port_types,5714,"prosharevideo",UDPHASH); addtolist(udp_port_types,5715,"prosharedata",UDPHASH); addtolist(udp_port_types,5716,"prosharerequest",UDPHASH); addtolist(udp_port_types,5717,"prosharenotify",UDPHASH); addtolist(udp_port_types,5729,"openmail",UDPHASH); addtolist(udp_port_types,5741,"ida-discover1",UDPHASH); addtolist(udp_port_types,5742,"ida-discover2",UDPHASH); addtolist(udp_port_types,5745,"fcopy-server",UDPHASH); addtolist(udp_port_types,5746,"fcopys-server",UDPHASH); addtolist(udp_port_types,5755,"openmailg",UDPHASH); addtolist(udp_port_types,5757,"x500ms",UDPHASH); addtolist(udp_port_types,5766,"openmailns",UDPHASH); addtolist(udp_port_types,5767,"s-openmail",UDPHASH); addtolist(udp_port_types,5768,"openmailpxy",UDPHASH); addtolist(udp_port_types,5771,"netagent",UDPHASH); addtolist(udp_port_types,5813,"icmpd",UDPHASH); addtolist(udp_port_types,5859,"wherehoo",UDPHASH); addtolist(udp_port_types,5968,"mppolicy-v5",UDPHASH); addtolist(udp_port_types,5969,"mppolicy-mgr",UDPHASH); addtolist(udp_port_types,5987,"wbem-rmi",UDPHASH); addtolist(udp_port_types,5988,"wbem-http",UDPHASH); addtolist(udp_port_types,5999,"cvsup",UDPHASH); addtolist(udp_port_types,6000,"6000-x11",UDPHASH); addtolist(udp_port_types,6001,"6001-x11",UDPHASH); addtolist(udp_port_types,6002,"6002-x11",UDPHASH); addtolist(udp_port_types,6003,"6003-x11",UDPHASH); addtolist(udp_port_types,6004,"6004-x11",UDPHASH); addtolist(udp_port_types,6005,"6005-x11",UDPHASH); addtolist(udp_port_types,6006,"6006-x11",UDPHASH); addtolist(udp_port_types,6007,"6007-x11",UDPHASH); addtolist(udp_port_types,6008,"6008-x11",UDPHASH); addtolist(udp_port_types,6009,"6009-x11",UDPHASH); addtolist(udp_port_types,6010,"6010-x11",UDPHASH); addtolist(udp_port_types,6011,"6011-x11",UDPHASH); addtolist(udp_port_types,6012,"6012-x11",UDPHASH); addtolist(udp_port_types,6013,"6013-x11",UDPHASH); addtolist(udp_port_types,6014,"6014-x11",UDPHASH); addtolist(udp_port_types,6015,"6015-x11",UDPHASH); addtolist(udp_port_types,6016,"6016-x11",UDPHASH); addtolist(udp_port_types,6017,"6017-x11",UDPHASH); addtolist(udp_port_types,6018,"6018-x11",UDPHASH); addtolist(udp_port_types,6019,"6019-x11",UDPHASH); addtolist(udp_port_types,6020,"6020-x11",UDPHASH); addtolist(udp_port_types,6021,"6021-x11",UDPHASH); addtolist(udp_port_types,6022,"6022-x11",UDPHASH); addtolist(udp_port_types,6023,"6023-x11",UDPHASH); addtolist(udp_port_types,6024,"6024-x11",UDPHASH); addtolist(udp_port_types,6025,"6025-x11",UDPHASH); addtolist(udp_port_types,6026,"6026-x11",UDPHASH); addtolist(udp_port_types,6027,"6027-x11",UDPHASH); addtolist(udp_port_types,6028,"6028-x11",UDPHASH); addtolist(udp_port_types,6029,"6029-x11",UDPHASH); addtolist(udp_port_types,6030,"6030-x11",UDPHASH); addtolist(udp_port_types,6031,"6031-x11",UDPHASH); addtolist(udp_port_types,6032,"6032-x11",UDPHASH); addtolist(udp_port_types,6033,"6033-x11",UDPHASH); addtolist(udp_port_types,6034,"6034-x11",UDPHASH); addtolist(udp_port_types,6035,"6035-x11",UDPHASH); addtolist(udp_port_types,6036,"6036-x11",UDPHASH); addtolist(udp_port_types,6037,"6037-x11",UDPHASH); addtolist(udp_port_types,6038,"6038-x11",UDPHASH); addtolist(udp_port_types,6039,"6039-x11",UDPHASH); addtolist(udp_port_types,6040,"6040-x11",UDPHASH); addtolist(udp_port_types,6041,"6041-x11",UDPHASH); addtolist(udp_port_types,6042,"6042-x11",UDPHASH); addtolist(udp_port_types,6043,"6043-x11",UDPHASH); addtolist(udp_port_types,6044,"6044-x11",UDPHASH); addtolist(udp_port_types,6045,"6045-x11",UDPHASH); addtolist(udp_port_types,6046,"6046-x11",UDPHASH); addtolist(udp_port_types,6047,"6047-x11",UDPHASH); addtolist(udp_port_types,6048,"6048-x11",UDPHASH); addtolist(udp_port_types,6049,"6049-x11",UDPHASH); addtolist(udp_port_types,6050,"6050-x11",UDPHASH); addtolist(udp_port_types,6051,"6051-x11",UDPHASH); addtolist(udp_port_types,6052,"6052-x11",UDPHASH); addtolist(udp_port_types,6053,"6053-x11",UDPHASH); addtolist(udp_port_types,6054,"6054-x11",UDPHASH); addtolist(udp_port_types,6055,"6055-x11",UDPHASH); addtolist(udp_port_types,6056,"6056-x11",UDPHASH); addtolist(udp_port_types,6057,"6057-x11",UDPHASH); addtolist(udp_port_types,6058,"6058-x11",UDPHASH); addtolist(udp_port_types,6059,"6059-x11",UDPHASH); addtolist(udp_port_types,6060,"6060-x11",UDPHASH); addtolist(udp_port_types,6061,"6061-x11",UDPHASH); addtolist(udp_port_types,6062,"6062-x11",UDPHASH); addtolist(udp_port_types,6063,"6063-x11",UDPHASH); addtolist(udp_port_types,6064,"ndl-ahp-svc",UDPHASH); addtolist(udp_port_types,6065,"winpharaoh",UDPHASH); addtolist(udp_port_types,6066,"ewctsp",UDPHASH); addtolist(udp_port_types,6067,"srb",UDPHASH); addtolist(udp_port_types,6068,"gsmp",UDPHASH); addtolist(udp_port_types,6069,"trip",UDPHASH); addtolist(udp_port_types,6070,"messageasap",UDPHASH); addtolist(udp_port_types,6071,"ssdtp",UDPHASH); addtolist(udp_port_types,6072,"diagmose-proc",UDPHASH); addtolist(udp_port_types,6073,"directplay8",UDPHASH); addtolist(udp_port_types,6100,"synchronet-db",UDPHASH); addtolist(udp_port_types,6101,"synchronet-rtc",UDPHASH); addtolist(udp_port_types,6102,"synchronet-upd",UDPHASH); addtolist(udp_port_types,6103,"rets",UDPHASH); addtolist(udp_port_types,6104,"dbdb",UDPHASH); addtolist(udp_port_types,6105,"primaserver",UDPHASH); addtolist(udp_port_types,6106,"mpsserver",UDPHASH); addtolist(udp_port_types,6107,"etc-control",UDPHASH); addtolist(udp_port_types,6108,"sercomm-scadmin",UDPHASH); addtolist(udp_port_types,6109,"globecast-id",UDPHASH); addtolist(udp_port_types,6110,"softcm",UDPHASH); addtolist(udp_port_types,6111,"spc",UDPHASH); addtolist(udp_port_types,6112,"dtspcd",UDPHASH); addtolist(udp_port_types,6123,"backup-express",UDPHASH); addtolist(udp_port_types,6141,"meta-corp",UDPHASH); addtolist(udp_port_types,6142,"aspentec-lm",UDPHASH); addtolist(udp_port_types,6143,"watershed-lm",UDPHASH); addtolist(udp_port_types,6144,"statsci1-lm",UDPHASH); addtolist(udp_port_types,6145,"statsci2-lm",UDPHASH); addtolist(udp_port_types,6146,"lonewolf-lm",UDPHASH); addtolist(udp_port_types,6147,"montage-lm",UDPHASH); addtolist(udp_port_types,6148,"ricardo-lm",UDPHASH); addtolist(udp_port_types,6149,"tal-pod",UDPHASH); addtolist(udp_port_types,6253,"crip",UDPHASH); addtolist(udp_port_types,6300,"bmc-grx",UDPHASH); addtolist(udp_port_types,6321,"emp-server1",UDPHASH); addtolist(udp_port_types,6322,"emp-server2",UDPHASH); addtolist(udp_port_types,6346,"gnutella-svc",UDPHASH); addtolist(udp_port_types,6347,"gnutella-trt",UDPHASH); addtolist(udp_port_types,6389,"clariion-evr01",UDPHASH); addtolist(udp_port_types,6471,"lvision-lm",UDPHASH); addtolist(udp_port_types,6500,"boks",UDPHASH); addtolist(udp_port_types,6501,"boks_servc",UDPHASH); addtolist(udp_port_types,6502,"boks_servm",UDPHASH); addtolist(udp_port_types,6503,"boks_clntd",UDPHASH); addtolist(udp_port_types,6505,"badm_priv",UDPHASH); addtolist(udp_port_types,6506,"badm_pub",UDPHASH); addtolist(udp_port_types,6507,"bdir_priv",UDPHASH); addtolist(udp_port_types,6508,"bdir_pub",UDPHASH); addtolist(udp_port_types,6547,"apc-tcp-udp-1",UDPHASH); addtolist(udp_port_types,6548,"apc-tcp-udp-2",UDPHASH); addtolist(udp_port_types,6549,"apc-tcp-udp-3",UDPHASH); addtolist(udp_port_types,6550,"fg-sysupdate",UDPHASH); addtolist(udp_port_types,6558,"xdsxdm",UDPHASH); addtolist(udp_port_types,6580,"parsec-master",UDPHASH); addtolist(udp_port_types,6581,"parsec-peer",UDPHASH); addtolist(udp_port_types,6582,"parsec-game",UDPHASH); addtolist(udp_port_types,6665,"6665-ircu",UDPHASH); addtolist(udp_port_types,6666,"6666-ircu",UDPHASH); addtolist(udp_port_types,6667,"6667-ircu",UDPHASH); addtolist(udp_port_types,6668,"6668-ircu",UDPHASH); addtolist(udp_port_types,6669,"6669-ircu",UDPHASH); addtolist(udp_port_types,6670,"vocaltec-gold",UDPHASH); addtolist(udp_port_types,6672,"vision_server",UDPHASH); addtolist(udp_port_types,6673,"vision_elmd",UDPHASH); addtolist(udp_port_types,6701,"kti-icad-srvr",UDPHASH); addtolist(udp_port_types,6714,"ibprotocol",UDPHASH); addtolist(udp_port_types,6767,"bmc-perf-agent",UDPHASH); addtolist(udp_port_types,6768,"bmc-perf-mgrd",UDPHASH); addtolist(udp_port_types,6790,"hnmp",UDPHASH); addtolist(udp_port_types,6831,"ambit-lm",UDPHASH); addtolist(udp_port_types,6841,"netmo-default",UDPHASH); addtolist(udp_port_types,6842,"netmo-http",UDPHASH); addtolist(udp_port_types,6850,"iccrushmore",UDPHASH); addtolist(udp_port_types,6888,"muse",UDPHASH); addtolist(udp_port_types,6961,"jmact3",UDPHASH); addtolist(udp_port_types,6962,"jmevt2",UDPHASH); addtolist(udp_port_types,6963,"swismgr1",UDPHASH); addtolist(udp_port_types,6964,"swismgr2",UDPHASH); addtolist(udp_port_types,6965,"swistrap",UDPHASH); addtolist(udp_port_types,6966,"swispol",UDPHASH); addtolist(udp_port_types,6969,"acmsoda",UDPHASH); addtolist(udp_port_types,6998,"iatp-highpri",UDPHASH); addtolist(udp_port_types,6999,"iatp-normalpri",UDPHASH); addtolist(udp_port_types,7000,"afs3-fileserver",UDPHASH); addtolist(udp_port_types,7001,"afs3-callback",UDPHASH); addtolist(udp_port_types,7002,"afs3-prserver",UDPHASH); addtolist(udp_port_types,7003,"afs3-vlserver",UDPHASH); addtolist(udp_port_types,7004,"afs3-kaserver",UDPHASH); addtolist(udp_port_types,7005,"afs3-volser",UDPHASH); addtolist(udp_port_types,7006,"afs3-errors",UDPHASH); addtolist(udp_port_types,7007,"afs3-bos",UDPHASH); addtolist(udp_port_types,7008,"afs3-update",UDPHASH); addtolist(udp_port_types,7009,"afs3-rmtsys",UDPHASH); addtolist(udp_port_types,7010,"ups-onlinet",UDPHASH); addtolist(udp_port_types,7011,"talon-disc",UDPHASH); addtolist(udp_port_types,7012,"talon-engine",UDPHASH); addtolist(udp_port_types,7013,"microtalon-dis",UDPHASH); addtolist(udp_port_types,7014,"microtalon-com",UDPHASH); addtolist(udp_port_types,7015,"talon-webserver",UDPHASH); addtolist(udp_port_types,7020,"dpserve",UDPHASH); addtolist(udp_port_types,7021,"dpserveadmin",UDPHASH); addtolist(udp_port_types,7070,"arcp",UDPHASH); addtolist(udp_port_types,7099,"lazy-ptop",UDPHASH); addtolist(udp_port_types,7100,"font-service",UDPHASH); addtolist(udp_port_types,7121,"virprot-lm",UDPHASH); addtolist(udp_port_types,7174,"clutild",UDPHASH); addtolist(udp_port_types,7200,"fodms",UDPHASH); addtolist(udp_port_types,7201,"dlip",UDPHASH); addtolist(udp_port_types,7280,"itactionserver1",UDPHASH); addtolist(udp_port_types,7281,"itactionserver2",UDPHASH); addtolist(udp_port_types,7391,"mindfilesys",UDPHASH); addtolist(udp_port_types,7392,"mrssrendezvous",UDPHASH); addtolist(udp_port_types,7395,"winqedit",UDPHASH); addtolist(udp_port_types,7426,"pmdmgr",UDPHASH); addtolist(udp_port_types,7427,"oveadmgr",UDPHASH); addtolist(udp_port_types,7428,"ovladmgr",UDPHASH); addtolist(udp_port_types,7429,"opi-sock",UDPHASH); addtolist(udp_port_types,7430,"xmpv7",UDPHASH); addtolist(udp_port_types,7431,"pmd",UDPHASH); addtolist(udp_port_types,7437,"faximum",UDPHASH); addtolist(udp_port_types,7491,"telops-lmd",UDPHASH); addtolist(udp_port_types,7511,"pafec-lm",UDPHASH); addtolist(udp_port_types,7544,"nta-ds",UDPHASH); addtolist(udp_port_types,7545,"nta-us",UDPHASH); addtolist(udp_port_types,7566,"vsi-omega",UDPHASH); addtolist(udp_port_types,7570,"aries-kfinder",UDPHASH); addtolist(udp_port_types,7588,"sun-lm",UDPHASH); addtolist(udp_port_types,7633,"pmdfmgt",UDPHASH); addtolist(udp_port_types,7777,"cbt",UDPHASH); addtolist(udp_port_types,7778,"interwise",UDPHASH); addtolist(udp_port_types,7779,"vstat",UDPHASH); addtolist(udp_port_types,7781,"accu-lmgr",UDPHASH); addtolist(udp_port_types,7786,"minivend",UDPHASH); addtolist(udp_port_types,7913,"qo-secure",UDPHASH); addtolist(udp_port_types,7932,"t2-drm",UDPHASH); addtolist(udp_port_types,7933,"t2-brm",UDPHASH); addtolist(udp_port_types,7967,"supercell",UDPHASH); addtolist(udp_port_types,7979,"micromuse-ncps",UDPHASH); addtolist(udp_port_types,7980,"quest-vista",UDPHASH); addtolist(udp_port_types,7999,"irdmi2",UDPHASH); addtolist(udp_port_types,8000,"irdmi",UDPHASH); addtolist(udp_port_types,8001,"vcom-tunnel",UDPHASH); addtolist(udp_port_types,8002,"teradataordbms",UDPHASH); addtolist(udp_port_types,8008,"http-alt",UDPHASH); addtolist(udp_port_types,8022,"oa-system",UDPHASH); addtolist(udp_port_types,8032,"pro-ed",UDPHASH); addtolist(udp_port_types,8033,"mindprint",UDPHASH); addtolist(udp_port_types,8080,"http-alt",UDPHASH); addtolist(udp_port_types,8130,"indigo-vrmi",UDPHASH); addtolist(udp_port_types,8131,"indigo-vbcp",UDPHASH); addtolist(udp_port_types,8132,"dbabble",UDPHASH); addtolist(udp_port_types,8160,"patrol",UDPHASH); addtolist(udp_port_types,8161,"patrol-snmp",UDPHASH); addtolist(udp_port_types,8200,"trivnet1",UDPHASH); addtolist(udp_port_types,8201,"trivnet2",UDPHASH); addtolist(udp_port_types,8204,"lm-perfworks",UDPHASH); addtolist(udp_port_types,8205,"lm-instmgr",UDPHASH); addtolist(udp_port_types,8206,"lm-dta",UDPHASH); addtolist(udp_port_types,8207,"lm-sserver",UDPHASH); addtolist(udp_port_types,8208,"lm-webwatcher",UDPHASH); addtolist(udp_port_types,8351,"server-find",UDPHASH); addtolist(udp_port_types,8376,"cruise-enum",UDPHASH); addtolist(udp_port_types,8377,"cruise-swroute",UDPHASH); addtolist(udp_port_types,8378,"cruise-config",UDPHASH); addtolist(udp_port_types,8379,"cruise-diags",UDPHASH); addtolist(udp_port_types,8380,"cruise-update",UDPHASH); addtolist(udp_port_types,8400,"cvd",UDPHASH); addtolist(udp_port_types,8401,"sabarsd",UDPHASH); addtolist(udp_port_types,8402,"abarsd",UDPHASH); addtolist(udp_port_types,8403,"admind",UDPHASH); addtolist(udp_port_types,8450,"npmp",UDPHASH); addtolist(udp_port_types,8473,"vp2p",UDPHASH); addtolist(udp_port_types,8554,"rtsp-alt",UDPHASH); addtolist(udp_port_types,8733,"ibus",UDPHASH); addtolist(udp_port_types,8763,"mc-appserver",UDPHASH); addtolist(udp_port_types,8764,"openqueue",UDPHASH); addtolist(udp_port_types,8765,"ultraseek-http",UDPHASH); addtolist(udp_port_types,8804,"truecm",UDPHASH); addtolist(udp_port_types,8880,"cddbp-alt",UDPHASH); addtolist(udp_port_types,8888,"ddi-udp-1",UDPHASH); addtolist(udp_port_types,8889,"ddi-udp-2",UDPHASH); addtolist(udp_port_types,8890,"ddi-udp-3",UDPHASH); addtolist(udp_port_types,8891,"ddi-udp-4",UDPHASH); addtolist(udp_port_types,8892,"ddi-udp-5",UDPHASH); addtolist(udp_port_types,8893,"ddi-udp-6",UDPHASH); addtolist(udp_port_types,8894,"ddi-udp-7",UDPHASH); addtolist(udp_port_types,8900,"jmb-cds1",UDPHASH); addtolist(udp_port_types,8901,"jmb-cds2",UDPHASH); addtolist(udp_port_types,9000,"cslistener",UDPHASH); addtolist(udp_port_types,9090,"websm",UDPHASH); addtolist(udp_port_types,9091,"xmltec-xmlmail",UDPHASH); addtolist(udp_port_types,9160,"netlock1",UDPHASH); addtolist(udp_port_types,9161,"netlock2",UDPHASH); addtolist(udp_port_types,9162,"netlock3",UDPHASH); addtolist(udp_port_types,9163,"netlock4",UDPHASH); addtolist(udp_port_types,9164,"netlock5",UDPHASH); addtolist(udp_port_types,9200,"wap-wsp",UDPHASH); addtolist(udp_port_types,9201,"wap-wsp-wtp",UDPHASH); addtolist(udp_port_types,9202,"wap-wsp-s",UDPHASH); addtolist(udp_port_types,9203,"wap-wsp-wtp-s",UDPHASH); addtolist(udp_port_types,9204,"wap-vcard",UDPHASH); addtolist(udp_port_types,9205,"wap-vcal",UDPHASH); addtolist(udp_port_types,9206,"wap-vcard-s",UDPHASH); addtolist(udp_port_types,9207,"wap-vcal-s",UDPHASH); addtolist(udp_port_types,9283,"callwaveiam",UDPHASH); addtolist(udp_port_types,9292,"armtechdaemon",UDPHASH); addtolist(udp_port_types,9321,"guibase",UDPHASH); addtolist(udp_port_types,9343,"mpidcmgr",UDPHASH); addtolist(udp_port_types,9344,"mphlpdmc",UDPHASH); addtolist(udp_port_types,9346,"ctechlicensing",UDPHASH); addtolist(udp_port_types,9374,"fjdmimgr",UDPHASH); addtolist(udp_port_types,9396,"fjinvmgr",UDPHASH); addtolist(udp_port_types,9397,"mpidcagt",UDPHASH); addtolist(udp_port_types,9500,"ismserver",UDPHASH); addtolist(udp_port_types,9535,"mngsuite",UDPHASH); addtolist(udp_port_types,9594,"msgsys",UDPHASH); addtolist(udp_port_types,9595,"pds",UDPHASH); addtolist(udp_port_types,9600,"micromuse-ncpw",UDPHASH); addtolist(udp_port_types,9753,"rasadv",UDPHASH); addtolist(udp_port_types,9876,"sd",UDPHASH); addtolist(udp_port_types,9888,"cyborg-systems",UDPHASH); addtolist(udp_port_types,9898,"monkeycom",UDPHASH); addtolist(udp_port_types,9899,"sctp-tunneling",UDPHASH); addtolist(udp_port_types,9900,"iua",UDPHASH); addtolist(udp_port_types,9909,"domaintime",UDPHASH); addtolist(udp_port_types,9950,"apcpcpluswin1",UDPHASH); addtolist(udp_port_types,9951,"apcpcpluswin2",UDPHASH); addtolist(udp_port_types,9952,"apcpcpluswin3",UDPHASH); addtolist(udp_port_types,9992,"palace-1",UDPHASH); addtolist(udp_port_types,9993,"palace-2",UDPHASH); addtolist(udp_port_types,9994,"palace-3",UDPHASH); addtolist(udp_port_types,9995,"palace-4",UDPHASH); addtolist(udp_port_types,9996,"palace-5",UDPHASH); addtolist(udp_port_types,9997,"palace-6",UDPHASH); addtolist(udp_port_types,9998,"distinct32",UDPHASH); addtolist(udp_port_types,9999,"distinct",UDPHASH); addtolist(udp_port_types,10000,"ndmp",UDPHASH); addtolist(udp_port_types,10007,"mvs-capacity",UDPHASH); addtolist(udp_port_types,10080,"amanda",UDPHASH); addtolist(udp_port_types,10113,"netiq-endpoint",UDPHASH); addtolist(udp_port_types,10114,"netiq-qcheck",UDPHASH); addtolist(udp_port_types,10115,"netiq-endpt",UDPHASH); addtolist(udp_port_types,10128,"bmc-perf-sd",UDPHASH); addtolist(udp_port_types,10288,"blocks",UDPHASH); addtolist(udp_port_types,11000,"irisa",UDPHASH); addtolist(udp_port_types,11001,"metasys",UDPHASH); addtolist(udp_port_types,11111,"vce",UDPHASH); addtolist(udp_port_types,11201,"smsqp",UDPHASH); addtolist(udp_port_types,11319,"imip",UDPHASH); addtolist(udp_port_types,11367,"atm-uhas",UDPHASH); addtolist(udp_port_types,11720,"h323callsigalt",UDPHASH); addtolist(udp_port_types,12000,"entextxid",UDPHASH); addtolist(udp_port_types,12001,"entextnetwk",UDPHASH); addtolist(udp_port_types,12002,"entexthigh",UDPHASH); addtolist(udp_port_types,12003,"entextmed",UDPHASH); addtolist(udp_port_types,12004,"entextlow",UDPHASH); addtolist(udp_port_types,12172,"hivep",UDPHASH); addtolist(udp_port_types,12753,"tsaf",UDPHASH); addtolist(udp_port_types,13160,"i-zipqd",UDPHASH); addtolist(udp_port_types,13223,"powwow-client",UDPHASH); addtolist(udp_port_types,13224,"powwow-server",UDPHASH); addtolist(udp_port_types,13720,"bprd",UDPHASH); addtolist(udp_port_types,13721,"bpbrm",UDPHASH); addtolist(udp_port_types,13722,"bpjava-msvc",UDPHASH); addtolist(udp_port_types,13782,"bpcd",UDPHASH); addtolist(udp_port_types,13783,"vopied",UDPHASH); addtolist(udp_port_types,13818,"dsmcc-config",UDPHASH); addtolist(udp_port_types,13819,"dsmcc-session",UDPHASH); addtolist(udp_port_types,13820,"dsmcc-passthru",UDPHASH); addtolist(udp_port_types,13821,"dsmcc-download",UDPHASH); addtolist(udp_port_types,13822,"dsmcc-ccp",UDPHASH); addtolist(udp_port_types,14001,"itu-sccp-ss7",UDPHASH); addtolist(udp_port_types,14936,"hde-lcesrvr-1",UDPHASH); addtolist(udp_port_types,14937,"hde-lcesrvr-2",UDPHASH); addtolist(udp_port_types,16360,"netserialext1",UDPHASH); addtolist(udp_port_types,16361,"netserialext2",UDPHASH); addtolist(udp_port_types,16367,"netserialext3",UDPHASH); addtolist(udp_port_types,16368,"netserialext4",UDPHASH); addtolist(udp_port_types,16991,"intel-rci-mp",UDPHASH); addtolist(udp_port_types,17007,"isode-dua",UDPHASH); addtolist(udp_port_types,17185,"soundsvirtual",UDPHASH); addtolist(udp_port_types,17219,"chipper",UDPHASH); addtolist(udp_port_types,18000,"biimenu",UDPHASH); addtolist(udp_port_types,18181,"opsec-cvp",UDPHASH); addtolist(udp_port_types,18182,"opsec-ufp",UDPHASH); addtolist(udp_port_types,18183,"opsec-sam",UDPHASH); addtolist(udp_port_types,18184,"opsec-lea",UDPHASH); addtolist(udp_port_types,18185,"opsec-omi",UDPHASH); addtolist(udp_port_types,18187,"opsec-ela",UDPHASH); addtolist(udp_port_types,18463,"ac-cluster",UDPHASH); addtolist(udp_port_types,18888,"apc-necmp",UDPHASH); addtolist(udp_port_types,19191,"opsec-uaa",UDPHASH); addtolist(udp_port_types,19283,"keysrvr",UDPHASH); addtolist(udp_port_types,19315,"keyshadow",UDPHASH); addtolist(udp_port_types,19410,"hp-sco",UDPHASH); addtolist(udp_port_types,19411,"hp-sca",UDPHASH); addtolist(udp_port_types,19412,"hp-sessmon",UDPHASH); addtolist(udp_port_types,19541,"jcp",UDPHASH); addtolist(udp_port_types,20000,"dnp",UDPHASH); addtolist(udp_port_types,20222,"ipulse-ics",UDPHASH); addtolist(udp_port_types,20670,"track",UDPHASH); addtolist(udp_port_types,20999,"athand-mmp",UDPHASH); addtolist(udp_port_types,21590,"vofr-gateway",UDPHASH); addtolist(udp_port_types,21845,"webphone",UDPHASH); addtolist(udp_port_types,21846,"netspeak-is",UDPHASH); addtolist(udp_port_types,21847,"netspeak-cs",UDPHASH); addtolist(udp_port_types,21848,"netspeak-acd",UDPHASH); addtolist(udp_port_types,21849,"netspeak-cps",UDPHASH); addtolist(udp_port_types,22000,"snapenetio",UDPHASH); addtolist(udp_port_types,22001,"optocontrol",UDPHASH); addtolist(udp_port_types,22273,"wnn6",UDPHASH); addtolist(udp_port_types,22555,"vocaltec-phone",UDPHASH); addtolist(udp_port_types,22800,"aws-brf",UDPHASH); addtolist(udp_port_types,22951,"brf-gw",UDPHASH); addtolist(udp_port_types,24000,"med-ltp",UDPHASH); addtolist(udp_port_types,24001,"med-fsp-rx",UDPHASH); addtolist(udp_port_types,24002,"med-fsp-tx",UDPHASH); addtolist(udp_port_types,24003,"med-supp",UDPHASH); addtolist(udp_port_types,24004,"med-ovw",UDPHASH); addtolist(udp_port_types,24005,"med-ci",UDPHASH); addtolist(udp_port_types,24006,"med-net-svc",UDPHASH); addtolist(udp_port_types,24242,"filesphere",UDPHASH); addtolist(udp_port_types,24386,"intel_rci",UDPHASH); addtolist(udp_port_types,24554,"binkp",UDPHASH); addtolist(udp_port_types,24677,"flashfiler",UDPHASH); addtolist(udp_port_types,25000,"icl-twobase1",UDPHASH); addtolist(udp_port_types,25001,"icl-twobase2",UDPHASH); addtolist(udp_port_types,25002,"icl-twobase3",UDPHASH); addtolist(udp_port_types,25003,"icl-twobase4",UDPHASH); addtolist(udp_port_types,25004,"icl-twobase5",UDPHASH); addtolist(udp_port_types,25005,"icl-twobase6",UDPHASH); addtolist(udp_port_types,25006,"icl-twobase7",UDPHASH); addtolist(udp_port_types,25007,"icl-twobase8",UDPHASH); addtolist(udp_port_types,25008,"icl-twobase9",UDPHASH); addtolist(udp_port_types,25009,"icl-twobase10",UDPHASH); addtolist(udp_port_types,25793,"vocaltec-hos",UDPHASH); addtolist(udp_port_types,25901,"niobserver",UDPHASH); addtolist(udp_port_types,25903,"niprobe",UDPHASH); addtolist(udp_port_types,26000,"quake",UDPHASH); addtolist(udp_port_types,26208,"wnn6-ds",UDPHASH); addtolist(udp_port_types,26263,"k3software-cli",UDPHASH); addtolist(udp_port_types,26263,"k3software-cli",UDPHASH); addtolist(udp_port_types,26264,"gserver",UDPHASH); addtolist(udp_port_types,27345,"imagepump",UDPHASH); addtolist(udp_port_types,27999,"tw-auth-key",UDPHASH); addtolist(udp_port_types,32768,"filenet-tms",UDPHASH); addtolist(udp_port_types,32769,"filenet-rpc",UDPHASH); addtolist(udp_port_types,32770,"filenet-nch",UDPHASH); addtolist(udp_port_types,33434,"traceroute",UDPHASH); addtolist(udp_port_types,36865,"kastenxpipe",UDPHASH); addtolist(udp_port_types,40841,"cscp",UDPHASH); addtolist(udp_port_types,43188,"reachout",UDPHASH); addtolist(udp_port_types,43189,"ndm-agent-port",UDPHASH); addtolist(udp_port_types,43190,"ip-provision",UDPHASH); addtolist(udp_port_types,44818,"rockwell-encap",UDPHASH); addtolist(udp_port_types,45054,"invision-ag",UDPHASH); addtolist(udp_port_types,45678,"eba",UDPHASH); addtolist(udp_port_types,45966,"ssr-servermgr",UDPHASH); addtolist(udp_port_types,47557,"dbbrowse",UDPHASH); addtolist(udp_port_types,47624,"directplaysrvr",UDPHASH); addtolist(udp_port_types,47806,"ap",UDPHASH); addtolist(udp_port_types,47808,"bacnet",UDPHASH); addtolist(udp_port_types,48000,"nimcontroller",UDPHASH); addtolist(udp_port_types,48001,"nimspooler",UDPHASH); addtolist(udp_port_types,48002,"nimhub",UDPHASH); addtolist(udp_port_types,48003,"nimgtw",UDPHASH); addtolist(udp_port_types,48556,"com-bardac-dw",UDPHASH); netdiag-1.2/netwatch-1.3.1-2/udp.ports000066400000000000000000000366561323731111400172760ustar00rootroot000000000000000 1 2 3 5 7 9 11 13 17 18 19 20 21 22 23 24 25 27 29 31 33 35 37 38 39 41 42 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 80 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 242 243 244 245 246 247 248 256 257 258 259 260 261 262 263 264 265 266 267 268 280 281 282 283 284 286 287 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 333 344 345 346 347 348 349 350 351 351 352 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 704 705 706 707 709 710 711 729 730 731 741 742 744 747 748 749 750 750 751 752 753 754 758 759 760 761 762 763 764 765 767 769 770 771 772 773 774 775 776 777 780 786 787 800 801 810 828 829 847 873 886 887 888 900 901 902 903 911 989 990 991 992 993 994 995 996 997 998 999 999 1000 1010 1023 1024 1025 1030 1031 1032 1040 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1110 1111 1112 1114 1115 1116 1117 1122 1123 1155 1161 1162 1169 1180 1188 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1776 1777 1778 1779 1780 1781 1782 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1941 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1957 1960 1961 1962 1963 1964 1965 1966 1967 1972 1973 1974 1975 1976 1977 1978 1979 1984 1985 1986 1987 1988 1989 1989 1990 1991 1992 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2030 2032 2033 2034 2035 2038 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2049 2065 2067 2087 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2165 2166 2180 2181 2200 2201 2202 2213 2220 2221 2222 2223 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2250 2255 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2381 2382 2383 2384 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3000 3001 3002 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3060 3061 3062 3063 3065 3066 3067 3068 3069 3070 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3100 3105 3106 3130 3131 3141 3142 3143 3144 3145 3147 3148 3149 3150 3151 3180 3181 3182 3262 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3421 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3535 3563 3672 3709 3802 3845 3862 3875 3900 3984 3985 3986 3987 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4042 4096 4097 4098 4099 4132 4133 4134 4141 4142 4143 4160 4199 4300 4321 4343 4344 4345 4346 4347 4348 4349 4350 4351 4353 4442 4443 4444 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4500 4501 4545 4546 4547 4567 4568 4600 4601 4672 4800 4801 4802 4827 4837 4838 4839 4839 4868 4869 4885 4983 5000 5001 5002 5003 5004 5005 5006 5007 5010 5011 5020 5021 5042 5050 5051 5052 5055 5056 5057 5060 5061 5066 5069 5071 5093 5099 5145 5150 5151 5152 5165 5190 5191 5192 5193 5200 5201 5202 5203 5236 5272 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5314 5315 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5426 5427 5428 5429 5430 5431 5435 5454 5455 5456 5461 5462 5465 5500 5501 5502 5503 5504 5554 5555 5566 5599 5600 5601 5602 5603 5604 5605 5631 5632 5678 5679 5713 5714 5715 5716 5717 5729 5741 5742 5745 5746 5755 5757 5766 5767 5768 5771 5813 5859 5968 5969 5987 5988 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6123 6141 6142 6143 6144 6145 6146 6147 6148 6149 6253 6300 6321 6322 6346 6347 6389 6471 6500 6501 6502 6503 6505 6506 6507 6508 6547 6548 6549 6550 6558 6580 6581 6582 6665 6666 6667 6668 6669 6670 6672 6673 6701 6714 6767 6768 6790 6831 6841 6842 6850 6888 6961 6962 6963 6964 6965 6966 6969 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7020 7021 7070 7099 7100 7121 7174 7200 7201 7280 7281 7391 7392 7395 7426 7427 7428 7429 7430 7431 7437 7491 7511 7544 7545 7566 7570 7588 7633 7777 7778 7779 7781 7786 7913 7932 7933 7967 7979 7980 7999 8000 8001 8002 8008 8022 8032 8033 8080 8130 8131 8132 8160 8161 8200 8201 8204 8205 8206 8207 8208 8351 8376 8377 8378 8379 8380 8400 8401 8402 8403 8450 8473 8554 8733 8763 8764 8765 8804 8880 8888 8889 8890 8891 8892 8893 8894 8900 8901 9000 9090 9091 9160 9161 9162 9163 9164 9200 9201 9202 9203 9204 9205 9206 9207 9283 9292 9321 9343 9344 9346 9374 9396 9397 9500 9535 9594 9595 9600 9753 9876 9888 9898 9899 9900 9909 9950 9951 9952 9992 9993 9994 9995 9996 9997 9998 9999 10000 10007 10080 10113 10114 10115 10128 10288 11000 11001 11111 11201 11319 11367 11720 12000 12001 12002 12003 12004 12172 12753 13160 13223 13224 13720 13721 13722 13782 13783 13818 13819 13820 13821 13822 14001 14936 14937 16360 16361 16367 16368 16991 17007 17185 17219 18000 18181 18182 18183 18184 18185 18187 18463 18888 19191 19283 19315 19410 19411 19412 19541 20000 20222 20670 20999 21590 21845 21846 21847 21848 21849 22000 22001 22273 22555 22800 22951 24000 24001 24002 24003 24004 24005 24006 24242 24386 24554 24677 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25793 25901 25903 26000 26208 26263 26263 26264 27345 27999 32768 32769 32770 33434 36865 40841 43188 43189 43190 44818 45054 45678 45966 47557 47624 47806 47808 48000 48001 48002 48003 48556 netdiag-1.2/netwatch-1.3.1-2/version000066400000000000000000000000051323731111400170000ustar00rootroot000000000000001.0b netdiag-1.2/netwatch-1.3.1-2/warning.c000066400000000000000000000024141323731111400172070ustar00rootroot00000000000000#include #include "netwatch.h" #include #include static FILE *tmpfp; static char tmpname[256]; static char command[256]; static char warnto[256] = { 0 }; extern int mailflag; extern int syslogflag; extern char *version; extern char userwarn[]; void printbuf(FILE *fp, unsigned char *buf) { int i; /* Dump HEader */ for (i=0;i<60;i++) { fprintf(fp," %2X",buf[i]); if (syslogflag) syslog(LOG_ALERT," %2X",buf[i]); if (i && !(i%16)) { fprintf(fp,"\n"); if (syslogflag) syslog(LOG_ALERT,"\n"); } } fprintf(fp,"\n"); if (syslogflag) syslog(LOG_ALERT,"\n"); } void warning(char s[], unsigned char *buf) { time_t dt; dt = time(0); strncpy(tmpname,"~/.nw.warning",256); tmpfp = fopen(tmpname,"w"); if (tmpfp) { fprintf(tmpfp,"******************************************\n"); fprintf(tmpfp,"WARNING MESSAGE from Netwatch %s at %s\n", version,ctime(&dt)); fprintf(tmpfp,"%s\n",s); if (syslogflag) syslog(LOG_ALERT,"%s\n",s); if (buf) { printbuf(tmpfp,buf); } fprintf(tmpfp,"******************************************\n"); fclose(tmpfp); if (!warnto[0]) strncpy(warnto,userwarn,256); if (warnto[0]) { sprintf(command,"mail %s < %s&",warnto,tmpname); system(command); } unlink(tmpname); } } netdiag-1.2/statnet-3.8/000077500000000000000000000000001323731111400147535ustar00rootroot00000000000000netdiag-1.2/statnet-3.8/CHANGES000066400000000000000000000114321323731111400157470ustar00rootroot00000000000000Statnet is protected under the GPL2. Ver 3.8 : Scot E. Wilcoxon, Minnesota, USA (scot@wilcoxon.org) 2002-12-21 - Altered to compile on Red Hat 7.2 ++ Added unistd.h ++ Altered old fcntlbits.h and ioctls.h references to current files. Ver 3.7 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 99/01/12 - Created RPM Ver 3.6 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/12/16 - debugging version; private. Ver 3.5 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/12/16 - Documentation changes. Fixed minor port display problem. Ver 3.4 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/12/15 - debugging version; private. Ver 3.3 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/05/24 - Tested on Red Hat 5 and altered for glibc changes. Ver 3.2 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/05/23 - Fixed statnet client keyboard input (press 'h' for help). - Misusing htonl/ntohl to deal with heterogeneous networks(untested). Ver 3.1 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/03/03 - Added device, server name, and shm key options to statnetd. - Altered Makefile to deal with version numbers. - Only refer to "curses.h" instead of "ncurses.h". Ver 3.0 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 98/02/27 - Split into a data collection (statnetd) and viewer (statnet) process, with shared memory used to publish data from statnetd. This no longer requires superuser privileges for the viewer. This also allows other viewers to be created, such as SNMP agents. - Added DIPC support so data is available on all machines within a DIPC cluster, so data can be viewed by many machines. - Replaced a lot of duplicated counter code with generalized "tally" routines. Most of the overhead of this change is in the viewer, where speed difference is negligible. - Fixed IP fragment recognition. Ver 2.1 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 96/01/02 - Report last error number and number of errors from recvfrom(). - Reorganized display to be more compact (making room for creeping features). - Dynamically show IP protocols and known TCP and UDP ports. - Dynamically show Ethernet protocols. - Added loopback interface statistics. - Only show the active interfaces. - Added a hint of what keys to press when 'h' or unknown key entered. - Added SN_LIST_SWAP as a list swap thrashing limit, to reduce redraw. - Regularly check for read errors and dropped packets on eth0. - Changed subwindow allocation logic, and only reallocate upon redraw. - Tall skinny or short wide screens supported. Ver 2.0 : Scot E. Wilcoxon, Minnesota, USA (sewilco@fieldday.mn.org) 95/11/30 - Fixed a memory leak in curses screens. - Replaced constant byte values into frame buffer with references to system-defined values where known. - Replaced calculation of protocol number with the ntos() standard. - Speed up screen update by only writing labels once. - Release initialization memory after initialization. - Added test for Appletalk protocol number. - Added Appletalk command line option. - Added TCP/IP port statistics. - Added PPP and SLIP to PLIP statistics. - Added dynamic alteration of screen (type options while running). - Changed Kb/sec (kilobits) to KB/sec (kilobytes). - Reduced size of packet buffer (kernel discards the excess). - Added some IEEE 802.2 packet recognition. - Added labels for "Other" packet types and "Other" 802.2 SAPs. - Added symbol in stat.h to specify number of seconds between updates. - Added display of number of frames to Types screen (the number of total frames during the sampled interval, not frames/sec). - Option in itstime.c to show ICMP packets (might show flood pings). - Add Vines protocol packets to Vines_under_IP total. Ver 1.00: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) 95/01/06 - fixed a floating point exception - added a new column in the types window, displaying percentuale use of each frame type. - added some command line options to choose which windows to display. Less windows results in less calculation. - edited config file so that another ethernet device can be specified Ver 0.99: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) - first public version.. more or less stable netdiag-1.2/statnet-3.8/INSTALL000066400000000000000000000022271323731111400160070ustar00rootroot00000000000000 Statnet COMPILATION: - Edit the makefile to meet your needs (nothing much to edit though) - Edit the '#define ETH "eth0"' line in stat.h if you don't want eth0 to be the default ethernet device that statnetd listens to. The device can be changed with a runtime option. - Type "make" INSTALLATION: - Copy statnet and statnetd to the place you want to have them or use "make install". RUNNING: - You need root privileges for statnetd because the program has to set your ethernet card in promiscuous mode. - Start statnetd perhaps with "-d" option to make it run in background. - run statnet to view statistics. DISTRIBUTED USE: - The DIPC Linux kernel modification is supported, which allows the shared memory to be shared between systems. If DIPC is installed, the Statnet shared memory can be shared between member systems. - Intended configuration is one system running the privileged statnetd data gathering daemon, and all other systems have read-only access to the statistics. Original author: Jeroen Baekelandt jeroenb@igwe.vub.ac.be we47143@vub.ac.be Current maintainer: Scot E. Wilcoxon scot@wilcoxon.org netdiag-1.2/statnet-3.8/Makefile000066400000000000000000000054361323731111400164230ustar00rootroot00000000000000SNVERSION= 3.8 UPDATED= 21DEC2002 # You might need to say where the ncurses or curses include files are. CFLAGS=-I/usr/include/ncurses -g # CFLAGS= CC=gcc EXEC= statnet EXECD= statnetd OBJECTS= curs.o getservent.o set_null.o services.o \ stat_delta.o stat_ntoh.c tally_delta.o tally_label.o \ tally_ntoh.c win_show_stat.o OBJECTSD= getservent.o itstime.o set_null.o services.o \ tally_init.o tally.o DOCS= README statnet.lsm statnet.1 LIBS= -lncurses INSTALLDIR=/usr/sbin CFLAGS+= -DSNVERSION=$(SNVERSION) all: $(EXEC) $(EXECD) $(DOCS) statnet: statnet.o $(OBJECTS) Makefile $(CC) -o $(EXEC) $(CFLAGS) statnet.o $(OBJECTS) $(LIBS) statnetd: statnetd.o $(OBJECTSD) Makefile $(CC) -o $(EXECD) $(CFLAGS) statnetd.o $(OBJECTSD) $(LIBS) install: $(EXEC) $(EXECD) chmod a-w $(EXEC) $(EXECD) chmod a+rx $(EXEC) $(EXECD) chown root.root $(EXEC) $(EXECD) mv $(EXEC) $(INSTALLDIR)/$(EXEC) mv $(EXECD) $(INSTALLDIR)/$(EXECD) README: Makefile README.proto m4 --prefix-builtins -D__SNVERSION__=$(SNVERSION) -D__UPDATED__=$(UPDATED) README.proto > README statnet.lsm: Makefile statnet.lsm.proto $(subst VV,$(SNVERSION),statnet-VV.tgz) -rm -f statnet.lsm m4 --prefix-builtins \ -D__SNVERSION__=$(SNVERSION) \ -D__UPDATED__=$(UPDATED) \ -D__TARSIZE__=$(firstword $(shell du -s statnet-*[0-9].tgz) ) \ statnet.lsm.proto > statnet.lsm statnet.1: Makefile statnet.1.proto m4 --prefix-builtins -D__SNVERSION__=$(SNVERSION) -D__UPDATED__=$(UPDATED) statnet.1.proto > statnet.1 shar: shar README CHANGES INSTALL Makefile services *.h *.c *.lsm *.proto >statnet.shar tar: $(subst VV,$(SNVERSION),statnet-VV.tgz) $(subst VV,$(SNVERSION),statnet-VV.tgz): $(EXEC) $(EXECD) README statnet.1 -rm -f statnet*tar.gz statnet*.tgz -tar cvzf $(subst VV,$(SNVERSION),statnet-VV.tgz) $(EXEC) $(EXECD) README CHANGES INSTALL Makefile services *.h *.c *.lsm *.proto -tar cvzf $(subst VV,$(SNVERSION),statnet-VV_src.tgz) README CHANGES INSTALL Makefile services *.h *.c *.lsm *.proto clean: -rm -f *.o $(EXEC) $(EXECD) statnet.shar statnet*.tgz .PHONY: all install shar tar clean curs.o: Makefile curs.c curs.h getservent.o: Makefile getservent.c inetprivate.h itstime.o: Makefile itstime.c stat.h services.o: Makefile services.c stat.h set_null.o: Makefile set_null.c stat.h stat_delta.o: Makefile stat_delta.c stat.h statnet.o: Makefile statnet.c curs.h stat.h statnetd.o: Makefile statnetd.c stat.h tally.o: Makefile tally.c stat.h tally_delta.o: Makefile tally_delta.c stat.h tally_init.o: Makefile tally_init.c stat.h tally_label.o: Makefile tally_label.c stat.h win_show_stat.o: Makefile win_show_stat.c curs.h stat.h rpm: rpm.spec $(DOCS) $(subst VV,$(SNVERSION),statnet-VV.tgz) rpm.spec: Makefile rpm.spec.proto m4 --prefix-builtins -D__SNVERSION__=$(SNVERSION) -D__UPDATED__=$(UPDATED) rpm.spec.proto > rpm.spec netdiag-1.2/statnet-3.8/README000066400000000000000000000064741323731111400156460ustar00rootroot00000000000000Statnet version 3.8 Statnet views the statistics of your Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, and whatever else it notices. It views: - kilobytes per second on Ethernet, PLIP, and other interfaces. - the Ethernet load - frames per second. - how many frames of each type (like IP, ARP and some Appletalk or TCP frames) were seen. The purpose is to give some idea of the quantity and type of network activity (flashing lights on the hub are minimally informative). Other tools are needed for detailed analysis. Tcpdump is a common starting point. Only certain packets were shown in earlier versions. Now the data for the packets encountered on your net are shown. Only certain TCP/UDP ports are known (under port 1024 by default), and TCP/UDP traffic to unknown port numbers is not shown, although the presence of the frames are shown in protocol counts. Starting in version 3, most service names are read from /etc/services or other files. You can define local services or favorite abbreviations outside /etc/services now. Start with rfc1700 to identify unknown services. This tool is used to help an administrator see how the network is being used. Users often don't need this much detail, although many students are administrators-in-training. Administrator's network monitors might detect this tool, so approval by an administrator before using this tool is courteous and prudent. Version 3 introduced a non-privileged viewer which can be safely used by non-administrative users after an administrator starts the statnetd privileged data collection program. Technically, the statnetd daemon is run with superuser privileges so it can access the network interface in promiscuous mode and the resulting data is placed in shared memory. The statnet and statnetd programs are DIPC-enabled, so one machine in a DIPC cluster can gather the data and any user within the cluster can use statnet to view the data. Heterogeneous clients might work (not tested). A network can be instrumented by placing statnetd machines on each segment of the LAN. Telnet or DIPC can presently deliver the data. HTTP, Big Brother, or SPong clients have not been done yet. The "make install" creates an executable which anyone on your system can use. Statnetd puts the interface in promiscuous mode, but the statistics can be transported to other systems, such as through DIPC or telnet, for safe viewing. Some receive errors may happen, depending upon your interface card and hardware/software configuration. See "netstat -i" or "ifconfig" while statnet is not running to find if errors occur while the NIC is not in promiscuous mode. The 3C509 is known to have problems (http://www.3com.com/ Etherlink III FAQ). (These error reports are not present in version 3) And I see this short README has grown as much as the rest. That's it... Original credit: Please mail bugs, your comments, suggestions, dirty pictures and pizza's to jeroenb@igwe.vub.ac.be Current maintainer: Recent bug fixes, comments, suggestions, net hardware and chinese food to scot@wilcoxon.org [ This program is free software; you can redistribute it ] [ and/or modify it under the terms of the GNU General ] [ Public License as published by the Free Software ] [ Foundation; either version 2 of the License, or (at ] [ your option) any later version. ] netdiag-1.2/statnet-3.8/README.proto000066400000000000000000000065061323731111400170040ustar00rootroot00000000000000Statnet version __SNVERSION__ Statnet views the statistics of your Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, and whatever else it notices. It views: - kilobytes per second on Ethernet, PLIP, and other interfaces. - the Ethernet load - frames per second. - how many frames of each type (like IP, ARP and some Appletalk or TCP frames) were seen. The purpose is to give some idea of the quantity and type of network activity (flashing lights on the hub are minimally informative). Other tools are needed for detailed analysis. Tcpdump is a common starting point. Only certain packets were shown in earlier versions. Now the data for the packets encountered on your net are shown. Only certain TCP/UDP ports are known (under port 1024 by default), and TCP/UDP traffic to unknown port numbers is not shown, although the presence of the frames are shown in protocol counts. Starting in version 3, most service names are read from /etc/services or other files. You can define local services or favorite abbreviations outside /etc/services now. Start with rfc1700 to identify unknown services. This tool is used to help an administrator see how the network is being used. Users often don't need this much detail, although many students are administrators-in-training. Administrator's network monitors might detect this tool, so approval by an administrator before using this tool is courteous and prudent. Version 3 introduced a non-privileged viewer which can be safely used by non-administrative users after an administrator starts the statnetd privileged data collection program. Technically, the statnetd daemon is run with superuser privileges so it can access the network interface in promiscuous mode and the resulting data is placed in shared memory. The statnet and statnetd programs are DIPC-enabled, so one machine in a DIPC cluster can gather the data and any user within the cluster can use statnet to view the data. Heterogeneous clients might work (not tested). A network can be instrumented by placing statnetd machines on each segment of the LAN. Telnet or DIPC can presently deliver the data. HTTP, Big Brother, or SPong clients have not been done yet. The "make install" creates an executable which anyone on your system can use. Statnetd puts the interface in promiscuous mode, but the statistics can be transported to other systems, such as through DIPC or telnet, for safe viewing. Some receive errors may happen, depending upon your interface card and hardware/software configuration. See "netstat -i" or "ifconfig" while statnet is not running to find if errors occur while the NIC is not in promiscuous mode. The 3C509 is known to have problems (http://www.3com.com/ Etherlink III FAQ). (These error reports are not present in version 3) And I see this short README has grown as much as the rest. That's it... Original credit: Please mail bugs, your comments, suggestions, dirty pictures and pizza's to jeroenb@igwe.vub.ac.be Current maintainer: Recent bug fixes, comments, suggestions, net hardware and chinese food to scot@wilcoxon.org [ This program is free software; you can redistribute it ] [ and/or modify it under the terms of the GNU General ] [ Public License as published by the Free Software ] [ Foundation; either version 2 of the License, or (at ] [ your option) any later version. ] netdiag-1.2/statnet-3.8/curs.c000066400000000000000000000006331323731111400160750ustar00rootroot00000000000000/* curs.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ #include #include #include "curs.h" void init_curses () { initscr (); #if 0 nodelay (stdscr, TRUE); #endif cbreak (); noecho (); } void cleanup_curses () { endwin (); } void clrscr () { erase (); refresh (); } netdiag-1.2/statnet-3.8/curs.h000066400000000000000000000003771323731111400161070ustar00rootroot00000000000000/* curs.h is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ #include void init_curses (void); void cleanup_curses (void); void clrscr (void); netdiag-1.2/statnet-3.8/getservent.c000066400000000000000000000077041323731111400173150ustar00rootroot00000000000000/* This is from libc/inet. The names of the routines have been altered * to make linking this private version easier, and support for several * other file paths have been stuffed in. Proper solution would be to * allow the system routines to be given pathnames. Oh, and sn_getservent() * was changed to not automatically open the file if not already open. */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include "inetprivate.h" #define MAXALIASES 35 static char SERVDB[] = _PATH_SERVICES; static char STATDB[] = _PATH_STATNET_SERVICES; static char LOCALDB[] = _PATH_LOCAL_SERVICES; static FILE *servf = NULL; static char line[BUFSIZ+1]; static struct servent serv; static char *serv_aliases[MAXALIASES]; int _serv_stayopen; void sn_setservent(f) int f; { if (servf == NULL) { if ( f == 321 ) { servf = fopen(LOCALDB, "r" ); /* Open services file inn current directory when magic number given. */ } else { if ( f == 123 ) servf = fopen(STATDB, "r" ); /* Open Statnet services file when magic number given. */ else servf = fopen(SERVDB, "r" ); } } else { rewind(servf); } _serv_stayopen |= f; } void sn_endservent() { if (servf) { fclose(servf); servf = NULL; } _serv_stayopen = 0; } struct servent * sn_getservent() { char *p; register char *cp, **q; if (servf == NULL ) return (NULL); again: if ((p = fgets(line, BUFSIZ, servf)) == NULL) return (NULL); if (*p == '#') goto again; cp = strpbrk(p, "#\n"); if (cp == NULL) goto again; *cp = '\0'; serv.s_name = p; p = strpbrk(p, " \t"); if (p == NULL) goto again; *p++ = '\0'; while (*p == ' ' || *p == '\t') p++; cp = strpbrk(p, ",/"); if (cp == NULL) goto again; *cp++ = '\0'; serv.s_port = htons((u_short)atoi(p)); serv.s_proto = cp; q = serv.s_aliases = serv_aliases; cp = strpbrk(cp, " \t"); if (cp != NULL) *cp++ = '\0'; while (cp && *cp) { if (*cp == ' ' || *cp == '\t') { cp++; continue; } if (q < &serv_aliases[MAXALIASES - 1]) *q++ = cp; cp = strpbrk(cp, " \t"); if (cp != NULL) *cp++ = '\0'; } *q = NULL; return (&serv); } netdiag-1.2/statnet-3.8/if_getstats.c000066400000000000000000000036031323731111400174350ustar00rootroot00000000000000/* * This is taken from ifconfig.c: * Version: @(#)ifconfig.c 2.30 10/07/93 * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software * Foundation; either version 2 of the License, or (at * your option) any later version. */ #if !(defined(__GLIBC__) && __GLIBC__ >= 2) #include #else + #include #endif #include #include #if !( defined(__GLIBC__) && __GLIBC__ >= 2 ) #include #endif /* Modified to use "struct enet_statistics" instead of "struct interface". */ /* sewilco@fieldday.mn.org 95/12/27 */ /* Modified to use "struct net_device_stats" instead of "struct enet_statistics". */ /* sewilco@fieldday.mn.org 98/07/27 */ #if !(defined(__GLIBC__) && __GLIBC__ >= 2) void if_getstats (char *ifname, struct enet_statistics *stats) #else void if_getstats (char *ifname, struct net_device_stats *stats) #endif { FILE *f = fopen ("/proc/net/dev", "r"); char buf[256]; char *bp; if (f == NULL) return; while (fgets (buf, 255, f)) { bp = buf; while (*bp && isspace (*bp)) bp++; if (strncmp (bp, ifname, strlen (ifname)) == 0 && bp[strlen (ifname)] == ':') { bp = strchr (bp, ':'); bp++; sscanf (bp, "%d %d %d %d %d %d %d %d %d %d %d", &stats->rx_packets, &stats->rx_errors, &stats->rx_dropped, &stats->rx_fifo_errors, &stats->rx_frame_errors, &stats->tx_packets, &stats->tx_errors, &stats->tx_dropped, &stats->tx_fifo_errors, &stats->collisions, &stats->tx_carrier_errors ); fclose (f); return; } } fclose (f); } netdiag-1.2/statnet-3.8/inetprivate.h000066400000000000000000000006341323731111400174610ustar00rootroot00000000000000/* inetprivate.h is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Scot E. Wilcoxon */ /**/ /* Define some relatively private symbols. */ #define _PATH_STATNET_SERVICES "/etc/opt/statnet/services" #define _PATH_LOCAL_SERVICES "services" #include #include #include #include netdiag-1.2/statnet-3.8/interface.c000066400000000000000000000262471323731111400170720ustar00rootroot00000000000000/* Code to manipulate interface information, shared between ifconfig and netstat. 10/1998 partly rewriten by Andi Kleen to support an interface list. I don't claim that the list operations are efficient @). $Id: interface.c,v 1.15 1998/12/01 09:30:06 philip Exp $ */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #if HAVE_AFIPX #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include "ipx.h" #endif #endif #if !defined(_NETECONET_EC_H) && HAVE_AFECONET #include #endif #ifdef HAVE_HWSLIP #include #include #endif #include "net-support.h" #include "pathnames.h" #include "version.h" #include "proc.h" #include "interface.h" #include "sockets.h" #include "util.h" #include "intl.h" int procnetdev_vsn = 1; static struct interface *int_list; void add_interface(struct interface *n) { struct interface *ife, **pp; pp = &int_list; for (ife = int_list; ife; pp = &ife->next, ife = ife->next) { if (nstrcmp(ife->name, n->name) > 0) break; } n->next = (*pp); (*pp) = n; } struct interface *lookup_interface(char *name) { struct interface *ife = NULL; if (int_list || if_readlist() >= 0) { for (ife = int_list; ife; ife = ife->next) { if (!strcmp(ife->name, name)) break; } } if (!ife) { new(ife); safe_strncpy(ife->name, name, IFNAMSIZ); add_interface(ife); } return ife; } int for_all_interfaces(int (*doit) (struct interface *, void *), void *cookie) { struct interface *ife; if (!int_list && (if_readlist() < 0)) return -1; for (ife = int_list; ife; ife = ife->next) { int err = doit(ife, cookie); if (err) return err; } return 0; } static int if_readconf(void) { int numreqs = 30; struct ifconf ifc; struct ifreq *ifr; int n, err = -1; int skfd; /* SIOCGIFCONF currently seems to only work properly on AF_INET sockets (as of 2.1.128) */ skfd = get_socket_for_af(AF_INET); if (skfd < 0) { fprintf(stderr, _("warning: no inet socket available: %s\n"), strerror(errno)); return -1; } ifc.ifc_buf = NULL; for (;;) { ifc.ifc_len = sizeof(struct ifreq) * numreqs; ifc.ifc_buf = xrealloc(ifc.ifc_buf, ifc.ifc_len); if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) { perror("SIOCGIFCONF"); goto out; } if (ifc.ifc_len == sizeof(struct ifreq) * numreqs) { /* assume it overflowed and try again */ numreqs += 10; continue; } break; } ifr = ifc.ifc_req; for (n = 0; n < ifc.ifc_len; n += sizeof(struct ifreq)) { lookup_interface(ifr->ifr_name); ifr++; } err = 0; out: free(ifc.ifc_buf); return err; } static char *get_name(char *name, char *p) { while (isspace(*p)) p++; while (*p) { if (isspace(*p)) break; if (*p == ':') { /* could be an alias */ char *dot = p, *dotname = name; *name++ = *p++; while (isdigit(*p)) *name++ = *p++; if (*p != ':') { /* it wasn't, backup */ p = dot; name = dotname; } if (*p == '\0') return NULL; p++; break; } *name++ = *p++; } *name++ = '\0'; return p; } static int procnetdev_version(char *buf) { if (strstr(buf, "compressed")) return 3; if (strstr(buf, "bytes")) return 2; return 1; } static int get_dev_fields(char *bp, struct interface *ife) { switch (procnetdev_vsn) { case 3: sscanf(bp, "%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld", &ife->stats.rx_bytes, &ife->stats.rx_packets, &ife->stats.rx_errors, &ife->stats.rx_dropped, &ife->stats.rx_fifo_errors, &ife->stats.rx_frame_errors, &ife->stats.rx_compressed, &ife->stats.rx_multicast, &ife->stats.tx_bytes, &ife->stats.tx_packets, &ife->stats.tx_errors, &ife->stats.tx_dropped, &ife->stats.tx_fifo_errors, &ife->stats.collisions, &ife->stats.tx_carrier_errors, &ife->stats.tx_compressed); break; case 2: sscanf(bp, "%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld", &ife->stats.rx_bytes, &ife->stats.rx_packets, &ife->stats.rx_errors, &ife->stats.rx_dropped, &ife->stats.rx_fifo_errors, &ife->stats.rx_frame_errors, &ife->stats.tx_bytes, &ife->stats.tx_packets, &ife->stats.tx_errors, &ife->stats.tx_dropped, &ife->stats.tx_fifo_errors, &ife->stats.collisions, &ife->stats.tx_carrier_errors); ife->stats.rx_multicast = 0; break; case 1: sscanf(bp, "%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld", &ife->stats.rx_packets, &ife->stats.rx_errors, &ife->stats.rx_dropped, &ife->stats.rx_fifo_errors, &ife->stats.rx_frame_errors, &ife->stats.tx_packets, &ife->stats.tx_errors, &ife->stats.tx_dropped, &ife->stats.tx_fifo_errors, &ife->stats.collisions, &ife->stats.tx_carrier_errors); ife->stats.rx_bytes = 0; ife->stats.tx_bytes = 0; ife->stats.rx_multicast = 0; break; } return 0; } int if_readlist(void) { FILE *fh; char buf[512]; struct interface *ife; int err; fh = fopen(_PATH_PROCNET_DEV, "r"); if (!fh) { perror(_PATH_PROCNET_DEV); return -1; } fgets(buf, sizeof buf, fh); /* eat line */ fgets(buf, sizeof buf, fh); #if 0 /* pretty, but can't cope with missing fields */ fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh, "face", "", /* parsed separately */ "bytes", "%lu", "packets", "%lu", "errs", "%lu", "drop", "%lu", "fifo", "%lu", "frame", "%lu", "compressed", "%lu", "multicast", "%lu", "bytes", "%lu", "packets", "%lu", "errs", "%lu", "drop", "%lu", "fifo", "%lu", "colls", "%lu", "carrier", "%lu", "compressed", "%lu", NULL); if (!fmt) return -1; #else procnetdev_vsn = procnetdev_version(buf); #endif err = 0; while (fgets(buf, sizeof buf, fh)) { char *s; new(ife); s = get_name(ife->name, buf); get_dev_fields(s, ife); ife->statistics_valid = 1; add_interface(ife); } if (ferror(fh)) { perror(_PATH_PROCNET_DEV); err = -1; } if (!err) err = if_readconf(); #if 0 free(fmt); #endif return err; } /* Support for fetching an IPX address */ #if HAVE_AFIPX static int ipx_getaddr(int sock, int ft, struct ifreq *ifr) { ((struct sockaddr_ipx *) &ifr->ifr_addr)->sipx_type = ft; return ioctl(sock, SIOCGIFADDR, ifr); } #endif /* Fetch the interface configuration from the kernel. */ int if_fetch(struct interface *ife) { struct ifreq ifr; int fd; char *ifname = ife->name; strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) return (-1); ife->flags = ifr.ifr_flags; strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) memset(ife->hwaddr, 0, 32); else memcpy(ife->hwaddr, ifr.ifr_hwaddr.sa_data, 8); ife->type = ifr.ifr_hwaddr.sa_family; strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFMETRIC, &ifr) < 0) ife->metric = 0; else ife->metric = ifr.ifr_metric; strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) ife->mtu = 0; else ife->mtu = ifr.ifr_mtu; if (ife->type == ARPHRD_SLIP || ife->type == ARPHRD_CSLIP || ife->type == ARPHRD_SLIP6 || ife->type == ARPHRD_CSLIP6 || ife->type == ARPHRD_ADAPT) { #ifdef SIOCGOUTFILL strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGOUTFILL, &ifr) < 0) ife->outfill = 0; else ife->outfill = (unsigned int) ifr.ifr_data; #endif #ifdef SIOCGKEEPALIVE strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGKEEPALIVE, &ifr) < 0) ife->keepalive = 0; else ife->keepalive = (unsigned int) ifr.ifr_data; #endif } strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) memset(&ife->map, 0, sizeof(struct ifmap)); else memcpy(&ife->map, &ifr.ifr_map, sizeof(struct ifmap)); strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) memset(&ife->map, 0, sizeof(struct ifmap)); else ife->map = ifr.ifr_map; #ifdef HAVE_TXQUEUELEN strcpy(ifr.ifr_name, ifname); if (ioctl(skfd, SIOCGIFTXQLEN, &ifr) < 0) ife->tx_queue_len = -1; /* unknown value */ else ife->tx_queue_len = ifr.ifr_qlen; #else ife->tx_queue_len = -1; /* unknown value */ #endif #if HAVE_AFINET fd = get_socket_for_af(AF_INET); if (fd >= 0) { strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFDSTADDR, &ifr) < 0) memset(&ife->dstaddr, 0, sizeof(struct sockaddr)); else ife->dstaddr = ifr.ifr_dstaddr; strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFBRDADDR, &ifr) < 0) memset(&ife->broadaddr, 0, sizeof(struct sockaddr)); else ife->broadaddr = ifr.ifr_broadaddr; strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFNETMASK, &ifr) < 0) memset(&ife->netmask, 0, sizeof(struct sockaddr)); else ife->netmask = ifr.ifr_netmask; strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFADDR, &ifr) < 0) memset(&ife->addr, 0, sizeof(struct sockaddr)); else ife->addr = ifr.ifr_addr; } #endif #if HAVE_AFATALK /* DDP address maybe ? */ fd = get_socket_for_af(AF_APPLETALK); if (fd >= 0) { strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) { ife->ddpaddr = ifr.ifr_addr; ife->has_ddp = 1; } } #endif #if HAVE_AFIPX /* Look for IPX addresses with all framing types */ fd = get_socket_for_af(AF_IPX); if (fd >= 0) { strcpy(ifr.ifr_name, ifname); if (!ipx_getaddr(fd, IPX_FRAME_ETHERII, &ifr)) { ife->has_ipx_bb = 1; ife->ipxaddr_bb = ifr.ifr_addr; } strcpy(ifr.ifr_name, ifname); if (!ipx_getaddr(fd, IPX_FRAME_SNAP, &ifr)) { ife->has_ipx_sn = 1; ife->ipxaddr_sn = ifr.ifr_addr; } strcpy(ifr.ifr_name, ifname); if (!ipx_getaddr(fd, IPX_FRAME_8023, &ifr)) { ife->has_ipx_e3 = 1; ife->ipxaddr_e3 = ifr.ifr_addr; } strcpy(ifr.ifr_name, ifname); if (!ipx_getaddr(fd, IPX_FRAME_8022, &ifr)) { ife->has_ipx_e2 = 1; ife->ipxaddr_e2 = ifr.ifr_addr; } } #endif #if HAVE_AFECONET /* Econet address maybe? */ fd = get_socket_for_af(AF_ECONET); if (fd >= 0) { strcpy(ifr.ifr_name, ifname); if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) { ife->ecaddr = ifr.ifr_addr; ife->has_econet = 1; } } #endif return 0; } int do_if_fetch(struct interface *ife) { if (if_fetch(ife) < 0) { char *errmsg; if (errno == ENODEV) { /* Give better error message for this case. */ errmsg = _("Device not found"); } else { errmsg = strerror(errno); } fprintf(stderr, _("%s: error fetching interface information: %s\n"), ife->name, errmsg); return -1; } return 0; } int do_if_print(struct interface *ife, void *cookie) { int *opt_a = (int *) cookie; int res; res = do_if_fetch(ife); if (res >= 0) { if ((ife->flags & IFF_UP) || *opt_a) ife_print(ife); } return res; } netdiag-1.2/statnet-3.8/itstime.c000066400000000000000000000032351323731111400166000ustar00rootroot00000000000000/* itstime.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 02MAR98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* Get statistics when timer expires. */ #include "stat.h" #include #include extern struct StatMemStruct *StatMem; /* pointer to shared memory segment */ void itstime (int errnum) { #if 0 /* removed for statnet 3.* due to awkwardness in reading data. */ if_getstats( ETH, now_stats ); /* get present interface statistics */ if( last_stats->rx_errors != now_stats->rx_errors || last_stats->rx_dropped != now_stats->rx_dropped ) { /* if errors reported */ SM_regis.rx_errors_d = now_stats->rx_errors - last_stats->rx_errors; SM_regis.rx_packets_d = now_stats->rx_packets - last_stats->rx_packets; SM_regis.rx_dropped_d = now_stats->rx_dropped - last_stats->rx_dropped; SM_regis.rx_interval = SN_STATS_SECS; /* swap last and now stats buffer pointers */ } /* if errors reported */ else { /* else clear the data */ SM_regis.rx_errors_d = 0; SM_regis.rx_packets_d = 0; SM_regis.rx_dropped_d = 0; SM_regis.rx_interval = SN_STATS_SECS; } /* else clear the data */ temp_stats = last_stats; last_stats = now_stats; now_stats = temp_stats; #endif if (signal (SIGALRM, itstime) == SIG_ERR) { SM_regis.errcode = errno; SM_regis.errcount++; timer_flag = 0; } else { /* else signal registered */ alarm (SN_STATS_SECS); timer_flag = 1; } /* else signal registered */ return; } netdiag-1.2/statnet-3.8/rpm.spec.proto000066400000000000000000000016751323731111400176000ustar00rootroot00000000000000Summary: Monitors network traffic on a LAN Name: statnet Version: __SNVERSION__ Release: 1 Copyright: GNU Group: Networking/Utilities Source: ftp://sunsite.unc.edu/pub/Linux/system/Network/management/statnet-__SNVERSION__.tgz Prefix: /usr %description Statnet shows the current usage statistics of your Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, and whatever other frames/packets are noticed. No running totals are kept, only the current usage captured by daemon process. It shows: - kilobytes per second on ethernet, plip, and other interfaces. - the load of ethernet - frames per second. - how many frames of each type (like IP, ARP and some Appletalk or TCP frames) were seen. %prep %setup -c %build make %install install -s -o 0 -g 0 -m 755 statnet /usr/sbin install -s -o 0 -g 0 -m 755 statnetd /usr/sbin %files /usr/sbin/statnet /usr/sbin/statnetd %doc CHANGES INSTALL README statnet.lsm netdiag-1.2/statnet-3.8/services000066400000000000000000002454671323731111400165430ustar00rootroot00000000000000# The Well Known Ports are those from 0 through 1023. # The Registered Ports are those from 1024 through 49151 # The Dynamic and/or Private Ports are those from 49152 through 65535 # Port lists such as this are often found on UNIX systems in /etc/services, # in RFC 793, RFC 768, and the well-filled RFC 1700. # WELL-KNOWN PORT ASSIGNMENTS #Keyword Decimal Description References #------- ------- ----------- ---------- 0/tcp # Reserved 0/udp # /Reserved # Jon Postel tcpmux 1/tcp # TCP Port Service Multiplexer tcpmux 1/udp # /TCP Port Service Multiplexer # Mark Lottor compressnet 2/tcp # Management Utility compressnet 2/udp # /Management Utility compressnet 3/tcp # Compression Process compressnet 3/udp # /Compression Process # Bernie Volz # 4/tcp # Unassigned # 4/udp # /Unassigned rje 5/tcp # Remote Job Entry rje 5/udp # /Remote Job Entry # Jon Postel # 6/tcp # Unassigned # 6/udp # /Unassigned echo 7/tcp # Echo echo 7/udp # /Echo # Jon Postel # 8/tcp # Unassigned # 8/udp # /Unassigned discard 9/tcp # Discard discard 9/udp # /Discard # Jon Postel # 10/tcp # Unassigned # 10/udp # /Unassigned systat 11/tcp # Active Users systat 11/udp # /Active Users # Jon Postel # 12/tcp # Unassigned # 12/udp # /Unassigned daytime 13/tcp # Daytime daytime 13/udp # /Daytime # Jon Postel # 14/tcp # Unassigned # 14/udp # /Unassigned # 15/tcp # Unassigned [was netstat] # 15/udp # /Unassigned # 16/tcp # Unassigned # 16/udp # /Unassigned qotd 17/tcp # Quote of the Day qotd 17/udp # /Quote of the Day # Jon Postel msp 18/tcp # Message Send Protocol msp 18/udp # /Message Send Protocol # Rina Nethaniel <---none---> chargen 19/tcp # Character Generator chargen 19/udp # /Character Generator ftp-data 20/tcp # File Transfer [Default Data] ftp-data 20/udp # /File Transfer [Default Data] ftp 21/tcp # File Transfer [Control] ftp 21/udp # /File Transfer [Control] # Jon Postel ssh 22/tcp # SSH Remote Login Protocol ssh 22/udp # /SSH Remote Login Protocol # Tatu Ylonen telnet 23/tcp # Telnet telnet 23/udp # /Telnet # Jon Postel 24/tcp # any private mail system 24/udp # /any private mail system # Rick Adams smtp 25/tcp # Simple Mail Transfer smtp 25/udp # /Simple Mail Transfer # Jon Postel # 26/tcp # Unassigned # 26/udp # /Unassigned nsw-fe 27/tcp # NSW User System FE nsw-fe 27/udp # /NSW User System FE # Robert Thomas # 28/tcp # Unassigned # 28/udp # /Unassigned msg-icp 29/tcp # MSG ICP msg-icp 29/udp # /MSG ICP # Robert Thomas # 30/tcp # Unassigned # 30/udp # /Unassigned msg-auth 31/tcp # MSG Authentication msg-auth 31/udp # /MSG Authentication # Robert Thomas # 32/tcp # Unassigned # 32/udp # /Unassigned dsp 33/tcp # Display Support Protocol dsp 33/udp # /Display Support Protocol # Ed Cain # 34/tcp # Unassigned # 34/udp # /Unassigned 35/tcp # any private printer server 35/udp # /any private printer server # Jon Postel # 36/tcp # Unassigned # 36/udp # /Unassigned time 37/tcp # Time time 37/udp # /Time # Jon Postel rap 38/tcp # Route Access Protocol rap 38/udp # /Route Access Protocol # Robert Ullmann rlp 39/tcp # Resource Location Protocol rlp 39/udp # /Resource Location Protocol # Mike Accetta # 40/tcp # Unassigned # 40/udp # /Unassigned graphics 41/tcp # Graphics graphics 41/udp # /Graphics name 42/tcp # Host Name Server name 42/udp # /Host Name Server nameserver 42/tcp # Host Name Server nameserver 42/udp # /Host Name Server nicname 43/tcp # Who Is nicname 43/udp # /Who Is mpm-flags 44/tcp # MPM FLAGS Protocol mpm-flags 44/udp # /MPM FLAGS Protocol mpm 45/tcp # Message Processing Module [recv] mpm 45/udp # /Message Processing Module [recv] mpm-snd 46/tcp # MPM [default send] mpm-snd 46/udp # /MPM [default send] # Jon Postel ni-ftp 47/tcp # NI FTP ni-ftp 47/udp # /NI FTP # Steve Kille auditd 48/tcp # Digital Audit Daemon auditd 48/udp # /Digital Audit Daemon # Larry Scott tacacs 49/tcp # Login Host Protocol (TACACS) tacacs 49/udp # /Login Host Protocol (TACACS) # Pieter Ditmars re-mail-ck 50/tcp # Remote Mail Checking Protocol re-mail-ck 50/udp # /Remote Mail Checking Protocol # Steve Dorner la-maint 51/tcp # IMP Logical Address Maintenance la-maint 51/udp # /IMP Logical Address Maintenance # Andy Malis xns-time 52/tcp # XNS Time Protocol xns-time 52/udp # /XNS Time Protocol # Susie Armstrong domain 53/tcp # Domain Name Server domain 53/udp # /Domain Name Server # Paul Mockapetris xns-ch 54/tcp # XNS Clearinghouse xns-ch 54/udp # /XNS Clearinghouse # Susie Armstrong isi-gl 55/tcp # ISI Graphics Language isi-gl 55/udp # /ISI Graphics Language xns-auth 56/tcp # XNS Authentication xns-auth 56/udp # /XNS Authentication # Susie Armstrong 57/tcp # any private terminal access 57/udp # /any private terminal access # Jon Postel xns-mail 58/tcp # XNS Mail xns-mail 58/udp # /XNS Mail # Susie Armstrong 59/tcp # any private file service 59/udp # /any private file service # Jon Postel 60/tcp # Unassigned 60/udp # /Unassigned ni-mail 61/tcp # NI MAIL ni-mail 61/udp # /NI MAIL # Steve Kille acas 62/tcp # ACA Services acas 62/udp # /ACA Services # E. Wald whois++ 63/tcp # whois++ whois++ 63/udp # /whois++ # Rickard Schoultz covia 64/tcp # Communications Integrator (CI) covia 64/udp # /Communications Integrator (CI) # "Tundra" Tim Daneliuk # tacacs-ds 65/tcp # TACACS-Database Service tacacs-ds 65/udp # /TACACS-Database Service # Kathy Huber sql*net 66/tcp # Oracle SQL*NET sql*net 66/udp # /Oracle SQL*NET # Jack Haverty bootps 67/tcp # Bootstrap Protocol Server bootps 67/udp # /Bootstrap Protocol Server bootpc 68/tcp # Bootstrap Protocol Client bootpc 68/udp # /Bootstrap Protocol Client # Bill Croft tftp 69/tcp # Trivial File Transfer tftp 69/udp # /Trivial File Transfer # David Clark gopher 70/tcp # Gopher gopher 70/udp # /Gopher # Mark McCahill netrjs-1 71/tcp # Remote Job Service netrjs-1 71/udp # /Remote Job Service netrjs-2 72/tcp # Remote Job Service netrjs-2 72/udp # /Remote Job Service netrjs-3 73/tcp # Remote Job Service netrjs-3 73/udp # /Remote Job Service netrjs-4 74/tcp # Remote Job Service netrjs-4 74/udp # /Remote Job Service # Bob Braden 75/tcp # any private dial out service 75/udp # /any private dial out service # Jon Postel deos 76/tcp # Distributed External Object Store deos 76/udp # /Distributed External Object Store # Robert Ullmann 77/tcp # any private RJE service 77/udp # /any private RJE service # Jon Postel vettcp 78/tcp # vettcp vettcp 78/udp # /vettcp # Christopher Leong finger 79/tcp # Finger finger 79/udp # /Finger # David Zimmerman http 80/tcp # World Wide Web HTTP http 80/udp # /World Wide Web HTTP www 80/tcp # World Wide Web HTTP www 80/udp # /World Wide Web HTTP www-http 80/tcp # World Wide Web HTTP www-http 80/udp # /World Wide Web HTTP # Tim Berners-Lee hosts2-ns 81/tcp # HOSTS2 Name Server hosts2-ns 81/udp # /HOSTS2 Name Server # Earl Killian xfer 82/tcp # XFER Utility xfer 82/udp # /XFER Utility # Thomas M. Smith mit-ml-dev 83/tcp # MIT ML Device mit-ml-dev 83/udp # /MIT ML Device # David Reed <--none---> ctf 84/tcp # Common Trace Facility ctf 84/udp # /Common Trace Facility # Hugh Thomas mit-ml-dev 85/tcp # MIT ML Device mit-ml-dev 85/udp # /MIT ML Device # David Reed <--none---> mfcobol 86/tcp # Micro Focus Cobol mfcobol 86/udp # /Micro Focus Cobol # Simon Edwards <--none---> 87/tcp # any private terminal link 87/udp # /any private terminal link # Jon Postel kerberos 88/tcp # Kerberos kerberos 88/udp # /Kerberos # B. Clifford Neuman su-mit-tg 89/tcp # SU/MIT Telnet Gateway su-mit-tg 89/udp # /SU/MIT Telnet Gateway # Mark Crispin ########### PORT 90 also being used unofficially by Pointcast ######### dnsix 90/tcp # DNSIX Securit Attribute Token Map dnsix 90/udp # /DNSIX Securit Attribute Token Map # Charles Watt mit-dov 91/tcp # MIT Dover Spooler mit-dov 91/udp # /MIT Dover Spooler # Eliot Moss npp 92/tcp # Network Printing Protocol npp 92/udp # /Network Printing Protocol # Louis Mamakos dcp 93/tcp # Device Control Protocol dcp 93/udp # /Device Control Protocol # Daniel Tappan objcall 94/tcp # Tivoli Object Dispatcher objcall 94/udp # /Tivoli Object Dispatcher # Tom Bereiter <--none---> supdup 95/tcp # SUPDUP supdup 95/udp # /SUPDUP # Mark Crispin dixie 96/tcp # DIXIE Protocol Specification dixie 96/udp # /DIXIE Protocol Specification # Tim Howes swift-rvf 97/tcp # Swift Remote Virtural File Protocol swift-rvf 97/udp # /Swift Remote Virtural File Protocol # Maurice R. Turcotte # tacnews 98/tcp # TAC News tacnews 98/udp # /TAC News # Jon Postel metagram 99/tcp # Metagram Relay metagram 99/udp # /Metagram Relay # Geoff Goodfellow newacct 100/tcp # [unauthorized use] hostname 101/tcp # NIC Host Name Server hostname 101/udp # /NIC Host Name Server # Jon Postel iso-tsap 102/tcp # ISO-TSAP Class 0 iso-tsap 102/udp # /ISO-TSAP Class 0 # Marshall Rose gppitnp 103/tcp # Genesis Point-to-Point Trans Net gppitnp 103/udp # /Genesis Point-to-Point Trans Net acr-nema 104/tcp # ACR-NEMA Digital Imag. & Comm. 300 acr-nema 104/udp # /ACR-NEMA Digital Imag. & Comm. 300 # Patrick McNamee <--none---> cso 105/tcp # CCSO name server protocol cso 105/tcp # CCSO name server protocol # Martin Hamilton csnet-ns 105/tcp # Mailbox Name Nameserver csnet-ns 105/udp # /Mailbox Name Nameserver # Marvin Solomon 3com-tsmux 106/tcp # 3COM-TSMUX 3com-tsmux 106/udp # /3COM-TSMUX # Jeremy Siegel rtelnet 107/tcp # Remote Telnet Service rtelnet 107/udp # /Remote Telnet Service # Jon Postel snagas 108/tcp # SNA Gateway Access Server snagas 108/udp # /SNA Gateway Access Server # Kevin Murphy pop2 109/tcp # Post Office Protocol - Version 2 pop2 109/udp # /Post Office Protocol - Version 2 # Joyce K. Reynolds pop3 110/tcp # Post Office Protocol - Version 3 pop3 110/udp # /Post Office Protocol - Version 3 # Marshall Rose sunrpc 111/tcp # SUN Remote Procedure Call sunrpc 111/udp # /SUN Remote Procedure Call # Chuck McManis mcidas 112/tcp # McIDAS Data Transmission Protocol mcidas 112/udp # /McIDAS Data Transmission Protocol # Glenn Davis ident 113/tcp # auth 113/tcp # Authentication Service auth 113/udp # /Authentication Service # Mike St. Johns audionews 114/tcp # Audio News Multicast audionews 114/udp # /Audio News Multicast # Martin Forssen sftp 115/tcp # Simple File Transfer Protocol sftp 115/udp # /Simple File Transfer Protocol # Mark Lottor ansanotify 116/tcp # ANSA REX Notify ansanotify 116/udp # /ANSA REX Notify # Nicola J. Howarth uucp-path 117/tcp # UUCP Path Service uucp-path 117/udp # /UUCP Path Service sqlserv 118/tcp # SQL Services sqlserv 118/udp # /SQL Services # Larry Barnes nntp 119/tcp # Network News Transfer Protocol nntp 119/udp # /Network News Transfer Protocol # Phil Lapsley cfdptkt 120/tcp # CFDPTKT cfdptkt 120/udp # /CFDPTKT # John Ioannidis erpc 121/tcp # Encore Expedited Remote Pro.Call erpc 121/udp # /Encore Expedited Remote Pro.Call # Jack O'Neil <---none---> smakynet 122/tcp # SMAKYNET smakynet 122/udp # /SMAKYNET # Mike O'Dowd ntp 123/tcp # Network Time Protocol ntp 123/udp # /Network Time Protocol # Dave Mills ansatrader 124/tcp # ANSA REX Trader ansatrader 124/udp # /ANSA REX Trader # Nicola J. Howarth locus-map 125/tcp # Locus PC-Interface Net Map Ser locus-map 125/udp # /Locus PC-Interface Net Map Ser # Eric Peterson unitary 126/tcp # Unisys Unitary Login unitary 126/udp # /Unisys Unitary Login # locus-con 127/tcp # Locus PC-Interface Conn Server locus-con 127/udp # /Locus PC-Interface Conn Server # Eric Peterson gss-xlicen 128/tcp # GSS X License Verification gss-xlicen 128/udp # /GSS X License Verification # John Light pwdgen 129/tcp # Password Generator Protocol pwdgen 129/udp # /Password Generator Protocol # Frank J. Wacho cisco-fna 130/tcp # cisco FNATIVE cisco-fna 130/udp # /cisco FNATIVE cisco-tna 131/tcp # cisco TNATIVE cisco-tna 131/udp # /cisco TNATIVE cisco-sys 132/tcp # cisco SYSMAINT cisco-sys 132/udp # /cisco SYSMAINT statsrv 133/tcp # Statistics Service statsrv 133/udp # /Statistics Service # Dave Mills ingres-net 134/tcp # INGRES-NET Service ingres-net 134/udp # /INGRES-NET Service # Mike Berrow <---none---> epmap 135/tcp # DCE endpoint resolution epmap 135/udp # /DCE endpoint resolution # Joe Pato profile 136/tcp # PROFILE Naming System profile 136/udp # /PROFILE Naming System # Larry Peterson netbios-ns 137/tcp # NETBIOS Name Service netbios-ns 137/udp # /NETBIOS Name Service netbios-dgm 138/tcp # NETBIOS Datagram Service netbios-dgm 138/udp # /NETBIOS Datagram Service netbios-ssn 139/tcp # NETBIOS Session Service netbios-ssn 139/udp # /NETBIOS Session Service # Jon Postel emfis-data 140/tcp # EMFIS Data Service emfis-data 140/udp # /EMFIS Data Service emfis-cntl 141/tcp # EMFIS Control Service emfis-cntl 141/udp # /EMFIS Control Service # Gerd Beling bl-idm 142/tcp # Britton-Lee IDM bl-idm 142/udp # /Britton-Lee IDM # Susie Snitzer <---none---> imap 143/tcp # Internet Message Access Protocol imap 143/udp # /Internet Message Access Protocol # Mark Crispin # 144 Unassigned uaac 145/tcp # UAAC Protocol uaac 145/udp # /UAAC Protocol # David A. Gomberg iso-tp0 146/tcp # ISO-IP0 iso-tp0 146/udp # /ISO-IP0 iso-ip 147/tcp # ISO-IP iso-ip 147/udp # /ISO-IP # Marshall Rose jargon 148/tcp # Jargon jargon 148/udp # /Jargon # Bill Weinman aed-512 149/tcp # AED 512 Emulation Service aed-512 149/udp # /AED 512 Emulation Service # Albert G. Broscius sql-net 150/tcp # SQL-NET sql-net 150/udp # /SQL-NET # Martin Picard <<---none---> hems 151/tcp # HEMS hems 151/udp # /HEMS bftp 152/tcp # Background File Transfer Program bftp 152/udp # /Background File Transfer Program # Annette DeSchon sgmp 153/tcp # SGMP sgmp 153/udp # /SGMP # Marty Schoffstahl netsc-prod 154/tcp # NETSC netsc-prod 154/udp # /NETSC netsc-dev 155/tcp # NETSC netsc-dev 155/udp # /NETSC # Sergio Heker sqlsrv 156/tcp # SQL Service sqlsrv 156/udp # /SQL Service # Craig Rogers knet-cmp 157/tcp # KNET/VM Command/Message Protocol knet-cmp 157/udp # /KNET/VM Command/Message Protocol # Gary S. Malkin pcmail-srv 158/tcp # PCMail Server pcmail-srv 158/udp # /PCMail Server # Mark L. Lambert nss-routing 159/tcp # NSS-Routing nss-routing 159/udp # /NSS-Routing # Yakov Rekhter sgmp-traps 160/tcp # SGMP-TRAPS sgmp-traps 160/udp # /SGMP-TRAPS # Marty Schoffstahl snmp 161/tcp # SNMP snmp 161/udp # /SNMP snmptrap 162/tcp # SNMPTRAP snmptrap 162/udp # /SNMPTRAP # Marshall Rose cmip-man 163/tcp # CMIP/TCP Manager cmip-man 163/udp # /CMIP/TCP Manager cmip-agent 164/tcp # CMIP/TCP Agent smip-agent 164/udp # /CMIP/TCP Agent # Amatzia Ben-Artzi <---none---> xns-courier 165/tcp # Xerox xns-courier 165/udp # /Xerox # Susie Armstrong s-net 166/tcp # Sirius Systems s-net 166/udp # /Sirius Systems # Brian Lloyd namp 167/tcp # NAMP namp 167/udp # /NAMP # Marty Schoffstahl rsvd 168/tcp # RSVD rsvd 168/udp # /RSVD # Neil Todd send 169/tcp # SEND send 169/udp # /SEND # William D. Wisner print-srv 170/tcp # Network PostScript print-srv 170/udp # /Network PostScript # Brian Reid multiplex 171/tcp # Network Innovations Multiplex multiplex 171/udp # /Network Innovations Multiplex cl/1 172/tcp # Network Innovations CL/1 cl/1 172/udp # /Network Innovations CL/1 # Kevin DeVault <<---none---> xyplex-mux 173/tcp # Xyplex xyplex-mux 173/udp # /Xyplex # Bob Stewart mailq 174/tcp # MAILQ mailq 174/udp # /MAILQ # Rayan Zachariassen vmnet 175/tcp # VMNET vmnet 175/udp # /VMNET # Christopher Tengi genrad-mux 176/tcp # GENRAD-MUX genrad-mux 176/udp # /GENRAD-MUX # Ron Thornton xdmcp 177/tcp # X Display Manager Control Protocol xdmcp 177/udp # /X Display Manager Control Protocol # Robert W. Scheifler nextstep 178/tcp # NextStep Window Server NextStep 178/udp # /NextStep Window Server # Leo Hourvitz bgp 179/tcp # Border Gateway Protocol bgp 179/udp # /Border Gateway Protocol # Kirk Lougheed ris 180/tcp # Intergraph ris 180/udp # /Intergraph # Dave Buehmann unify 181/tcp # Unify unify 181/udp # /Unify # Vinod Singh <--none---> audit 182/tcp # Unisys Audit SITP audit 182/udp # /Unisys Audit SITP # Gil Greenbaum ocbinder 183/tcp # OCBinder ocbinder 183/udp # /OCBinder ocserver 184/tcp # OCServer ocserver 184/udp # /OCServer # Jerrilynn Okamura <--none---> remote-kis 185/tcp # Remote-KIS remote-kis 185/udp # /Remote-KIS kis 186/tcp # KIS Protocol kis 186/udp # /KIS Protocol # Ralph Droms aci 187/tcp # Application Communication Interface aci 187/udp # /Application Communication Interface # Rick Carlos mumps 188/tcp # Plus Five's MUMPS mumps 188/udp # /Plus Five's MUMPS # Hokey Stenn qft 189/tcp # Queued File Transport qft 189/udp # /Queued File Transport # Wayne Schroeder gacp 190/tcp # Gateway Access Control Protocol gacp 190/udp # /Gateway Access Control Protocol # C. Philip Wood prospero 191/tcp # Prospero Directory Service prospero 191/udp # /Prospero Directory Service # B. Clifford Neuman osu-nms 192/tcp # OSU Network Monitoring System osu-nms 192/udp # /OSU Network Monitoring System # Doug Karl srmp 193/tcp # Spider Remote Monitoring Protocol srmp 193/udp # /Spider Remote Monitoring Protocol # Ted J. Socolofsky irc 194/tcp # Internet Relay Chat Protocol irc 194/udp # /Internet Relay Chat Protocol # Jarkko Oikarinen dn6-nlm-aud 195/tcp # DNSIX Network Level Module Audit dn6-nlm-aud 195/udp # /DNSIX Network Level Module Audit dn6-smm-red 196/tcp # DNSIX Session Mgt Module Audit Redir dn6-smm-red 196/udp # /DNSIX Session Mgt Module Audit Redir # Lawrence Lebahn dls 197/tcp # Directory Location Service dls 197/udp # /Directory Location Service dls-mon 198/tcp # Directory Location Service Monitor dls-mon 198/udp # /Directory Location Service Monitor # Scott Bellew smux 199/tcp # SMUX smux 199/udp # /SMUX # Marshall Rose src 200/tcp # IBM System Resource Controller src 200/udp # /IBM System Resource Controller # Gerald McBrearty <---none---> at-rtmp 201/tcp # AppleTalk Routing Maintenance at-rtmp 201/udp # /AppleTalk Routing Maintenance at-nbp 202/tcp # AppleTalk Name Binding at-nbp 202/udp # /AppleTalk Name Binding at-3 203/tcp # AppleTalk Unused at-3 203/udp # /AppleTalk Unused at-echo 204/tcp # AppleTalk Echo at-echo 204/udp # /AppleTalk Echo at-5 205/tcp # AppleTalk Unused at-5 205/udp # /AppleTalk Unused at-zis 206/tcp # AppleTalk Zone Information at-zis 206/udp # /AppleTalk Zone Information at-7 207/tcp # AppleTalk Unused at-7 207/udp # /AppleTalk Unused at-8 208/tcp # AppleTalk Unused at-8 208/udp # /AppleTalk Unused # Rob Chandhok qmtp 209/tcp # The Quick Mail Transfer Protocol qmtp 209/udp # /The Quick Mail Transfer Protocol # Dan Bernstein z39.50 210/tcp # ANSI Z39.50 z39.50 210/udp # /ANSI Z39.50 # Mark Needleman # 914c/g 211/tcp # Texas Instruments 914C/G Terminal 914c/g 211/udp # /Texas Instruments 914C/G Terminal # Bill Harrell <---none---> anet 212/tcp # ATEXSSTR anet 212/udp # /ATEXSSTR # Jim Taylor ipx 213/tcp # IPX ipx 213/udp # /IPX # Don Provan vmpwscs 214/tcp # VM PWSCS vmpwscs 214/udp # /VM PWSCS # Dan Shia softpc 215/tcp # Insignia Solutions softpc 215/udp # /Insignia Solutions # Martyn Thomas <---none---> CAIlic 216/tcp # Computer Associates Int'l License Server CAIlic 216/udp # /Computer Associates Int'l License Server # Chuck Spitz dbase 217/tcp # dBASE Unix dbase 217/udp # /dBASE Unix # Don Gibson # mpp 218/tcp # Netix Message Posting Protocol mpp 218/udp # /Netix Message Posting Protocol # Shannon Yeh uarps 219/tcp # Unisys ARPs uarps 219/udp # /Unisys ARPs # Ashok Marwaha <---none---> imap3 220/tcp # Interactive Mail Access Protocol v3 imap3 220/udp # /Interactive Mail Access Protocol v3 # James Rice fln-spx 221/tcp # Berkeley rlogind with SPX auth fln-spx 221/udp # /Berkeley rlogind with SPX auth rsh-spx 222/tcp # Berkeley rshd with SPX auth rsh-spx 222/udp # /Berkeley rshd with SPX auth cdc 223/tcp # Certificate Distribution Center cdc 223/udp # /Certificate Distribution Center # Kannan Alagappan # 224-241 Reserved # Jon Postel direct 242/tcp # Direct direct 242/udp # /Direct # Herb Sutter sur-meas 243/tcp # Survey Measurement sur-meas 243/udp # /Survey Measurement # Dave Clark dayna 244/tcp # Dayna dayna 244/udp # /Dayna # Steve Bateman link 245/tcp # LINK link 245/udp # /LINK dsp3270 246/tcp # Display Systems Protocol dsp3270 246/udp # /Display Systems Protocol # Weldon J. Showalter subntbcst_tftp 247/tcp # SUBNTBCST_TFTP subntbcst_tftp 247/udp # /SUBNTBCST_TFTP # John Fake bhfhs 248/tcp # bhfhs bhfhs 248/udp # /bhfhs # John Kelly # 249-255 Reserved # Jon Postel rap 256/tcp # RAP rap 256/udp # /RAP # J.S. Greenfield set 257/tcp # Secure Electronic Transaction set 257/udp # /Secure Electronic Transaction # Donald Eastlake yak-chat 258/tcp # Yak Winsock Personal Chat yak-chat 258/udp # /Yak Winsock Personal Chat # Brian Bandy esro-gen 259/tcp # Efficient Short Remote Operations esro-gen 259/udp # /Efficient Short Remote Operations # Mohsen Banan openport 260/tcp # Openport openport 260/udp # /Openport # John Marland nsiiops 261/tcp # IIOP Name Service over TLS/SSL nsiiops 261/udp # /IIOP Name Service over TLS/SSL # Jeff Stewart arcisdms 262/tcp # Arcisdms arcisdms 262/udp Arcisdms # Russell Crook (rmc@sni.ca> hdap 263/tcp # HDAP hdap 263/udp # /HDAP # Troy Gau # 264-279 Unassigned http-mgmt 280/tcp # http-mgmt http-mgmt 280/udp # /http-mgmt # Adrian Pell # personal-link 281/tcp Personal Link personal-link 281/udp # /Personal Link # Dan Cummings cableport-ax 282/tcp # Cable Port A/X cableport-ax 282/udp # /Cable Port A/X # Craig Langfahl # 283-308 Unassigned entrusttime 309/tcp # EntrustTime entrusttime 309/udp # /EntrustTime # Peter Whittaker bhmds 310/tcp # bhmds bhmds 310/udp # /bhmds # John Kelly asip-webadmin 311/tcp # AppleShare IP WebAdmin asip-webadmin 311/udp # /AppleShare IP WebAdmin # Ann Huang vslmp 312/tcp # VSLMP vslmp 312/udp # /VSLMP # Gerben Wierda netfusion 313/tcp # Net Fusion netfusion 313/udp Net Fusion # Karl Rousseau opalis-robot 314/tcp # Opalis Robot opalis-robot 314/udp # /Opalis Robot # Laurent Domenech, Opalis dpsi 315/tcp # DPSI dpsi 315/udp # /DPSI # Tony Scamurra decauth 316/tcp # decAuth decauth 316/udp # /decAuth # Michael Agishtein zannet 317/tcp # Zannet zannet 317/udp # /Zannet # Zan Oliphant # 318-343 Unassigned pdap 344/tcp # Prospero Data Access Protocol pdap 344/udp # /Prospero Data Access Protocol # B. Clifford Neuman pawserv 345/tcp # Perf Analysis Workbench pawserv 345/udp # /Perf Analysis Workbench zserv 346/tcp # Zebra server zserv 346/udp # /Zebra server fatserv 347/tcp # Fatmen Server fatserv 347/udp # /Fatmen Server csi-sgwp 348/tcp # Cabletron Management Protocol csi-sgwp 348/udp # /Cabletron Management Protocol mftp 349/tcp # mftp mftp 349/udp # /mftp # Dave Feinleib matip-type-a 350/tcp # MATIP Type A matip-type-a 350/udp # /MATIP Type A matip-type-b 351/tcp # MATIP Type B matip-type-b 351/udp # /MATIP Type B # Alain Robert # The following entry records an unassigned but widespread use bhoetty 351/tcp bhoetty (added 5/21/97) bhoetty 351/udp # /bhoetty # John Kelly dtag-ste-sb 352/tcp DTAG (assigned long ago) dtag-ste-sb 352/udp DTAG # Ruediger Wald # The following entry records an unassigned but widespread use bhoedap4 352/tcp # bhoedap4 (added 5/21/97) bhoedap4 352/udp # /bhoedap4 # John Kelly ndsauth 353/tcp # NDSAUTH ndsauth 353/udp # /NDSAUTH # Jayakumar Ramalingam bh611 354/tcp bh611 bh611 354/udp # /bh611 # John Kelly datex-asn 355/tcp DATEX-ASN datex-asn 355/udp # /DATEX-ASN # Kenneth Vaughn cloanto-net-1 356/tcp # Cloanto Net 1 cloanto-net-1 356/udp # /Cloanto Net 1 # Michael Battilana bhevent 357/tcp bhevent bhevent 357/udp # /bhevent # John Kelly shrinkwrap 358/tcp # Shrinkwrap shrinkwrap 358/udp # /Shrinkwrap # Bill Simpson tenebris_nts 359/tcp # Tenebris Network Trace Service tenebris_nts 359/udp # /Tenebris Network Trace Service # Eric Jacksch scoi2odialog 360/tcp # scoi2odialog scoi2odialog 360/udp # /scoi2odialog # Keith Petley semantix 361/tcp # Semantix semantix 361/udp # /Semantix # Semantix srssend 362/tcp # SRS Send srssend 362/udp # /SRS Send # Curt Mayer rsvp_tunnel 363/tcp # RSVP Tunnel rsvp_tunnel 363/udp # /RSVP Tunnel # Andreas Terzis # 364-370 Unassigned clearcase 371/tcp # Clearcase clearcase 371/udp # /Clearcase # Dave LeBlang ulistproc 372/tcp # ListProcessor ulistproc 372/udp # /ListProcessor # Anastasios Kotsikonas legent-1 373/tcp # Legent Corporation legent-1 373/udp # /Legent Corporation legent-2 374/tcp # Legent Corporation legent-2 374/udp # /Legent Corporation # Keith Boyce <---none---> hassle 375/tcp # Hassle hassle 375/udp # /Hassle # Reinhard Doelz nip 376/tcp # Amiga Envoy Network Inquiry Proto nip 376/udp # /Amiga Envoy Network Inquiry Proto # Heinz Wrobel # Dale L. Larson tnETOS 377/tcp # NEC Corporation tnETOS 377/udp # /NEC Corporation dsETOS 378/tcp # NEC Corporation dsETOS 378/udp # /NEC Corporation # Tomoo Fujita is99c 379/tcp # TIA/EIA/IS-99 modem client is99c 379/udp # /TIA/EIA/IS-99 modem client is99s 380/tcp # TIA/EIA/IS-99 modem server is99s 380/udp # /TIA/EIA/IS-99 modem server # Frank Quick hp-collector 381/tcp # hp performance data collector hp-collector 381/udp # /hp performance data collector hp-managed-node 382/tcp # hp performance data managed node hp-managed-node 382/udp # /hp performance data managed node hp-alarm-mgr 383/tcp # hp performance data alarm manager hp-alarm-mgr 383/udp # /hp performance data alarm manager # Frank Blakely arns 384/tcp # A Remote Network Server System arns 384/udp # /A Remote Network Server System # David Hornsby ibm-app 385/tcp # IBM Application ibm-app 385/udp # /IBM Application # Lisa Tomita <---none---> asa 386/tcp # ASA Message Router Object Def. asa 386/udp # /ASA Message Router Object Def. # Steve Laitinen aurp 387/tcp # Appletalk Update-Based Routing Pro. aurp 387/udp # /Appletalk Update-Based Routing Pro. # Chris Ranch unidata-ldm 388/tcp # Unidata LDM Version 4 unidata-ldm 388/udp # /Unidata LDM Version 4 # Glenn Davis ldap 389/tcp # Lightweight Directory Access Protocol ldap 389/udp # /Lightweight Directory Access Protocol # Tim Howes uis 390/tcp # UIS uis 390/udp # /UIS # Ed Barron <---none---> synotics-relay 391/tcp # SynOptics SNMP Relay Port synotics-relay 391/udp # /SynOptics SNMP Relay Port synotics-broker 392/tcp # SynOptics Port Broker Port synotics-broker 392/udp # /SynOptics Port Broker Port # Illan Raab dis 393/tcp # Data Interpretation System dis 393/udp # /Data Interpretation System # Paul Stevens embl-ndt 394/tcp # EMBL Nucleic Data Transfer embl-ndt 394/udp # /EMBL Nucleic Data Transfer # Peter Gad netcp 395/tcp # NETscout Control Protocol netcp 395/udp # /NETscout Control Protocol # Anil Singhal <---none---> netware-ip 396/tcp # Novell Netware over IP netware-ip 396/udp # /Novell Netware over IP mptn 397/tcp # Multi Protocol Trans. Net. mptn 397/udp # /Multi Protocol Trans. Net. # Soumitra Sarkar kryptolan 398/tcp # Kryptolan kryptolan 398/udp # /Kryptolan # Peter de Laval iso-tsap-c2 399/tcp # ISO Transport Class 2 Non-Control over TCP iso-tsap-c2 399/udp # /ISO Transport Class 2 Non-Control over TCP # Yanick Pouffary work-sol 400/tcp # Workstation Solutions work-sol 400/udp # /Workstation Solutions # Jim Ward ups 401/tcp # Uninterruptible Power Supply ups 401/udp # /Uninterruptible Power Supply # Charles Bennett genie 402/tcp # Genie Protocol genie 402/udp # /Genie Protocol # Mark Hankin <---none---> decap 403/tcp # decap decap 403/udp # /decap nced 404/tcp # nced nced 404/udp # /nced ncld 405/tcp # ncld ncld 405/udp # /ncld # Richard Jones <---none---> imsp 406/tcp # Interactive Mail Support Protocol imsp 406/udp # /Interactive Mail Support Protocol # John Myers timbuktu 407/tcp # Timbuktu timbuktu 407/udp # /Timbuktu # Marc Epard prm-sm 408/tcp # Prospero Resource Manager Sys. Man. prm-sm 408/udp # /Prospero Resource Manager Sys. Man. prm-nm 409/tcp # Prospero Resource Manager Node Man. prm-nm 409/udp # /Prospero Resource Manager Node Man. # B. Clifford Neuman decladebug 410/tcp # DECLadebug Remote Debug Protocol decladebug 410/udp # /DECLadebug Remote Debug Protocol # Anthony Berent rmt 411/tcp # Remote MT Protocol rmt 411/udp # /Remote MT Protocol # Peter Eriksson synoptics-trap 412/tcp # Trap Convention Port synoptics-trap 412/udp # /Trap Convention Port # Illan Raab smsp 413/tcp # SMSP smsp 413/udp # /SMSP infoseek 414/tcp # InfoSeek infoseek 414/udp # /InfoSeek # Steve Kirsch bnet 415/tcp # BNet bnet 415/udp # /BNet # Jim Mertz silverplatter 416/tcp # Silverplatter silverplatter 416/udp # /Silverplatter # Peter Ciuffetti onmux 417/tcp # Onmux onmux 417/udp # /Onmux # Stephen Hanna hyper-g 418/tcp # Hyper-G hyper-g 418/udp # /Hyper-G # Frank Kappe ariel1 419/tcp # Ariel ariel1 419/udp # /Ariel # Jonathan Lavigne smpte 420/tcp # SMPTE smpte 420/udp # /SMPTE # Si Becker <71362.22@CompuServe.COM> ariel2 421/tcp # Ariel ariel2 421/udp # /Ariel ariel3 422/tcp # Ariel ariel3 422/udp # /Ariel # Jonathan Lavigne opc-job-start 423/tcp # IBM Operations Planning and Control Start opc-job-start 423/udp # /IBM Operations Planning and Control Start opc-job-track 424/tcp # IBM Operations Planning and Control Track opc-job-track 424/udp # /IBM Operations Planning and Control Track # Conny Larsson icad-el 425/tcp # ICAD icad-el 425/udp # /ICAD # Larry Stone smartsdp 426/tcp # smartsdp smartsdp 426/udp # /smartsdp # Alexander Dupuy svrloc 427/tcp # Server Location svrloc 427/udp # /Server Location # ocs_cmu 428/tcp # OCS_CMU ocs_cmu 428/udp # /OCS_CMU ocs_amu 429/tcp # OCS_AMU ocs_amu 429/udp # /OCS_AMU # Florence Wyman utmpsd 430/tcp # UTMPSD utmpsd 430/udp # /UTMPSD utmpcd 431/tcp # UTMPCD utmpcd 431/udp # /UTMPCD iasd 432/tcp # IASD iasd 432/udp # /IASD # Nir Baroz nnsp 433/tcp # NNSP nnsp 433/udp # /NNSP # Rob Robertson mobileip-agent 434/tcp # MobileIP-Agent mobileip-agent 434/udp # /MobileIP-Agent mobilip-mn 435/tcp # MobilIP-MN mobilip-mn 435/udp # /MobilIP-MN # Kannan Alagappan dna-cml 436/tcp # DNA-CML dna-cml 436/udp # /DNA-CML # Dan Flowers comscm 437/tcp # comscm comscm 437/udp # /comscm # Jim Teague dsfgw 438/tcp # dsfgw dsfgw 438/udp # /dsfgw # Andy McKeen dasp 439/tcp # dasp Thomas Obermair dasp 439/udp # /dasp tommy@inlab.m.eunet.de # Thomas Obermair sgcp 440/tcp # sgcp sgcp 440/udp # /sgcp # Marshall Rose decvms-sysmgt 441/tcp # decvms-sysmgt decvms-sysmgt 441/udp # /decvms-sysmgt # Lee Barton cvc_hostd 442/tcp # cvc_hostd cvc_hostd 442/udp # /cvc_hostd # Bill Davidson https 443/tcp # http protocol over TLS/SSL https 443/udp # /http protocol over TLS/SSL # Kipp E.B. Hickman snpp 444/tcp # Simple Network Paging Protocol snpp 444/udp # /Simple Network Paging Protocol # [RFC1568] microsoft-ds 445/tcp # Microsoft-DS microsoft-ds 445/udp # /Microsoft-DS # Pradeep Bahl ddm-rdb 446/tcp # DDM-RDB ddm-rdb 446/udp # /DDM-RDB ddm-dfm 447/tcp # DDM-RFM ddm-dfm 447/udp # /DDM-RFM ddm-byte 448/tcp # DDM-BYTE ddm-byte 448/udp # /DDM-BYTE # Jan David Fisher as-servermap 449/tcp # AS Server Mapper as-servermap 449/udp # /AS Server Mapper # Barbara Foss tserver 450/tcp # TServer tserver 450/udp # /TServer # Harvey S. Schultz sfs-smp-net 451/tcp # Cray Network Semaphore server sfs-smp-net 451/udp # /Cray Network Semaphore server sfs-config 452/tcp # Cray SFS config server sfs-config 452/udp # /Cray SFS config server # Walter Poxon creativeserver 453/tcp # CreativeServer creativeserver 453/udp # /CreativeServer contentserver 454/tcp # ContentServer contentserver 454/udp # /ContentServer creativepartnr 455/tcp # CreativePartnr creativepartnr 455/udp # /CreativePartnr # Jesus Ortiz macon-tcp 456/tcp # macon-tcp macon-udp 456/udp # /macon-udp # Yoshinobu Inoue # scohelp 457/tcp # scohelp scohelp 457/udp # /scohelp # Faith Zack appleqtc 458/tcp # apple quick time appleqtc 458/udp # /apple quick time # Murali Ranganathan ampr-rcmd 459/tcp # ampr-rcmd ampr-rcmd 459/udp # /ampr-rcmd # Rob Janssen skronk 460/tcp # skronk skronk 460/udp # /skronk # Henry Strickland datasurfsrv 461/tcp # DataRampSrv datasurfsrv 461/udp # /DataRampSrv datasurfsrvsec 462/tcp # DataRampSrvSec datasurfsrvsec 462/udp # /DataRampSrvSec # Diane Downie alpes 463/tcp # alpes alpes 463/udp # /alpes # Alain Durand kpasswd 464/tcp # kpasswd kpasswd 464/udp # /kpasswd # Theodore Ts'o smtps 465/tcp # smtp protocol over TLS/SSL (was ssmtp) smtps 465/udp # /smtp protocol over TLS/SSL (was ssmtp) # John Hemming digital-vrc 466/tcp # digital-vrc digital-vrc 466/udp # /digital-vrc # Peter Higginson mylex-mapd 467/tcp # mylex-mapd mylex-mapd 467/udp # /mylex-mapd # Gary Lewis photuris 468/tcp # proturis photuris 468/udp # /proturis # Bill Simpson rcp 469/tcp # Radio Control Protocol rcp 469/udp # /Radio Control Protocol # Jim Jennings +1-708-538-7241 scx-proxy 470/tcp # scx-proxy scx-proxy 470/udp # /scx-proxy # Scott Narveson mondex 471/tcp # Mondex mondex 471/udp # /Mondex # Bill Reding ljk-login 472/tcp # ljk-login ljk-login 472/udp # /ljk-login # LJK Software, Cambridge, Massachusetts # hybrid-pop 473/tcp # hybrid-pop hybrid-pop 473/udp # /hybrid-pop # Rami Rubin tn-tl-w1 474/tcp # tn-tl-w1 tn-tl-w2 474/udp # /tn-tl-w2 # Ed Kress tcpnethaspsrv 475/tcp # tcpnethaspsrv tcpnethaspsrv 475/tcp # tcpnethaspsrv # Charlie Hava tn-tl-fd1 476/tcp # tn-tl-fd1 tn-tl-fd1 476/udp # /tn-tl-fd1 # Ed Kress ss7ns 477/tcp # ss7ns ss7ns 477/udp # /ss7ns # Jean-Michel URSCH spsc 478/tcp # spsc spsc 478/udp # /spsc # Mike Rieker iafserver 479/tcp # iafserver iafserver 479/udp # /iafserver iafdbase 480/tcp # iafdbase iafdbase 480/udp # /iafdbase # ricky@solect.com ph 481/tcp # Ph service ph 481/udp # /Ph service # Roland Hedberg bgs-nsi 482/tcp # bgs-nsi bgs-nsi 482/udp # /bgs-nsi # Jon Saperia ulpnet 483/tcp # ulpnet ulpnet 483/udp # /ulpnet # Kevin Mooney integra-sme 484/tcp # Integra Software Management Environment integra-sme 484/udp # /Integra Software Management Environment # Randall Dow powerburst 485/tcp # Air Soft Power Burst powerburst 485/udp # /Air Soft Power Burst # avian 486/tcp # avian avian 486/udp # /avian # Robert Ullmann # saft 487/tcp # saft Simple Asynchronous File Transfer saft 487/udp # /saft Simple Asynchronous File Transfer # Ulli Horlacher gss-http 488/tcp # gss-http gss-http 488/udp # /gss-http # Doug Rosenthal nest-protocol 489/tcp # nest-protocol nest-protocol 489/udp # /nest-protocol # Gil Gameiro micom-pfs 490/tcp # micom-pfs micom-pfs 490/udp # /micom-pfs # David Misunas go-login 491/tcp # go-login go-login 491/udp # /go-login # Troy Morrison ticf-1 492/tcp # Transport Independent Convergence for FNA ticf-1 492/udp # /Transport Independent Convergence for FNA ticf-2 493/tcp # Transport Independent Convergence for FNA ticf-2 493/udp # /Transport Independent Convergence for FNA # Mamoru Ito pov-ray 494/tcp # POV-Ray pov-ray 494/udp # /POV-Ray # Chris Cason intecourier 495/tcp # intecourier intecourier 495/udp # /intecourier # Steve Favor pim-rp-disc 496/tcp # PIM-RP-DISC pim-rp-disc 496/udp # /PIM-RP-DISC # Dino Farinacci dantz 497/tcp # dantz dantz 497/udp # /dantz # Dotty Yackle siam 498/tcp # siam siam 498/udp # /siam # Philippe Gilbert iso-ill 499/tcp # ISO ILL Protocol iso-ill 499/udp # /ISO ILL Protocol # Mark H. Needleman isakmp 500/tcp # isakmp isakmp 500/udp # /isakmp # Mark Schertler stmf 501/tcp # STMF stmf 501/udp # /STMF # Alan Ungar asa-appl-proto 502/tcp # asa-appl-proto asa-appl-proto 502/udp # /asa-appl-proto # Dennis Dube intrinsa 503/tcp # Intrinsa intrinsa 503/udp # /Intrinsa # Robert Ford citadel 504/tcp # citadel citadel 504/udp # /citadel # Art Cancro mailbox-lm 505/tcp # mailbox-lm mailbox-lm 505/udp # /mailbox-lm Beverly Moody ohimsrv 506/tcp # ohimsrv ohimsrv 506/udp # /ohimsrv # Scott Powell crs 507/tcp # crs crs 507/udp # /crs # Brad Wright xvttp 508/tcp # xvttp xvttp 508/udp # /xvttp # Keith J. Alphonso snare 509/tcp # snare snare 509/udp # /snare # Dennis Batchelder fcp 510/tcp # FirstClass Protocol fcp 510/udp # /FirstClass Protocol # Mike Marshburn mynet 511/tcp # mynet-as mynet 511/udp # /mynet-as # John Rainford exec 512/tcp # remote process execution; # authentication performed using # passwords and UNIX loppgin names comsat 512/udp biff 512/udp # /used by mail system to notify users # of new mail received; currently # receives messages only from # processes on the same machine login 513/tcp # remote login a la telnet; # automatic authentication performed # based on priviledged port numbers # and distributed data bases which # identify "authentication domains" who 513/udp # /maintains data bases showing who's # logged in to machines on a local # net and the load average of the # machine shell 514/tcp # cmd # like exec, but automatic authentication # is performed as for login server syslog 514/udp printer 515/tcp # spooler printer 515/udp # /spooler videotex 516/tcp # videotex videotex 516/udp # /videotex # Daniel Mavrakis talk 517/tcp # like tenex link, but across # machine - unfortunately, doesn't # use link protocol (this is actually # just a rendezvous port from which a # tcp connection is established) talk 517/udp # /like tenex link, but across # machine - unfortunately, doesn't # use link protocol (this is actually # just a rendezvous port from which a # tcp connection is established) ntalk 518/tcp ntalk 518/udp utime 519/tcp # unixtime utime 519/udp # /unixtime efs 520/tcp # extended file name server router 520/udp # /local routing process (on site); # uses variant of Xerox NS routing # information protocol - RIP ripng 521/tcp # ripng ripng 521/udp # /ripng # Robert E. Minnear ulp 522/tcp # ULP ulp 522/udp # /ULP # Max Morris ibm-db2 523/tcp # IBM-DB2 ibm-db2 523/tcp # IBM-DB2 # Peter Pau ncp 524/tcp # NCP ncp 524/udp # /NCP # Don Provan timed 525/tcp # timeserver timed 525/udp # /timeserver tempo 526/tcp # newdate tempo 526/udp # /newdate stx 527/tcp # Stock IXChange stx 527/udp # /Stock IXChange custix 528/tcp # Customer IXChange custix 528/udp # /Customer IXChange # Ralph Hanan irc-serv 529/tcp # IRC-SERV irc-serv 529/tcp # IRC-SERV # Brian Tackett courier 530/tcp # rpc courier 530/udp # /rpc conference 531/tcp # chat conference 531/udp # /chat netnews 532/tcp # readnews netnews 532/udp # /readnews netwall 533/tcp # for emergency broadcasts netwall 533/udp # /for emergency broadcasts mm-admin 534/tcp # MegaMedia Admin mm-admin 534/udp # /MegaMedia Admin # Andreas Heidemann iiop 535/tcp # iiop iiop 535/udp # /iiop # Jeff M.Michaud opalis-rdv 536/tcp # opalis-rdv opalis-rdv 536/udp # /opalis-rdv # Laurent Domenech nmsp 537/tcp # Networked Media Streaming Protocol nmsp 537/udp # /Networked Media Streaming Protocol # Paul Santinelli Jr. gdomap 538/tcp # gdomap gdomap 538/udp # /gdomap # Richard Frith-Macdonald apertus-ldp 539/tcp # Apertus Technologies Load Determination apertus-ldp 539/udp # /Apertus Technologies Load Determination uucp 540/tcp # uucpd uucp 540/udp # /uucpd uucp-rlogin 541/tcp # uucp-rlogin uucp-rlogin 541/udp # /uucp-rlogin # Stuart Lynne commerce 542/tcp # commerce commerce 542/udp # /commerce # Randy Epstein # Alan Bridges klogin 543/tcp klogin 543/udp kshell 544/tcp # krcmd kshell 544/udp # /krcmd appleqtcsrvr 545/tcp # appleqtcsrvr appleqtcsrvr 545/udp # /appleqtcsrvr # Murali Ranganathan # dhcpv6-client 546/tcp # DHCPv6 Client dhcpv6-client 546/udp # /DHCPv6 Client dhcpv6-server 547/tcp # DHCPv6 Server dhcpv6-server 547/udp # /DHCPv6 Server # Jim Bound afpovertcp 548/tcp # AFP over TCP afpovertcp 548/udp # /AFP over TCP # Leland Wallace idfp 549/tcp # IDFP idfp 549/udp # /IDFP # Ramana Kovi new-rwho 550/tcp # new-who new-rwho 550/udp # /new-who cybercash 551/tcp # cybercash cybercash 551/udp # /cybercash # Donald E. Eastlake 3rd deviceshare 552/tcp # deviceshare deviceshare 552/udp # /deviceshare # Brian Schenkenberger pirp 553/tcp # pirp pirp 553/udp # /pirp # D. J. Bernstein rtsp 554/tcp # Real Time Stream Control Protocol rtsp 554/udp # /Real Time Stream Control Protocol # Rob Lanphier dsf 555/tcp dsf 555/udp remotefs 556/tcp # rfs server remotefs 556/udp # /rfs server openvms-sysipc 557/tcp # openvms-sysipc openvms-sysipc 557/udp # /openvms-sysipc # Alan Potter sdnskmp 558/tcp # SDNSKMP sdnskmp 558/udp # /SDNSKMP teedtap 559/tcp # TEEDTAP teedtap 559/udp # /TEEDTAP # Mort Hoffman rmonitor 560/tcp # rmonitord rmonitor 560/udp # /rmonitord monitor 561/tcp monitor 561/udp chshell 562/tcp # chcmd chshell 562/udp # /chcmd nntps 563/tcp # nntp protocol over TLS/SSL (was snntp) nntps 563/udp # /nntp protocol over TLS/SSL (was snntp) # Kipp E.B. Hickman 9pfs 564/tcp # plan 9 file service 9pfs 564/udp # /plan 9 file service whoami 565/tcp # whoami whoami 565/udp # /whoami streettalk 566/tcp # streettalk streettalk 566/udp # /streettalk banyan-rpc 567/tcp # banyan-rpc banyan-rpc 567/udp # /banyan-rpc # Tom Lemaire ms-shuttle 568/tcp # microsoft shuttle ms-shuttle 568/udp # /microsoft shuttle # Rudolph Balaz ms-rome 569/tcp # microsoft rome ms-rome 569/udp # /microsoft rome # Rudolph Balaz meter 570/tcp # demon meter 570/udp # /demon meter 571/tcp # udemon meter 571/udp # /udemon sonar 572/tcp # sonar sonar 572/udp # /sonar # Keith Moore banyan-vip 573/tcp # banyan-vip banyan-vip 573/udp # /banyan-vip # Denis Leclerc ftp-agent 574/tcp # FTP Software Agent System ftp-agent 574/udp # /FTP Software Agent System # Michael S. Greenberg vemmi 575/tcp # VEMMI vemmi 575/udp # /VEMMI # Daniel Mavrakis ipcd 576/tcp # ipcd ipcd 576/udp # /ipcd vnas 577/tcp # vnas vnas 577/udp # /vnas ipdd 578/tcp # ipdd ipdd 578/udp # /ipdd # Jay Farhat decbsrv 579/tcp # decbsrv decbsrv 579/udp # /decbsrv # Rudi Martin sntp-heartbeat 580/tcp # SNTP HEARTBEAT sntp-heartbeat 580/udp SNTP HEARTBEAT # Louis Mamakos bdp 581/tcp # Bundle Discovery Protocol bdp 581/udp Bundle Discovery Protocol # Gary Malkin scc-security 582/tcp # SCC Security scc-security 582/udp SCC Security # Prashant Dholakia philips-vc 583/tcp # Philips Video-Conferencing philips-vc 583/udp # /Philips Video-Conferencing # Janna Chang keyserver 584/tcp # Key Server keyserver 584/udp Key Server # Gary Howland imap4-ssl 585/tcp # IMAP4+SSL (use 993 instead) imap4-ssl 585/udp # /IMAP4+SSL (use 993 instead) # Terry Gray # Use of 585 is not recommended, use 993 instead password-chg 586/tcp # Password Change password-chg 586/udp Password Change submission 587/tcp # Submission submission 587/udp # /Submission # Randy Gellens cal 588/tcp # CAL cal 588/udp # /CAL # Myron Hattig eyelink 589/tcp # EyeLink eyelink 589/udp EyeLink # Dave Stampe tns-cml 590/tcp # TNS CML tns-cml 590/udp # /TNS CML # Jerome Albin fmpro-http 591/tcp # FMPRO4 - HTTP fmpro-http 591/udp # /FMPRO4 - HTTP # Christopher Pratt eudora-set 592/tcp # Eudora Set eudora-set 592/udp Eudora Set # Randall Gellens http-rpc-epmap 593/tcp # HTTP RPC Ep Map http-rpc-epmap 593/tcp # HTTP RPC Ep Map # Edward Reus tpip 594/tcp # TPIP tpip 594/udp # /TPIP # Brad Spear cab-protocol 595/tcp # CAB Protocol cab-protocol 595/udp # /CAB Protocol # Winston Hetherington smsd 596/tcp # SMSD smsd 596/udp # /SMSD # Wayne Barlow ptcnameservice 597/tcp # PTC Name Service ptcnameservice 597/udp # /PTC Name Service # Yuri Machkasov # 598 Unassigned acp 599/tcp # Aeolon Core Protocol acp 599/udp # /Aeolon Core Protocol # Mike Marshburn ipcserver 600/tcp # Sun IPC server ipcserver 600/udp # /Sun IPC server urm 606/tcp # Cray Unified Resource Manager urm 606/udp # /Cray Unified Resource Manager nqs 607/tcp # nqs nqs 607/udp # /nqs n# Bill Schiefelbein sift-uft 608/tcp # Sender-Initiated/Unsolicited File Transfer sift-uft 608/udp # /Sender-Initiated/Unsolicited File Transfer # Rick Troth npmp-trap 609/tcp # npmp-trap npmp-trap 609/udp # /npmp-trap npmp-local 610/tcp # npmp-local npmp-local 610/udp # /npmp-local npmp-gui 611/tcp # npmp-gui npmp-gui 611/udp # /npmp-gui # John Barnes hmmp-ind 612/tcp # HMMP Indication hmmp-ind 612/udp HMMP Indication hmmp-op 613/tcp # HMMP Operation hmmp-op 613/udp HMMP Operation # Andrew Sinclair sshell 614/tcp # SSLshell sshell 614/udp SSLshell # Simon J. Gerraty sco-inetmgr 615/tcp Internet Configuration Manager sco-inetmgr 615/udp # /Internet Configuration Manager sco-sysmgr 616/tcp # SCO System Administration Server sco-sysmgr 616/udp # /SCO System Administration Server sco-dtmgr 617/tcp # SCO Desktop Administration Server sco-dtmgr 617/udp # /SCO Desktop Administration Server # Christopher Durham dei-icda 618/tcp # DEI-ICDA dei-icda 618/udp # /DEI-ICDA # David Turner digital-evm 619/tcp # Digital EVM digital-evm 619/udp # /Digital EVM # Jem Treadwell sco-websrvrmgr 620/tcp # SCO WebServer Manager sco-websrvrmgr 620/udp # /SCO WebServer Manager # Christopher Durham escp-ip 621/tcp # ESCP escp-ip 621/udp # /ESCP # Lai Zit Seng collaborator 622/tcp # Collaborator collaborator 622/udp Collaborator # Johnson Davis aux_bus_shunt 623/tcp # Aux Bus Shunt aux_bus_shunt 623/udp # /Aux Bus Shunt # Steve Williams cryptoadmin 624/tcp # Crypto Admin cryptoadmin 624/udp # /Crypto Admin # Matt Lachance dec_dlm 625/tcp # DEC DLM dec_dlm 625/udp # /DEC DLM # Rudi Martin # 626-632 Unassigned servstat 633/tcp # Service Status update (Sterling Software) servstat 633/udp # /Service Status update (Sterling Software) # Greg Rose ginad 634/tcp # ginad ginad 634/udp # /ginad # Mark Crother rlzdbase 635/tcp # RLZ DBase rlzdbase 635/udp # /RLZ DBase # Michael Ginn ldaps 636/tcp # ldap protocol over TLS/SSL (was sldap) ldaps 636/udp # /ldap protocol over TLS/SSL (was sldap) # Pat Richard lanserver 637/tcp # lanserver lanserver 637/udp # /lanserver # Chris Larsson # 638-665 Unassigned mdqs 666/tcp mdqs 666/udp doom 666/tcp # doom Id Software doom 666/udp # /doom Id Software # disclose 667/tcp # campaign contribution disclosures - SDR Technologies disclose 667/udp # /campaign contribution disclosures - SDR Technologies # Jim Dixon mecomm 668/tcp # MeComm mecomm 668/udp # /MeComm meregister 669/tcp # MeRegister meregister 669/udp # /MeRegister # Armin Sawusch vacdsm-sws 670/tcp # VACDSM-SWS vacdsm-sws 670/udp # /VACDSM-SWS vacdsm-app 671/tcp # VACDSM-APP vacdsm-app 671/udp # /VACDSM-APP vpps-qua 672/tcp # VPPS-QUA vpps-qua 672/udp # /VPPS-QUA cimplex 673/tcp # CIMPLEX cimplex 673/udp # /CIMPLEX # Ulysses G. Smith Jr. acap 674/tcp # ACAP acap 674/udp ACAP # Chris Newman dctp 675/tcp # DCTP dctp 675/udp # /DCTP # Andre Kramer vpps-via 676/tcp # VPPS Via vpps-via 676/udp # /VPPS Via # Ulysses G. Smith Jr. # 677-703 Unassigned elcsd 704/tcp # errlog copy/server daemon elcsd 704/udp # /errlog copy/server daemon agentx 705/tcp # AgentX agentx 705/udp # /AgentX # Bob Natale # 706-708 Unassigned entrust-kmsh 709/tcp # Entrust Key Management Service Handler entrust-kmsh 709/udp # /Entrust Key Management Service Handler entrust-ash 710/tcp # Entrust Administration Service Handler entrust-ash 710/udp # /Entrust Administration Service Handler # Peter Whittaker cisco-tdp 711/tcp # Cisco TDP cisco-tdp 711/udp # /Cisco TDP # Bruce Davie # 712-728 Unassigned netviewdm1 729/tcp # IBM NetView DM/6000 Server/Client netviewdm1 729/udp # /IBM NetView DM/6000 Server/Client netviewdm2 730/tcp # IBM NetView DM/6000 send/tcp netviewdm2 730/udp # /IBM NetView DM/6000 send/tcp netviewdm3 731/tcp # IBM NetView DM/6000 receive/tcp netviewdm3 731/udp # /IBM NetView DM/6000 receive/tcp # Philippe Binet (phbinet@vnet.IBM.COM) netgw 741/tcp # netGW netgw 741/udp # /netGW # Oliver Korfmacher (okorf@netcs.com) netrcs 742/tcp # Network based Rev. Cont. Sys. netrcs 742/udp # /Network based Rev. Cont. Sys. # Gordon C. Galligher flexlm 744/tcp # Flexible License Manager flexlm 744/udp # /Flexible License Manager # Matt Christiano # fujitsu-dev 747/tcp # Fujitsu Device Control fujitsu-dev 747/udp # /Fujitsu Device Control ris-cm 748/tcp # Russell Info Sci Calendar Manager ris-cm 748/udp # /Russell Info Sci Calendar Manager kerberos-adm 749/tcp # kerberos administration kerberos-adm 749/udp # /kerberos administration rfile 750/tcp loadav 750/udp kerberos-iv 750/udp # /kerberos version iv # Martin Hamilton pump 751/tcp pump 751/udp qrh 752/tcp qrh 752/udp rrh 753/tcp rrh 753/udp tell 754/tcp send tell 754/udp send nlogin 758/tcp nlogin 758/udp con 759/tcp con 759/udp ns 760/tcp ns 760/udp rxe 761/tcp rxe 761/udp quotad 762/tcp quotad 762/udp cycleserv 763/tcp cycleserv 763/udp omserv 764/tcp omserv 764/udp webster 765/tcp webster 765/udp phonebook 767/tcp phone phonebook 767/udp phone vid 769/tcp vid 769/udp cadlock 770/tcp cadlock 770/udp rtip 771/tcp rtip 771/udp cycleserv2 772/tcp cycleserv2 772/udp submit 773/tcp notify 773/udp rpasswd 774/tcp acmaint_dbd 774/udp entomb 775/tcp acmaint_transd 775/udp wpages 776/tcp wpages 776/udp wpgs 780/tcp wpgs 780/udp concert 786/tcp # Concert concert 786/udp # /Concert # Josyula R. Rao # 787-799 Unassigned mdbs_daemon 800/tcp mdbs_daemon 800/udp device 801/tcp device 801/udp # 802-828 Unassigned pkix-3-ca-ra 829/tcp # PKIX-3 CA/RA pkix-3-ca-ra 829/tcp # PKIX-3 CA/RA # Carlisle Adams # 830-885 Unassigned iclcnet-locate 886/tcp # ICL coNETion locate server iclcnet-locate 886/udp # /ICL coNETion locate server # Bob Lyon iclcnet_svinfo 887/tcp # ICL coNETion server info iclcnet_svinfo 887/udp # /ICL coNETion server info # Bob Lyon accessbuilder 888/tcp # AccessBuilder accessbuilder 888/udp # /AccessBuilder # Steve Sweeney # The following entry records an unassigned but widespread use cddbp 888/tcp # CD Database Protocol # Steve Scherf # # 889-899 Unassigned omginitialrefs 900/tcp # OMG Initial Refs omginitialrefs 900/udp # /OMG Initial Refs # Christian Callsen # 889-910 Unassigned xact-backup 911/tcp # xact-backup xact-backup 911/tcp # xact-backup # Bill Carroll # 912-988 Unassigned ftps-data 989/tcp # ftp protocol, data, over TLS/SSL ftps-data 989/udp # /ftp protocol, data, over TLS/SSL ftps 990/tcp # ftp protocol, control, over TLS/SSL ftps 990/udp # /ftp protocol, control, over TLS/SSL # Christopher Allen nas 991/tcp # Netnews Administration System nas 991/udp # /Netnews Administration System # Vera Heinau # Heiko Schlichting telnets 992/tcp # telnet protocol over TLS/SSL telnets 992/udp # /telnet protocol over TLS/SSL imaps 993/tcp # imap4 protocol over TLS/SSL imaps 993/udp # /imap4 protocol over TLS/SSL ircs 994/tcp # irc protocol over TLS/SSL ircs 994/udp # /irc protocol over TLS/SSL # Christopher Allen pop3s 995/tcp # pop3 protocol over TLS/SSL (was spop3) pop3s 995/udp # /pop3 protocol over TLS/SSL (was spop3) # Gordon Mangione vsinet 996/tcp # vsinet vsinet 996/udp # /vsinet # Rob Juergens maitrd 997/tcp maitrd 997/udp busboy 998/tcp puparp 998/udp garcon 999/tcp applix 999/udp Applix ac puprouter 999/tcp puprouter 999/udp cadlock 1000/tcp ock 1000/udp # 1001-1022 Unassigned # 1008/udp Possibly used by Sun Solaris???? 1023/tcp # Reserved 1023/udp # / Reserved # IANA netdiag-1.2/statnet-3.8/services.c000066400000000000000000001132001323731111400167370ustar00rootroot00000000000000/* services.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: 15DEC95: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* 09JAN98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* Added reading of /etc/services. */ /* This routine initializes the names for port numbers. */ /* These are from RFC 1700, "Assigned Numbers", which are from hither and yon. */ /* The /etc/services entries override respective entries. */ #include "stat.h" #include "inetprivate.h" #include void services () { extern struct StatMemStruct *StatMem; int temp_int; u_short temp_proto; u_short temp_port; struct servent *serv; /* info from /etc/services */ struct protoent *proto; /* info from /etc/protocols */ #if( defined(SN_MAX_IP_PORT) ) for (temp_int = 0; temp_int <= SN_MAX_IP_PORT; temp_int++) { /* Put port number as default label for all ports */ sprintf (ip_protocol_types[temp_int], "%d:", temp_int); } /* Put port number as default label for all ports */ strncpy (ip_protocol_types[1], "ICMP:", SN_PORT_TYPE_LEN); /* Internet Control Message [RFC792,JBP] */ strncpy (ip_protocol_types[2], "IGMP:", SN_PORT_TYPE_LEN); /* Internet Group Management [RFC1112,JBP] */ strncpy (ip_protocol_types[3], "GGP:", SN_PORT_TYPE_LEN); /* Gateway-to-Gateway [RFC823,MB] */ strncpy (ip_protocol_types[4], "IP:", SN_PORT_TYPE_LEN); /* IP in IP (encasulation) [JBP] */ strncpy (ip_protocol_types[5], "ST:", SN_PORT_TYPE_LEN); /* Stream [RFC1190,IEN119,JWF] */ strncpy (ip_protocol_types[6], "TCP:", SN_PORT_TYPE_LEN); /* Transmission Control [RFC793,JBP] */ strncpy (ip_protocol_types[7], "UCL:", SN_PORT_TYPE_LEN); /* UCL [PK] */ strncpy (ip_protocol_types[8], "EGP:", SN_PORT_TYPE_LEN); /* Exterior Gateway Protocol [RFC888,DLM1] */ strncpy (ip_protocol_types[9], "IGP:", SN_PORT_TYPE_LEN); /* any private interior gateway [JBP] */ strncpy (ip_protocol_types[10], "BBN-RCC-MON:", SN_PORT_TYPE_LEN); /* BBN RCC Monitoring [SGC] */ strncpy (ip_protocol_types[11], "NVP-II:", SN_PORT_TYPE_LEN); /* Network Voice Protocol [RFC741,SC3] */ strncpy (ip_protocol_types[12], "PUP:", SN_PORT_TYPE_LEN); /* PUP [PUP,XEROX] */ strncpy (ip_protocol_types[13], "ARGUS:", SN_PORT_TYPE_LEN); /* ARGUS [RWS4] */ strncpy (ip_protocol_types[14], "EMCON:", SN_PORT_TYPE_LEN); /* EMCON [BN7] */ strncpy (ip_protocol_types[15], "XNET:", SN_PORT_TYPE_LEN); /* Cross Net Debugger [IEN158,JFH2] */ strncpy (ip_protocol_types[16], "CHAOS:", SN_PORT_TYPE_LEN); /* Chaos [NC3] */ strncpy (ip_protocol_types[17], "UDP:", SN_PORT_TYPE_LEN); /* User Datagram [RFC768,JBP] */ strncpy (ip_protocol_types[18], "MUX:", SN_PORT_TYPE_LEN); /* Multiplexing [IEN90,JBP] */ strncpy (ip_protocol_types[19], "DCN-MEAS:", SN_PORT_TYPE_LEN); /* DCN Measurement Subsystems [DLM1] */ strncpy (ip_protocol_types[20], "HMP:", SN_PORT_TYPE_LEN); /* Host Monitoring [RFC869,RH6] */ strncpy (ip_protocol_types[21], "PRM:", SN_PORT_TYPE_LEN); /* Packet Radio Measurement [ZSU] */ strncpy (ip_protocol_types[22], "XNS-IDP:", SN_PORT_TYPE_LEN); /* XEROX NS IDP [ETHERNET,XEROX] */ strncpy (ip_protocol_types[23], "TRUNK-1:", SN_PORT_TYPE_LEN); /* Trunk-1 [BWB6] */ strncpy (ip_protocol_types[24], "TRUNK-2:", SN_PORT_TYPE_LEN); /* Trunk-2 [BWB6] */ strncpy (ip_protocol_types[25], "LEAF-1:", SN_PORT_TYPE_LEN); /* Leaf-1 [BWB6] */ strncpy (ip_protocol_types[26], "LEAF-2:", SN_PORT_TYPE_LEN); /* Leaf-2 [BWB6] */ strncpy (ip_protocol_types[27], "RDP:", SN_PORT_TYPE_LEN); /* Reliable Data Protocol [RFC908,RH6] */ strncpy (ip_protocol_types[28], "IRTP:", SN_PORT_TYPE_LEN); /* Internet Reliable Transaction [RFC938,TXM] */ strncpy (ip_protocol_types[29], "ISO-TP4:", SN_PORT_TYPE_LEN); /* ISO Transport Protocol Class 4 [RFC905,RC77] */ strncpy (ip_protocol_types[30], "NETBLT:", SN_PORT_TYPE_LEN); /* Bulk Data Transfer Protocol [RFC969,DDC1] */ strncpy (ip_protocol_types[31], "MFE-NSP:", SN_PORT_TYPE_LEN); /* MFE Network Services Protocol [MFENET,BCH2] */ strncpy (ip_protocol_types[32], "MERIT-INP:", SN_PORT_TYPE_LEN); /* MERIT Internodal Protocol [HWB] */ strncpy (ip_protocol_types[33], "SEP:", SN_PORT_TYPE_LEN); /* Sequential Exchange Protocol [JC120] */ strncpy (ip_protocol_types[34], "PC:", SN_PORT_TYPE_LEN); /* Third Party Connect Protocol [SAF3] */ strncpy (ip_protocol_types[35], "IDPR:", SN_PORT_TYPE_LEN); /* Inter-Domain Policy Routing Protocol [MXS1] */ strncpy (ip_protocol_types[36], "XTP:", SN_PORT_TYPE_LEN); /* XTP [GXC] */ strncpy (ip_protocol_types[37], "DDP:", SN_PORT_TYPE_LEN); /* Datagram Delivery Protocol [WXC] */ strncpy (ip_protocol_types[38], "IDPR-CMTP:", SN_PORT_TYPE_LEN); /* IDPR Control Message Transport Proto [MXS1] */ strncpy (ip_protocol_types[39], "TP++:", SN_PORT_TYPE_LEN); /* TP++ Transport Protocol [DXF] */ strncpy (ip_protocol_types[40], "IL:", SN_PORT_TYPE_LEN); /* IL Transport Protocol [DXP2] */ strncpy (ip_protocol_types[41], "SIP:", SN_PORT_TYPE_LEN); /* Simple Internet Protocol [SXD] */ strncpy (ip_protocol_types[42], "SDRP:", SN_PORT_TYPE_LEN); /* Source Demand Routing Protocol [DXE1] */ strncpy (ip_protocol_types[43], "SIP-SR:", SN_PORT_TYPE_LEN); /* SIP Source Route [SXD] */ strncpy (ip_protocol_types[44], "SIP-FRAG:", SN_PORT_TYPE_LEN); /* SIP Fragment [SXD] */ strncpy (ip_protocol_types[45], "IDRP:", SN_PORT_TYPE_LEN); /* Inter-Domain Routing Protocol [Sue Hares] */ strncpy (ip_protocol_types[46], "RSVP:", SN_PORT_TYPE_LEN); /* Reservation Protocol [Bob Braden] */ strncpy (ip_protocol_types[47], "GRE:", SN_PORT_TYPE_LEN); /* General Routing Encapsulation [Tony Li] */ strncpy (ip_protocol_types[48], "MHRP:", SN_PORT_TYPE_LEN); /* Mobile Host Routing Protocol[David Johnson] */ strncpy (ip_protocol_types[49], "BNA:", SN_PORT_TYPE_LEN); /* BNA [Gary Salamon] */ strncpy (ip_protocol_types[50], "SIPP-ESP:", SN_PORT_TYPE_LEN); /* SIPP Encap Security Payload [Steve Deering] */ strncpy (ip_protocol_types[51], "SIPP-AH:", SN_PORT_TYPE_LEN); /* SIPP Authentication Header [Steve Deering] */ strncpy (ip_protocol_types[52], "I-NLSP:", SN_PORT_TYPE_LEN); /* Integrated Net Layer Security TUBA [GLENN] */ strncpy (ip_protocol_types[53], "SWIPE:", SN_PORT_TYPE_LEN); /* IP with Encryption [JI6] */ strncpy (ip_protocol_types[54], "NHRP:", SN_PORT_TYPE_LEN); /* NBMA Next Hop Resolution Protocol */ strncpy (ip_protocol_types[61], "anyhost:", SN_PORT_TYPE_LEN); /* any host internal protocol [JBP] */ strncpy (ip_protocol_types[62], "CFTP:", SN_PORT_TYPE_LEN); /* CFTP [CFTP,HCF2] */ strncpy (ip_protocol_types[63], "anylan:", SN_PORT_TYPE_LEN); /* any local network [JBP] */ strncpy (ip_protocol_types[64], "SAT-EXPAK:", SN_PORT_TYPE_LEN); /* SATNET and Backroom EXPAK [SHB] */ strncpy (ip_protocol_types[65], "KRYPTOLAN:", SN_PORT_TYPE_LEN); /* Kryptolan [PXL1] */ strncpy (ip_protocol_types[66], "RVD:", SN_PORT_TYPE_LEN); /* MIT Remote Virtual Disk Protocol [MBG] */ strncpy (ip_protocol_types[67], "IPPC:", SN_PORT_TYPE_LEN); /* Internet Pluribus Packet Core [SHB] */ strncpy (ip_protocol_types[68], "dfs:", SN_PORT_TYPE_LEN); /* any distributed file system [JBP] */ strncpy (ip_protocol_types[69], "SAT-MON:", SN_PORT_TYPE_LEN); /* SATNET Monitoring [SHB] */ strncpy (ip_protocol_types[70], "VISA:", SN_PORT_TYPE_LEN); /* VISA Protocol [GXT1] */ strncpy (ip_protocol_types[71], "IPCV:", SN_PORT_TYPE_LEN); /* Internet Packet Core Utility [SHB] */ strncpy (ip_protocol_types[72], "CPNX:", SN_PORT_TYPE_LEN); /* Computer Protocol Network Executive [DXM2] */ strncpy (ip_protocol_types[73], "CPHB:", SN_PORT_TYPE_LEN); /* Computer Protocol Heart Beat [DXM2] */ strncpy (ip_protocol_types[74], "WSN:", SN_PORT_TYPE_LEN); /* Wang Span Network [VXD] */ strncpy (ip_protocol_types[75], "PVP:", SN_PORT_TYPE_LEN); /* Packet Video Protocol [SC3] */ strncpy (ip_protocol_types[76], "BR-SAT-MON:", SN_PORT_TYPE_LEN); /* Backroom SATNET Monitoring [SHB] */ strncpy (ip_protocol_types[77], "SUN-ND:", SN_PORT_TYPE_LEN); /* SUN ND PROTOCOL-Temporary [WM3] */ strncpy (ip_protocol_types[78], "WB-MON:", SN_PORT_TYPE_LEN); /* WIDEBAND Monitoring [SHB] */ strncpy (ip_protocol_types[79], "WB-EXPAK:", SN_PORT_TYPE_LEN); /* WIDEBAND EXPAK [SHB] */ strncpy (ip_protocol_types[80], "ISO-IP:", SN_PORT_TYPE_LEN); /* ISO Internet Protocol [MTR] */ strncpy (ip_protocol_types[81], "VMTP:", SN_PORT_TYPE_LEN); /* VMTP [DRC3] */ strncpy (ip_protocol_types[82], "SECURE-VMTP:", SN_PORT_TYPE_LEN); /* SECURE-VMTP [DRC3] */ strncpy (ip_protocol_types[83], "VINES:", SN_PORT_TYPE_LEN); /* VINES [BXH] */ strncpy (ip_protocol_types[84], "TTP:", SN_PORT_TYPE_LEN); /* TTP [JXS] */ strncpy (ip_protocol_types[85], "NSFNET-IGP:", SN_PORT_TYPE_LEN); /* NSFNET-IGP [HWB] */ strncpy (ip_protocol_types[86], "DGP:", SN_PORT_TYPE_LEN); /* Dissimilar Gateway Protocol [DGP,ML109] */ strncpy (ip_protocol_types[87], "TCF:", SN_PORT_TYPE_LEN); /* TCF [GAL5] */ strncpy (ip_protocol_types[88], "IGRP:", SN_PORT_TYPE_LEN); /* IGRP [CISCO,GXS] */ strncpy (ip_protocol_types[89], "OSPFIGP:", SN_PORT_TYPE_LEN); /* OSPFIGP [RFC1583,JTM4] */ strncpy (ip_protocol_types[90], "Sprite-RPC:", SN_PORT_TYPE_LEN); /* Sprite RPC Protocol [SPRITE,BXW] */ strncpy (ip_protocol_types[91], "LARP:", SN_PORT_TYPE_LEN); /* Locus Address Resolution Protocol [BXH] */ strncpy (ip_protocol_types[92], "MTP:", SN_PORT_TYPE_LEN); /* Multicast Transport Protocol [SXA] */ strncpy (ip_protocol_types[93], "AX.25:", SN_PORT_TYPE_LEN); /* AX.25 Frames [BK29] */ strncpy (ip_protocol_types[94], "IPIP:", SN_PORT_TYPE_LEN); /* IP-within-IP Encapsulation Protocol [JI6] */ strncpy (ip_protocol_types[95], "MICP:", SN_PORT_TYPE_LEN); /* Mobile Internetworking Control Pro. [JI6] */ strncpy (ip_protocol_types[96], "SCC-SP:", SN_PORT_TYPE_LEN); /* Semaphore Communications Sec. Pro. [HXH] */ strncpy (ip_protocol_types[97], "ETHERIP:", SN_PORT_TYPE_LEN); /* Ethernet-within-IP Encapsulation [RXH1] */ strncpy (ip_protocol_types[98], "ENCAP:", SN_PORT_TYPE_LEN); /* Encapsulation Header [RFC1241,RXB3] */ strncpy (ip_protocol_types[99], "encrypt:", SN_PORT_TYPE_LEN); /* any private encryption scheme [JBP] */ strncpy (ip_protocol_types[100], "GMTP:", SN_PORT_TYPE_LEN); /* GMTP [RXB5] */ #endif #if( defined(SN_MAX_UDP_PORTS) ) for (temp_int = 0; temp_int <= SN_MAX_UDP_PORTS; temp_int++) { /* Put port number as default label for all ports */ sprintf (udp_port_types[temp_int], "%d:", temp_int); } /* Put port number as default label for all ports */ #endif #if( defined(SN_MAX_TCP_PORTS) ) for (temp_int = 0; temp_int <= SN_MAX_TCP_PORTS; temp_int++) { /* Put port number as default label for all ports */ sprintf (tcp_port_types[temp_int], "%d:", temp_int); } /* Put port number as default label for all ports */ #if( SN_MAX_TCP_PORTS > 6063 ) strncpy (tcp_port_types[6000 - 6063], "x11:", SN_PORT_TYPE_LEN); for (temp_int = 6000; temp_int < 6064; temp_int++) { /* Label the X11 Windows port range */ sprintf (tcp_port_types[temp_int], "X11"); #if( defined(SN_MAX_UDP_PORTS) ) #if( SN_MAX_UDP_PORTS > 6063 ) sprintf (udp_port_types[temp_int], "X11"); #endif #endif } /* Label the X11 Windows port range */ #endif #endif #if( defined(SN_MAX_TCP_PORTS) ) #if( SN_MAX_TCP_PORTS > 0 ) strncpy (tcp_port_types[0], "fragment ", SN_PORT_TYPE_LEN); #endif #endif #if( defined(SN_MAX_UDP_PORTS) ) #if( SN_MAX_UDP_PORTS > 0 ) strncpy (udp_port_types[0], "fragment ", SN_PORT_TYPE_LEN); #endif #endif #if( defined(SN_MAX_SAP) ) #if( SN_MAX_SAP >= 256 ) for (temp_int = 0; temp_int < SN_MAX_SAP + 1; temp_int++) { /* Put number as default label for all */ sprintf (sap_port_types[temp_int], "0x%02X:", temp_int); } /* Put number as default label for all */ /* The SAP numbers came from someplace on the Web, called */ /* cisco-lsap-list.txt */ /* ieee-lsap-list.txt */ /* The low bit is a group address flag, and odd-numbered addresses */ /* have been added to allow clearer labeling of what's seen. */ /* IEEE - Administered LSAPs */ strncpy (sap_port_types[0x00], "Null:", SN_PORT_TYPE_LEN); /* Null LSAP */ strncpy (sap_port_types[0x01], "Null grp:", SN_PORT_TYPE_LEN); strncpy (sap_port_types[0x02], "LLC Mgt:", SN_PORT_TYPE_LEN); /* Individual LLC Sublayer Mgmt Function */ strncpy (sap_port_types[0x03], "LLCgMgt:", SN_PORT_TYPE_LEN); /* Group LLC Sublayer Mgmt Function */ strncpy (sap_port_types[0x06], "IP:", SN_PORT_TYPE_LEN); /* ARPANET Internet Protocol (IP) */ strncpy (sap_port_types[0x07], "IP grp:", SN_PORT_TYPE_LEN); /* ARPANET Internet Protocol (IP) */ strncpy (sap_port_types[0x0E], "PROWAY Mgt:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Network Mgmt & Initialization */ strncpy (sap_port_types[0x0F], "PROWAYgMgt:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Network Mgmt & Initialization */ strncpy (sap_port_types[0x42], "SpanTree:", SN_PORT_TYPE_LEN); /* IEEE 802.1 Bridge Spanning Tree Protocol */ strncpy (sap_port_types[0x43], "SpanT grp:", SN_PORT_TYPE_LEN); /* IEEE 802.1 Bridge Spanning Tree Protocol */ strncpy (sap_port_types[0x4E], "ManMsg:", SN_PORT_TYPE_LEN); /* EIA RS-511 Manufacturing Message Service */ strncpy (sap_port_types[0x4F], "ManMsg grp:", SN_PORT_TYPE_LEN); /* EIA RS-511 Manufacturing Message Service */ strncpy (sap_port_types[0x7E], "X.25:", SN_PORT_TYPE_LEN); /* ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) */ strncpy (sap_port_types[0x7F], "X.25 grp:", SN_PORT_TYPE_LEN); /* ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) */ strncpy (sap_port_types[0x8E], "POWAY Stn:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Active Station List Maintenance */ strncpy (sap_port_types[0x8F], "POWAYgStn:", SN_PORT_TYPE_LEN); /* PROWAY (IEC955) Active Station List Maintenance */ strncpy (sap_port_types[0xAA], "SNAP:", SN_PORT_TYPE_LEN); /* Sub-Network Access Protocol (SNAP) */ strncpy (sap_port_types[0xAB], "SNAP grp:", SN_PORT_TYPE_LEN); /* Sub-Network Access Protocol (SNAP) */ strncpy (sap_port_types[0xFE], "ISO Net:", SN_PORT_TYPE_LEN); /* ISO Network Layer Protocol */ strncpy (sap_port_types[0xFF], "Global:", SN_PORT_TYPE_LEN); /* Global LSAP */ /* Manufacturer-Implemented LSAPs */ strncpy (sap_port_types[0x04], "SNA:", SN_PORT_TYPE_LEN); /* IBM SNA Path Control (individual) */ strncpy (sap_port_types[0x05], "SNA grp:", SN_PORT_TYPE_LEN); /* IBM SNA Path Control (group) */ strncpy (sap_port_types[0x18], "TI:", SN_PORT_TYPE_LEN); /* Texas Instruments */ strncpy (sap_port_types[0x19], "TI grp:", SN_PORT_TYPE_LEN); /* Texas Instruments */ strncpy (sap_port_types[0x80], "XNS:", SN_PORT_TYPE_LEN); /* Xerox Network Systems (XNS) */ strncpy (sap_port_types[0x81], "XNS grp:", SN_PORT_TYPE_LEN); /* Xerox Network Systems (XNS) */ strncpy (sap_port_types[0x86], "Nestar:", SN_PORT_TYPE_LEN); /* Nestar */ strncpy (sap_port_types[0x87], "Nestar grp:", SN_PORT_TYPE_LEN); /* Nestar */ strncpy (sap_port_types[0x98], "ARP:", SN_PORT_TYPE_LEN); /* ARPANET Address Resolution Protocol (ARP) */ strncpy (sap_port_types[0x99], "ARP grp:", SN_PORT_TYPE_LEN); /* ARPANET Address Resolution Protocol (ARP) */ strncpy (sap_port_types[0xBC], "VINES:", SN_PORT_TYPE_LEN); /* Banyan VINES */ strncpy (sap_port_types[0xBD], "VINES grp:", SN_PORT_TYPE_LEN); /* Banyan VINES */ strncpy (sap_port_types[0xE0], "NetWare:", SN_PORT_TYPE_LEN); /* Novell Netware */ strncpy (sap_port_types[0xE1], "NetW grp:", SN_PORT_TYPE_LEN); /* Novell Netware */ strncpy (sap_port_types[0xF0], "NetBIOS:", SN_PORT_TYPE_LEN); /* IBM NetBIOS */ strncpy (sap_port_types[0xF1], "NetB grp:", SN_PORT_TYPE_LEN); /* IBM NetBIOS */ strncpy (sap_port_types[0xF4], "LAN Mgt:", SN_PORT_TYPE_LEN); /* IBM LAN Management (individual) */ strncpy (sap_port_types[0xF5], "LANgMgt:", SN_PORT_TYPE_LEN); /* IBM LAN Management (group) */ strncpy (sap_port_types[0xF8], "RPL:", SN_PORT_TYPE_LEN); /* IBM Remote Program Load (RPL) */ strncpy (sap_port_types[0xF9], "RPL grp:", SN_PORT_TYPE_LEN); /* IBM Remote Program Load (RPL) */ strncpy (sap_port_types[0xFA], "UB:", SN_PORT_TYPE_LEN); /* Ungermann-Bass */ strncpy (sap_port_types[0xFB], "UB grp:", SN_PORT_TYPE_LEN); /* Ungermann-Bass */ /* further mysteries... */ strncpy (sap_port_types[0x0C], "xSNA:", SN_PORT_TYPE_LEN); /* SNA */ strncpy (sap_port_types[0x0D], "xSNA grp:", SN_PORT_TYPE_LEN); /* SNA */ strncpy (sap_port_types[0x10], "xNetWare:", SN_PORT_TYPE_LEN); /* Netware */ strncpy (sap_port_types[0x11], "xNetW grp:", SN_PORT_TYPE_LEN); /* Netware */ strncpy (sap_port_types[0xFC], "xRPL:", SN_PORT_TYPE_LEN); /* RPL */ strncpy (sap_port_types[0xFD], "xRPL grp:", SN_PORT_TYPE_LEN); /* RPL */ #endif #endif #if( defined(SN_MAX_PROTO_DESC) ) #if( SN_MAX_PROTO_DESC >= 200 ) for (temp_int = 0; temp_int < SN_MAX_PROTO_DESC + 1; temp_int++) { /* Put number as default label for all */ protocol_num[temp_int] = 0; sprintf (protocol_types[temp_int], "%d", temp_int); } /* Put number as default label for all */ protocol_num[0] = 0x0000; strncpy (protocol_types[0], "0", SN_PORT_TYPE_LEN); protocol_num[1] = 0x0101; strncpy (protocol_types[1], "Experimental", SN_PORT_TYPE_LEN); protocol_num[2] = 0x0200; strncpy (protocol_types[2], "XEROX PUP", SN_PORT_TYPE_LEN); protocol_num[3] = 0x0201; strncpy (protocol_types[3], "PUP Addr Trans", SN_PORT_TYPE_LEN); protocol_num[4] = 0x0400; strncpy (protocol_types[4], "Nixdorf", SN_PORT_TYPE_LEN); protocol_num[5] = 0x0600; strncpy (protocol_types[5], "XEROX NS IDP", SN_PORT_TYPE_LEN); protocol_num[6] = 0x0660; strncpy (protocol_types[6], "DLOG", SN_PORT_TYPE_LEN); protocol_num[7] = 0x0661; strncpy (protocol_types[7], "DLOG", SN_PORT_TYPE_LEN); protocol_num[8] = 0x0800; strncpy (protocol_types[8], "Ethernet", SN_PORT_TYPE_LEN); protocol_num[9] = 0x0801; strncpy (protocol_types[9], "X.75", SN_PORT_TYPE_LEN); protocol_num[10] = 0x0802; strncpy (protocol_types[10], "NBS", SN_PORT_TYPE_LEN); protocol_num[11] = 0x0803; strncpy (protocol_types[11], "ECMA", SN_PORT_TYPE_LEN); protocol_num[12] = 0x0804; strncpy (protocol_types[12], "Chaosnet", SN_PORT_TYPE_LEN); protocol_num[13] = 0x0805; strncpy (protocol_types[13], "X.25", SN_PORT_TYPE_LEN); protocol_num[14] = 0x0806; strncpy (protocol_types[14], "ARP", SN_PORT_TYPE_LEN); protocol_num[15] = 0x0807; strncpy (protocol_types[15], "XNS Compat", SN_PORT_TYPE_LEN); protocol_num[16] = 0x081C; strncpy (protocol_types[16], "Symbolics", SN_PORT_TYPE_LEN); protocol_num[17] = 0x0888; strncpy (protocol_types[17], "Xyplex", SN_PORT_TYPE_LEN); protocol_num[18] = 0x0900; strncpy (protocol_types[18], "UB netdebug", SN_PORT_TYPE_LEN); protocol_num[19] = 0x0A00; strncpy (protocol_types[19], "IEEE802.3 PUP", SN_PORT_TYPE_LEN); protocol_num[20] = 0x0A01; strncpy (protocol_types[20], "PUP Addr Trans", SN_PORT_TYPE_LEN); protocol_num[21] = 0x0BAD; strncpy (protocol_types[21], "VINES", SN_PORT_TYPE_LEN); protocol_num[22] = 0x1000; strncpy (protocol_types[22], "Berk Trailer neg", SN_PORT_TYPE_LEN); protocol_num[23] = 0x1001; strncpy (protocol_types[23], "Berk Trailer encap/IP", SN_PORT_TYPE_LEN); protocol_num[24] = 0x1600; strncpy (protocol_types[24], "Valid Sys", SN_PORT_TYPE_LEN); protocol_num[25] = 0x4242; strncpy (protocol_types[25], "PCS Basic Block Protocol", SN_PORT_TYPE_LEN); protocol_num[26] = 0x5208; strncpy (protocol_types[26], "BBN Simnet", SN_PORT_TYPE_LEN); protocol_num[27] = 0x6000; strncpy (protocol_types[27], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[28] = 0x6001; strncpy (protocol_types[28], "DEC MOP Dump/Load", SN_PORT_TYPE_LEN); protocol_num[29] = 0x6002; strncpy (protocol_types[29], "DEC MOP Remote Console", SN_PORT_TYPE_LEN); protocol_num[30] = 0x6003; strncpy (protocol_types[30], "DEC DECNET Phase IV Route", SN_PORT_TYPE_LEN); protocol_num[31] = 0x6004; strncpy (protocol_types[31], "DEC LAT", SN_PORT_TYPE_LEN); protocol_num[32] = 0x6005; strncpy (protocol_types[32], "DEC Diag", SN_PORT_TYPE_LEN); protocol_num[33] = 0x6006; strncpy (protocol_types[33], "DEC Customer", SN_PORT_TYPE_LEN); protocol_num[34] = 0x6007; strncpy (protocol_types[34], "DEC LAVC, SCA", SN_PORT_TYPE_LEN); protocol_num[35] = 0x6008; strncpy (protocol_types[35], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[36] = 0x6010; strncpy (protocol_types[36], "3Com", SN_PORT_TYPE_LEN); protocol_num[37] = 0x7000; strncpy (protocol_types[37], "UB downld", SN_PORT_TYPE_LEN); protocol_num[38] = 0x7002; strncpy (protocol_types[38], "UB dia/loop", SN_PORT_TYPE_LEN); protocol_num[39] = 0x7020; strncpy (protocol_types[39], "LRT", SN_PORT_TYPE_LEN); protocol_num[40] = 0x7030; strncpy (protocol_types[40], "Proteon", SN_PORT_TYPE_LEN); protocol_num[41] = 0x7034; strncpy (protocol_types[41], "Cabletron", SN_PORT_TYPE_LEN); protocol_num[42] = 0x8003; strncpy (protocol_types[42], "Cronus VLN", SN_PORT_TYPE_LEN); protocol_num[43] = 0x8004; strncpy (protocol_types[43], "Cronus Direct", SN_PORT_TYPE_LEN); protocol_num[44] = 0x8005; strncpy (protocol_types[44], "HP Probe", SN_PORT_TYPE_LEN); protocol_num[45] = 0x8006; strncpy (protocol_types[45], "Nestar", SN_PORT_TYPE_LEN); protocol_num[46] = 0x8008; strncpy (protocol_types[46], "AT&T", SN_PORT_TYPE_LEN); protocol_num[47] = 0x8010; strncpy (protocol_types[47], "Excelan", SN_PORT_TYPE_LEN); protocol_num[48] = 0x8013; strncpy (protocol_types[48], "SGI diagnostics", SN_PORT_TYPE_LEN); protocol_num[49] = 0x8014; strncpy (protocol_types[49], "SGI net games", SN_PORT_TYPE_LEN); protocol_num[50] = 0x8015; strncpy (protocol_types[50], "SGI reserved", SN_PORT_TYPE_LEN); protocol_num[51] = 0x8016; strncpy (protocol_types[51], "SGI bounce server", SN_PORT_TYPE_LEN); protocol_num[52] = 0x8019; strncpy (protocol_types[52], "Apollo", SN_PORT_TYPE_LEN); protocol_num[53] = 0x802E; strncpy (protocol_types[53], "Tymshare", SN_PORT_TYPE_LEN); protocol_num[54] = 0x802F; strncpy (protocol_types[54], "Tigan", SN_PORT_TYPE_LEN); protocol_num[55] = 0x8035; strncpy (protocol_types[55], "RARP", SN_PORT_TYPE_LEN); protocol_num[56] = 0x8036; strncpy (protocol_types[56], "Aeonic Systems", SN_PORT_TYPE_LEN); protocol_num[57] = 0x8038; strncpy (protocol_types[57], "DEC LANBridge", SN_PORT_TYPE_LEN); protocol_num[58] = 0x8039; strncpy (protocol_types[58], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[59] = 0x803D; strncpy (protocol_types[59], "DEC Encryption", SN_PORT_TYPE_LEN); protocol_num[60] = 0x803E; strncpy (protocol_types[60], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[61] = 0x803F; strncpy (protocol_types[61], "DEC LAN Monitor", SN_PORT_TYPE_LEN); protocol_num[62] = 0x8040; strncpy (protocol_types[62], "DEC Unassigned", SN_PORT_TYPE_LEN); protocol_num[63] = 0x8044; strncpy (protocol_types[63], "Planning Research", SN_PORT_TYPE_LEN); protocol_num[64] = 0x8046; strncpy (protocol_types[64], "AT&T", SN_PORT_TYPE_LEN); protocol_num[65] = 0x8047; strncpy (protocol_types[65], "AT&T", SN_PORT_TYPE_LEN); protocol_num[66] = 0x8049; strncpy (protocol_types[66], "ExperData", SN_PORT_TYPE_LEN); protocol_num[67] = 0x805B; strncpy (protocol_types[67], "Stanford V Kernel exp.", SN_PORT_TYPE_LEN); protocol_num[68] = 0x805C; strncpy (protocol_types[68], "Stanford V Kernel prod.", SN_PORT_TYPE_LEN); protocol_num[69] = 0x805D; strncpy (protocol_types[69], "Evans & Sutherland", SN_PORT_TYPE_LEN); protocol_num[70] = 0x8060; strncpy (protocol_types[70], "Little Machines", SN_PORT_TYPE_LEN); protocol_num[71] = 0x8062; strncpy (protocol_types[71], "Counterpoint", SN_PORT_TYPE_LEN); protocol_num[72] = 0x8065; strncpy (protocol_types[72], "Univ. of Mass. @ Amherst", SN_PORT_TYPE_LEN); protocol_num[73] = 0x8066; strncpy (protocol_types[73], "Univ. of Mass. @ Amherst", SN_PORT_TYPE_LEN); protocol_num[74] = 0x8067; strncpy (protocol_types[74], "Veeco Integrated Auto.", SN_PORT_TYPE_LEN); protocol_num[75] = 0x8068; strncpy (protocol_types[75], "General Dynamics", SN_PORT_TYPE_LEN); protocol_num[76] = 0x8069; strncpy (protocol_types[76], "AT&T", SN_PORT_TYPE_LEN); protocol_num[77] = 0x806A; strncpy (protocol_types[77], "Autophon", SN_PORT_TYPE_LEN); protocol_num[78] = 0x806C; strncpy (protocol_types[78], "ComDesign", SN_PORT_TYPE_LEN); protocol_num[79] = 0x806D; strncpy (protocol_types[79], "Computgraphic", SN_PORT_TYPE_LEN); protocol_num[80] = 0x806E; strncpy (protocol_types[80], "Landmark Graphics", SN_PORT_TYPE_LEN); protocol_num[81] = 0x807A; strncpy (protocol_types[81], "Matra", SN_PORT_TYPE_LEN); protocol_num[82] = 0x807B; strncpy (protocol_types[82], "Dansk Data Elektronik", SN_PORT_TYPE_LEN); protocol_num[83] = 0x807C; strncpy (protocol_types[83], "Merit Internodal", SN_PORT_TYPE_LEN); protocol_num[84] = 0x807D; strncpy (protocol_types[84], "Vitalink Communications", SN_PORT_TYPE_LEN); protocol_num[85] = 0x8080; strncpy (protocol_types[85], "Vitalink TransLAN III", SN_PORT_TYPE_LEN); protocol_num[86] = 0x8081; strncpy (protocol_types[86], "Counterpoint", SN_PORT_TYPE_LEN); protocol_num[87] = 0x809B; strncpy (protocol_types[87], "Appletalk", SN_PORT_TYPE_LEN); protocol_num[88] = 0x809C; strncpy (protocol_types[88], "Datability", SN_PORT_TYPE_LEN); protocol_num[89] = 0x809F; strncpy (protocol_types[89], "Spider Systems", SN_PORT_TYPE_LEN); protocol_num[90] = 0x80A3; strncpy (protocol_types[90], "Nixdorf2", SN_PORT_TYPE_LEN); protocol_num[91] = 0x80A4; strncpy (protocol_types[91], "Siemens Gammasonics", SN_PORT_TYPE_LEN); protocol_num[92] = 0x80C0; strncpy (protocol_types[92], "DCA Data Exchange Cluster", SN_PORT_TYPE_LEN); protocol_num[93] = 0x80C4; strncpy (protocol_types[93], "Banyan", SN_PORT_TYPE_LEN); protocol_num[94] = 0x80C5; strncpy (protocol_types[94], "Banyan", SN_PORT_TYPE_LEN); protocol_num[95] = 0x80C6; strncpy (protocol_types[95], "Pacer Software", SN_PORT_TYPE_LEN); protocol_num[96] = 0x80C7; strncpy (protocol_types[96], "Applitek", SN_PORT_TYPE_LEN); protocol_num[97] = 0x80C8; strncpy (protocol_types[97], "Intergraph", SN_PORT_TYPE_LEN); protocol_num[98] = 0x80CD; strncpy (protocol_types[98], "Harris", SN_PORT_TYPE_LEN); protocol_num[99] = 0x80CF; strncpy (protocol_types[99], "Taylor Instrument", SN_PORT_TYPE_LEN); protocol_num[100] = 0x80D3; strncpy (protocol_types[100], "Rosemount Corporation", SN_PORT_TYPE_LEN); protocol_num[101] = 0x80D5; strncpy (protocol_types[101], "SNA/Ether", SN_PORT_TYPE_LEN); protocol_num[102] = 0x80DD; strncpy (protocol_types[102], "Varian Associates", SN_PORT_TYPE_LEN); protocol_num[103] = 0x80DE; strncpy (protocol_types[103], "Integrated Solutions TRFS", SN_PORT_TYPE_LEN); protocol_num[104] = 0x80E0; strncpy (protocol_types[104], "Allen-Bradley", SN_PORT_TYPE_LEN); protocol_num[105] = 0x80E4; strncpy (protocol_types[105], "Datability", SN_PORT_TYPE_LEN); protocol_num[106] = 0x80F2; strncpy (protocol_types[106], "Retix", SN_PORT_TYPE_LEN); protocol_num[107] = 0x80F3; strncpy (protocol_types[107], "AppleTalk AARP (Kinetics)", SN_PORT_TYPE_LEN); protocol_num[108] = 0x80F4; strncpy (protocol_types[108], "Kinetics", SN_PORT_TYPE_LEN); protocol_num[109] = 0x80F7; strncpy (protocol_types[109], "Apollo", SN_PORT_TYPE_LEN); protocol_num[110] = 0x80FF; strncpy (protocol_types[110], "Wellfleet", SN_PORT_TYPE_LEN); protocol_num[111] = 0x8107; strncpy (protocol_types[111], "Symbolics Private", SN_PORT_TYPE_LEN); protocol_num[112] = 0x8130; strncpy (protocol_types[112], "Hayes", SN_PORT_TYPE_LEN); protocol_num[113] = 0x8131; strncpy (protocol_types[113], "VG Laboratory Systems", SN_PORT_TYPE_LEN); protocol_num[114] = 0x8132; strncpy (protocol_types[114], "Bridge Communications", SN_PORT_TYPE_LEN); protocol_num[115] = 0x8137; strncpy (protocol_types[115], "Novell", SN_PORT_TYPE_LEN); protocol_num[116] = 0x8139; strncpy (protocol_types[116], "KTI", SN_PORT_TYPE_LEN); protocol_num[117] = 0x8148; strncpy (protocol_types[117], "Logicraft", SN_PORT_TYPE_LEN); protocol_num[118] = 0x8149; strncpy (protocol_types[118], "NCD", SN_PORT_TYPE_LEN); protocol_num[119] = 0x814A; strncpy (protocol_types[119], "Alpha Micro", SN_PORT_TYPE_LEN); protocol_num[120] = 0x814C; strncpy (protocol_types[120], "SNMP", SN_PORT_TYPE_LEN); protocol_num[121] = 0x814D; strncpy (protocol_types[121], "BIIN", SN_PORT_TYPE_LEN); protocol_num[122] = 0x814E; strncpy (protocol_types[122], "BIIN", SN_PORT_TYPE_LEN); protocol_num[123] = 0x814F; strncpy (protocol_types[123], "Technically Elite Concept", SN_PORT_TYPE_LEN); protocol_num[124] = 0x8150; strncpy (protocol_types[124], "Rational", SN_PORT_TYPE_LEN); protocol_num[125] = 0x8151; strncpy (protocol_types[125], "Qualcomm", SN_PORT_TYPE_LEN); protocol_num[126] = 0x815C; strncpy (protocol_types[126], "Computer Protocol Pty", SN_PORT_TYPE_LEN); protocol_num[127] = 0x8164; strncpy (protocol_types[127], "Charles River", SN_PORT_TYPE_LEN); protocol_num[128] = 0x817D; strncpy (protocol_types[128], "Protocol Engines", SN_PORT_TYPE_LEN); protocol_num[129] = 0x818D; strncpy (protocol_types[129], "Motorola", SN_PORT_TYPE_LEN); protocol_num[130] = 0x819A; strncpy (protocol_types[130], "Qualcomm", SN_PORT_TYPE_LEN); protocol_num[131] = 0x81A4; strncpy (protocol_types[131], "ARAI Bunkichi", SN_PORT_TYPE_LEN); protocol_num[132] = 0x81A5; strncpy (protocol_types[132], "RAD Network Devices", SN_PORT_TYPE_LEN); protocol_num[133] = 0x81B7; strncpy (protocol_types[133], "Xyplex", SN_PORT_TYPE_LEN); protocol_num[134] = 0x81CC; strncpy (protocol_types[134], "Apricot", SN_PORT_TYPE_LEN); protocol_num[135] = 0x81D6; strncpy (protocol_types[135], "Artisoft", SN_PORT_TYPE_LEN); protocol_num[136] = 0x81E6; strncpy (protocol_types[136], "Polygon", SN_PORT_TYPE_LEN); protocol_num[137] = 0x81F0; strncpy (protocol_types[137], "Comsat Labs", SN_PORT_TYPE_LEN); protocol_num[138] = 0x81F3; strncpy (protocol_types[138], "SAIC", SN_PORT_TYPE_LEN); protocol_num[139] = 0x81F6; strncpy (protocol_types[139], "VG Analytical", SN_PORT_TYPE_LEN); protocol_num[140] = 0x8203; strncpy (protocol_types[140], "Quantum Software", SN_PORT_TYPE_LEN); protocol_num[141] = 0x8221; strncpy (protocol_types[141], "Ascom Banking", SN_PORT_TYPE_LEN); protocol_num[142] = 0x823E; strncpy (protocol_types[142], "AdvEncrypSys", SN_PORT_TYPE_LEN); protocol_num[143] = 0x827F; strncpy (protocol_types[143], "Athena Programming", SN_PORT_TYPE_LEN); protocol_num[144] = 0x8263; strncpy (protocol_types[144], "Charles River Data System", SN_PORT_TYPE_LEN); protocol_num[145] = 0x829A; strncpy (protocol_types[145], "Inst Ind Info Tech", SN_PORT_TYPE_LEN); protocol_num[146] = 0x829C; strncpy (protocol_types[146], "Taurus Controls", SN_PORT_TYPE_LEN); protocol_num[147] = 0x82AC; strncpy (protocol_types[147], "Walker Richer & Quinn", SN_PORT_TYPE_LEN); protocol_num[148] = 0x8694; strncpy (protocol_types[148], "Idea Courier", SN_PORT_TYPE_LEN); protocol_num[149] = 0x869E; strncpy (protocol_types[149], "Computer Network Tech", SN_PORT_TYPE_LEN); protocol_num[150] = 0x86A3; strncpy (protocol_types[150], "Gateway Comm", SN_PORT_TYPE_LEN); protocol_num[151] = 0x86DB; strncpy (protocol_types[151], "SECTRA", SN_PORT_TYPE_LEN); protocol_num[152] = 0x86DE; strncpy (protocol_types[152], "Delta Controls", SN_PORT_TYPE_LEN); protocol_num[153] = 0x86DF; strncpy (protocol_types[153], "ATOMIC", SN_PORT_TYPE_LEN); protocol_num[154] = 0x86E0; strncpy (protocol_types[154], "Landis & Gyr Powers", SN_PORT_TYPE_LEN); protocol_num[155] = 0x8700; strncpy (protocol_types[155], "Motorola", SN_PORT_TYPE_LEN); protocol_num[156] = 0x8A96; strncpy (protocol_types[156], "Invisible Software", SN_PORT_TYPE_LEN); protocol_num[157] = 0x9000; strncpy (protocol_types[157], "Loopback", SN_PORT_TYPE_LEN); protocol_num[158] = 0x9001; strncpy (protocol_types[158], "3Com(Bridge) XNS Sys Mgmt", SN_PORT_TYPE_LEN); protocol_num[159] = 0x9002; strncpy (protocol_types[159], "3Com(Bridge) TCP-IP Sys", SN_PORT_TYPE_LEN); protocol_num[160] = 0x9003; strncpy (protocol_types[160], "3Com(Bridge) loop detect", SN_PORT_TYPE_LEN); protocol_num[161] = 0xFF00; strncpy (protocol_types[161], "BBN VITAL-LanBridge cache", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_IEEE802_3] = SN_PROT_IEEE802_3; strncpy (protocol_types[SN_PROT_IEEE802_3], "IEEE802.3", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_SLIP] = SN_PROT_SLIP; strncpy (protocol_types[SN_PROT_SLIP], "SLIP", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_PPP] = SN_PROT_PPP; strncpy (protocol_types[SN_PROT_PPP], "PPP", SN_PORT_TYPE_LEN); protocol_num[SN_PROT_LOOP] = SN_PROT_LOOP; strncpy (protocol_types[SN_PROT_LOOP], "Loop int", SN_PORT_TYPE_LEN); #endif #endif /* read entries in /etc/services */ sn_setservent(0); /* open /etc/services */ while( ( serv = sn_getservent() ) != (struct servent *)NULL ) { /* while there are service entries */ #if( defined(SN_MAX_TCP_PORTS) ) if( strcmp( serv->s_proto, "tcp" ) == 0 ) { /* tcp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_TCP_PORTS ) { /* if port number is in range */ sprintf( tcp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* tcp */ #endif #if( defined(SN_MAX_UDP_PORTS) ) if( strcmp( serv->s_proto, "udp" ) == 0 ) { /* udp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_UDP_PORTS ) { /* if port number is in range */ sprintf( udp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* udp */ #endif } /* while there are service entries */ sn_endservent(); /* read entries in /etc/opt/statnet/services */ sn_setservent(123); /* open /etc/opt/statnet/services */ while( ( serv = sn_getservent() ) != (struct servent *)NULL ) { /* while there are service entries */ #if( defined(SN_MAX_TCP_PORTS) ) if( strcmp( serv->s_proto, "tcp" ) == 0 ) { /* tcp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_TCP_PORTS ) { /* if port number is in range */ sprintf( tcp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* tcp */ #endif #if( defined(SN_MAX_UDP_PORTS) ) if( strcmp( serv->s_proto, "udp" ) == 0 ) { /* udp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_UDP_PORTS ) { /* if port number is in range */ sprintf( udp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* udp */ #endif } /* while there are service entries */ sn_endservent(); /* read entries in services */ sn_setservent(321); /* open services file in local directory */ while( ( serv = sn_getservent() ) != (struct servent *)NULL ) { /* while there are service entries */ #if( defined(SN_MAX_TCP_PORTS) ) if( strcmp( serv->s_proto, "tcp" ) == 0 ) { /* tcp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_TCP_PORTS ) { /* if port number is in range */ sprintf( tcp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* tcp */ #endif #if( defined(SN_MAX_UDP_PORTS) ) if( strcmp( serv->s_proto, "udp" ) == 0 ) { /* udp */ temp_port = ntohs( serv->s_port ); if( temp_port > 0 && temp_port <= SN_MAX_UDP_PORTS ) { /* if port number is in range */ sprintf( udp_port_types[temp_port], "%.*s:", SN_PORT_TYPE_LEN-1, serv->s_name ); } /* if port number is in range */ } /* udp */ #endif } /* while there are service entries */ sn_endservent(); protocol_num[0] = 0x0000; strncpy (protocol_types[0], "0", SN_PORT_TYPE_LEN); protocol_num[1] = 0x0101; strncpy (protocol_types[1], "Experimental", SN_PORT_TYPE_LEN); /* read entries in /etc/protocols */ setprotoent(0); /* open /etc/protocols file */ while( ( proto = getprotoent() ) != (struct protoent *)NULL ) { /* while there are protocol entries */ #if( defined(SN_MAX_IP_PORT) ) temp_proto = proto->p_proto; if( temp_proto > 0 && temp_proto <= SN_MAX_IP_PORT ) { /* if protocol number is in range */ if( proto->p_aliases != (char **)0 ) { /* if we can use the first alias */ sprintf( ip_protocol_types[temp_proto], "%.*s:", SN_PORT_TYPE_LEN-1, proto->p_aliases[0] ); } /* if we can use the first alias */ else { /* else just use the official name */ sprintf( ip_protocol_types[temp_proto], "%.*s:", SN_PORT_TYPE_LEN-1, proto->p_name ); } /* else just use the official name */ } /* if protocol number is in range */ #endif } /* while there are protocol entries */ endprotoent(); } netdiag-1.2/statnet-3.8/set_null.c000066400000000000000000000022141323731111400167430ustar00rootroot00000000000000/* set_null.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ #include "stat.h" void set_null ( struct StatMemStruct *StatMem ) { SM_regis.ethercount = 0; SM_regis.etherbytes = 0; SM_regis.plipcount = 0; SM_regis.plipbytes = 0; SM_regis.slipcount = 0; SM_regis.slipbytes = 0; SM_regis.pppcount = 0; SM_regis.pppbytes = 0; SM_regis.loopcount = 0; SM_regis.loopbytes = 0; SM_regis.othercount = 0; SM_regis.otherbytes = 0; SM_regis.aarp = 0; SM_regis.rtmprd = 0; SM_regis.nbp = 0; SM_regis.atp = 0; SM_regis.aep = 0; SM_regis.rtmpreq = 0; SM_regis.zip = 0; SM_regis.adsp = 0; SM_regis.new_ethernet_count = 0; SM_regis.unknown_type = 0; SM_regis.unknown_frame_type = 0; SM_regis.unknown_sap = 0; if (options.ip_option) memset (&StatMem->ip_protocol_count, 0, sizeof (int) * SN_MAX_IP_PORT + 1); if (options.prot_option) memset (StatMem->prot.t_count, 0, sizeof (unsigned int) * StatMem->prot.t_max + 1); if (options.sap_option) memset (&StatMem->sap_count, 0, sizeof (int) * SN_MAX_SAP + 1); } netdiag-1.2/statnet-3.8/stat.h000066400000000000000000000312341323731111400161020ustar00rootroot00000000000000/* stat.h is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* Modified by: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #define ETH "eth0" #define SN_UPDATE_SECS 6 /* Number of seconds between updates. */ /* Suggest 4 to 6 seconds minimum, as */ /* two seconds is usually too fast to */ /* see relationships. CPU time use is */ /* mostly due to packet processing if */ /* update is greater than 3 seconds. */ #if ( SN_UPDATE_SECS > 25 ) #undef SN_UPDATE_SECS #define SN_UPDATE_SECS 25 /* Max of 25 seconds due to curses */ #endif #define SN_STATS_SECS (60) /* Number of seconds between stats updates */ #define STAT_IPC_KEY ((0x57a7237)%MAXINT) #define STAT_MAGIC ((0x57a7237)%MAXINT) #define STATNETD_IFACE_LEN 256 /* max len of statnetd interface name */ #define STATNETD_NAME_LEN 55 /* max len of statnetd machine name */ #define SN_NUM_PROTOCOLS 9 /* Number of Ethernet protocols to show */ #define SN_MAX_PROTO_DESC 200 /* Number of Ethernet protocols to know */ #define SN_NUM_IP_TYPES 7 /* Number of IP protocols to show */ #define SN_NUM_TCP_PORTS 9 /* Number of TCP ports to show */ #define SN_NUM_UDP_PORTS 9 /* Number of UDP ports to show */ #define SN_NUM_SAP_TYPES 9 /* Number of IP protocols to show */ #define SN_MAX_IP_PORT 256 /* Number of IP protocols to tally */ #define SN_MAX_TCP_PORTS 1024 /* Number of TCP ports to tally */ #define SN_MAX_UDP_PORTS 1024 /* Number of UDP ports to tally */ #define SN_MAX_SAP 256 /* Number of 802.2 SAP to tally */ #define SN_PORT_TYPE_LEN 20 /* Length of type labels */ #define SN_LIST_SWAP 5 /* Number of packets to require movement higher in list */ #define SN_PROT_IEEE802_3 165 /* Pseudo protocol for IEEE 802.3 */ #define SN_PROT_SLIP 162 /* Pseudo protocol for SLIP */ #define SN_PROT_PPP 163 /* Pseudo protocol for PPP */ #define SN_PROT_LOOP 164 /* Pseudo protocol for Loopback */ #include #include struct registers { /* Ethernet interface */ int ethercount; long etherbytes; /* PLIP interface */ int plipcount; long plipbytes; /* SLIP interface */ int slipcount; long slipbytes; /* PPP interface */ int pppcount; long pppbytes; /* loopback interface */ int loopcount; long loopbytes; int othercount; long otherbytes; /* Appletalk types */ int aarp; int rtmprd; int nbp; int atp; int aep; int rtmpreq; int zip; int adsp; /* IEEE802.2 protocol */ int new_ethernet_count; /* unknown types */ int unknown_type; int unknown_frame_type; /* store last unknown frame code */ int unknown_sap; /* store last unknown sap codes */ /* Received error count and last error code */ int errcount; int errcode; /* store last error code */ /* Interface errors */ int rx_errors_d; /* receive errors */ int rx_dropped_d; /* dropped frames */ int rx_packets_d; /* dropped frames */ int rx_interval; /* number of seconds interval for interface errs */ }; typedef enum Tally_Type_enum { disabled, protocol, appletalk, ip_prot, tcp, udp, sap } Tally_Type; struct Tally { Tally_Type type_code; /* Data type code, useful for headers */ /* Counters are used for items which can be directly indexed, */ /* such as port numbers from 0 to 1024 with c_max of 1024. */ unsigned int *count; /* Array of counters */ int c_show_max; /* Maximum show list index value */ int c_max; /* Maximum counter index value */ int *c_show_list; /* Array of counter display info */ char *c_labels; /* Array of counter labels */ /* Types are used for items which have a large range but only */ /* a few values in the range are used, such as a dozen protocol */ /* values which are scattered in a sixteen-bit range. */ unsigned int *types; /* Array of types */ unsigned int *t_count; /* Array of type counters */ unsigned int *t_values; /* Array of type values */ int t_max; /* Maximum type counter index value */ int t_max_labels; /* Maximum type label index value */ char *t_labels; /* Array of type labels */ }; struct StatMemStruct { unsigned int statmem_label; /* a magic number for ID and endianess */ unsigned int statmem_size; /* sizeof this structure */ char servername[STATNETD_NAME_LEN+1]; /* machine running statnetd */ struct registers regis; /* high-level counters */ struct Tally prot; /* Network Protocols */ struct Tally ip_types; /* IP protocols */ struct Tally tcp_port; /* TCP port count */ struct Tally udp_port; /* UDP port count */ struct Tally sap_types; /* SAP type count */ /* Note the +1 added to arrays to allow direct reference to constant values */ /* instead of having to subtract 1 due to array address starting from zero. */ unsigned int protocol_count[SN_NUM_PROTOCOLS + 1]; /* Ethernet protocol counters */ unsigned int prot_types[SN_NUM_PROTOCOLS]; /* Ethernet protocol types to display */ unsigned int tcp_port_ctr[SN_MAX_TCP_PORTS+1]; /* TCP ports */ unsigned int udp_port_ctr[SN_MAX_UDP_PORTS+1]; /* UDP ports */ int protocol_num[SN_MAX_PROTO_DESC + 1]; /* Protocol numbers */ int ip_protocol_count[SN_MAX_IP_PORT + 1]; /* IP protocol count */ int sap_count[SN_MAX_SAP + 1]; /* SAP count */ }; #define SM_regis StatMem->regis #ifdef MAIN_LINE #define EXTERN_DEF #else #define EXTERN_DEF extern #endif EXTERN_DEF struct { int ip_option:1; /* Types window */ int g:1; /* General window */ int prot_option:1; /* Protocol activity */ int at_option:1; /* Appletalk activity */ int tcp_option:1; /* TCP/IP activity */ int udp_option:1; /* UDP activity */ int sap_option:1; /* SAP activity */ } options; /* option values */ EXTERN_DEF int packet_type; EXTERN_DEF int frame_protocol;; EXTERN_DEF int rewrite_labels; EXTERN_DEF int redraw_screen; EXTERN_DEF int help_flag; EXTERN_DEF int temp_int; EXTERN_DEF int timer_flag; EXTERN_DEF int stats_countdown; #if 0 /* removed for statnet 3.* due to awkwardness in reading data. */ EXTERN_DEF struct enet_statistics *now_stats; /* Ethernet statistics */ EXTERN_DEF struct enet_statistics *last_stats; /* previous statistics */ EXTERN_DEF struct enet_statistics *temp_stats; EXTERN_DEF struct enet_statistics stat_buf1; EXTERN_DEF struct enet_statistics stat_buf2; #endif EXTERN_DEF int IP_types[SN_NUM_IP_TYPES]; /* IP protocol types to display */ EXTERN_DEF int tcp_ports[SN_NUM_TCP_PORTS]; /* TCP port numbers to display */ EXTERN_DEF int udp_ports[SN_NUM_UDP_PORTS]; /* UDP port numbers to display */ EXTERN_DEF int SAP_types[SN_NUM_SAP_TYPES]; /* SAP protocol types to display */ /* Note the +1 added to char strings for the terminating NULL. */ EXTERN_DEF int protocol_num[SN_MAX_PROTO_DESC + 1]; /* Protocol numbers */ EXTERN_DEF char ip_protocol_types[SN_MAX_IP_PORT + 1][SN_PORT_TYPE_LEN + 1]; EXTERN_DEF char tcp_port_types[SN_MAX_TCP_PORTS + 1][SN_PORT_TYPE_LEN + 1]; EXTERN_DEF char udp_port_types[SN_MAX_UDP_PORTS + 1][SN_PORT_TYPE_LEN + 1]; EXTERN_DEF char sap_port_types[SN_MAX_SAP + 1][SN_PORT_TYPE_LEN + 1]; EXTERN_DEF char protocol_types[SN_MAX_PROTO_DESC + 1][SN_PORT_TYPE_LEN + 1]; void close_all_subwin (); void itstime (int errnum); void update_display (); void set_null ( struct StatMemStruct *StatMem ); void services (); void stat_delta ( struct StatMemStruct *New, struct StatMemStruct *Prev, struct StatMemStruct *Delta ); void usage (char *arg); #ifdef WINDOW void win_show_stat( WINDOW *win, int X, int Y, int noframes, struct Tally *Now_ts, struct Tally *Prev_ts, struct Tally *Delta_ts, short rewrite_labels, short *update_labels, void *show_labels ); #endif void tally_delta ( struct Tally *New_t, struct Tally *Prev_t, struct Tally *Delta_t ); void tally_init ( struct Tally *ts, Tally_Type type_code, unsigned int *count, /* Array of counters */ int c_show_max, int *c_show_list, int c_max, /* Maximum counter index value */ char *c_labels, /* Array of counter labels */ unsigned int *types, /* Array of types */ unsigned int *t_count, /* Array of type counters */ unsigned int *t_values, /* Array of type values */ int t_max, /* Maximum type counter index value */ int t_max_labels, /* Maximum type label index value */ char *t_labels /* Array of type labels */ ); void tally_ntoh ( int bytecode, struct StatMemStruct *New, struct StatMemStruct *Prev, struct Tally *New_t, struct Tally *Prev_t ); #ifdef WINDOW void tally_label ( struct Tally *Now_ts, WINDOW *win, int width, int height ); #endif /* Now some redefinitions of stuff. With the Berkeley notice... */ /*- * Copyright (c) 1980, 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. * * @(#)netdb.h 8.1 (Berkeley) 6/2/93 * netdb.h,v 1.4 1995/08/14 04:05:04 hjl Exp * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * --Copyright-- */ void sn_endhostent __P((void)); void sn_endnetent __P((void)); void sn_endprotoent __P((void)); void sn_endservent __P((void)); void sn_endrpcent __P ((void)); struct hostent *sn_gethostbyaddr __P((__const char *, int, int)); struct hostent *sn_gethostbyname __P((__const char *)); struct hostent *sn_gethostent __P((void)); struct netent *sn_getnetbyaddr __P((long, int)); /* u_long? */ struct netent *sn_getnetbyname __P((__const char *)); struct netent *sn_getnetent __P((void)); struct protoent *sn_getprotobyname __P((__const char *)); struct protoent *sn_getprotobynumber __P((int)); struct protoent *sn_getprotoent __P((void)); struct servent *sn_getservbyname __P((__const char *, __const char *)); struct servent *sn_getservbyport __P((int, __const char *)); struct servent *sn_getservent __P((void)); struct rpcent *sn_getrpcent __P((void)); struct rpcent *sn_getrpcbyname __P((__const char *)); struct rpcent *sn_getrpcbynumber __P((int)); void sn_herror __P((__const char *)); void sn_sethostent __P((int)); /* void sn_sethostfile __P((__const char *)); */ void sn_setnetent __P((int)); void sn_setprotoent __P((int)); void sn_setservent __P((int)); void sn_setrpcent __P((int)); netdiag-1.2/statnet-3.8/stat_delta.c000066400000000000000000000064741323731111400172560ustar00rootroot00000000000000/* stat_delta.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 08JAN98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #include "stat.h" #include /* Deal with overflow/restart in simpleminded way */ #define DIFFZERO(a,b) ( ( a > b ) ? ( a - b ) : 0 ) void stat_delta ( struct StatMemStruct *New, struct StatMemStruct *Prev, struct StatMemStruct *Delta ) { unsigned temp_int, search; Delta->prot.types = Delta->prot_types; Delta->prot.t_count = Delta->protocol_count; /* A few items which are not simple counters */ Delta->regis.unknown_type = New->regis.unknown_type; Delta->regis.unknown_frame_type = New->regis.unknown_frame_type; Delta->regis.unknown_sap = New->regis.unknown_sap; Delta->regis.errcode = New->regis.errcode; Delta->regis.errcount = DIFFZERO( New->regis.errcount, Prev->regis.errcount ); Delta->regis.ethercount = DIFFZERO( New->regis.ethercount, Prev->regis.ethercount ); Delta->regis.etherbytes = DIFFZERO( New->regis.etherbytes, Prev->regis.etherbytes ); Delta->regis.plipcount = DIFFZERO( New->regis.plipcount, Prev->regis.plipcount ); Delta->regis.plipbytes = DIFFZERO( New->regis.plipbytes, Prev->regis.plipbytes ); Delta->regis.slipcount = DIFFZERO( New->regis.slipcount, Prev->regis.slipcount ); Delta->regis.slipbytes = DIFFZERO( New->regis.slipbytes, Prev->regis.slipbytes ); Delta->regis.pppcount = DIFFZERO( New->regis.pppcount, Prev->regis.pppcount ); Delta->regis.pppbytes = DIFFZERO( New->regis.pppbytes, Prev->regis.pppbytes ); Delta->regis.loopcount = DIFFZERO( New->regis.loopcount, Prev->regis.loopcount ); Delta->regis.loopbytes = DIFFZERO( New->regis.loopbytes, Prev->regis.loopbytes ); Delta->regis.othercount = DIFFZERO( New->regis.othercount, Prev->regis.othercount ); Delta->regis.otherbytes = DIFFZERO( New->regis.otherbytes, Prev->regis.otherbytes ); Delta->regis.aarp = DIFFZERO( New->regis.aarp, Prev->regis.aarp ); Delta->regis.rtmprd = DIFFZERO( New->regis.rtmprd, Prev->regis.rtmprd ); Delta->regis.nbp = DIFFZERO( New->regis.nbp, Prev->regis.nbp ); Delta->regis.atp = DIFFZERO( New->regis.atp, Prev->regis.atp ); Delta->regis.aep = DIFFZERO( New->regis.aep, Prev->regis.aep ); Delta->regis.rtmpreq = DIFFZERO( New->regis.rtmpreq, Prev->regis.rtmpreq ); Delta->regis.zip = DIFFZERO( New->regis.zip, Prev->regis.zip ); Delta->regis.adsp = DIFFZERO( New->regis.adsp, Prev->regis.adsp ); Delta->regis.new_ethernet_count = DIFFZERO( New->regis.new_ethernet_count, Prev->regis.new_ethernet_count ); Delta->regis.unknown_type = DIFFZERO( New->regis.unknown_type, Prev->regis.unknown_type ); if (options.ip_option) { Delta->ip_types.count = Delta->ip_protocol_count; tally_delta( &New->ip_types, &Prev->ip_types, &Delta->ip_types ); } tally_delta( &New->prot, &Prev->prot, &Delta->prot ); if (options.tcp_option) { Delta->tcp_port.count = Delta->tcp_port_ctr; tally_delta( &New->tcp_port, &Prev->tcp_port, &Delta->tcp_port ); } if (options.udp_option) { Delta->udp_port.count = Delta->udp_port_ctr; tally_delta( &New->udp_port, &Prev->udp_port, &Delta->udp_port ); } if (options.sap_option) { Delta->sap_types.count = Delta->sap_count; tally_delta( &New->sap_types, &Prev->sap_types, &Delta->sap_types ); } } netdiag-1.2/statnet-3.8/stat_ntoh.c000066400000000000000000000154741323731111400171350ustar00rootroot00000000000000/* stat_ntoh.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 13MAR98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #include "stat.h" #include #include /* Copy a pointer which is relative to the start of a block of memory */ #define PtrCpy(A,B,AP,BP) AP=(void *)((A)+(((void *)BP)-((void *)B))); void stat_ntoh ( struct StatMemStruct *New, struct StatMemStruct *Prev ) { unsigned byteorder, temp_int, search; byteorder = 0; if( Prev->statmem_label == (unsigned long int)STAT_MAGIC ) byteorder = 1; /* Don't have to do any conversion */ else if( ntohl( Prev->statmem_label ) == (unsigned long int)STAT_MAGIC ) byteorder = 2; /* Have to use ntohl() */ else if( htonl( Prev->statmem_label ) == (unsigned long int)STAT_MAGIC ) byteorder = 3; /* Odd, but use htonl() because it works */ switch( byteorder ) { /* switch based on needed conversion */ default: case 0: case 1: { /* case 1 */ PtrCpy(New, Prev, New->prot.types, Prev->prot.types); PtrCpy(New, Prev, New->prot.t_count, Prev->prot.t_count); /* A few items which are not simple counters */ New->regis.unknown_type = Prev->regis.unknown_type; New->regis.unknown_frame_type = Prev->regis.unknown_frame_type; New->regis.unknown_sap = Prev->regis.unknown_sap; New->regis.errcode = Prev->regis.errcode; New->regis.errcount = ( Prev->regis.errcount ); New->regis.ethercount = ( Prev->regis.ethercount ); New->regis.etherbytes = ( Prev->regis.etherbytes ); New->regis.plipcount = ( Prev->regis.plipcount ); New->regis.plipbytes = ( Prev->regis.plipbytes ); New->regis.slipcount = ( Prev->regis.slipcount ); New->regis.slipbytes = ( Prev->regis.slipbytes ); New->regis.pppcount = ( Prev->regis.pppcount ); New->regis.pppbytes = ( Prev->regis.pppbytes ); New->regis.loopcount = ( Prev->regis.loopcount ); New->regis.loopbytes = ( Prev->regis.loopbytes ); New->regis.othercount = ( Prev->regis.othercount ); New->regis.otherbytes = ( Prev->regis.otherbytes ); New->regis.aarp = ( Prev->regis.aarp ); New->regis.rtmprd = ( Prev->regis.rtmprd ); New->regis.nbp = ( Prev->regis.nbp ); New->regis.atp = ( Prev->regis.atp ); New->regis.aep = ( Prev->regis.aep ); New->regis.rtmpreq = ( Prev->regis.rtmpreq ); New->regis.zip = ( Prev->regis.zip ); New->regis.adsp = ( Prev->regis.adsp ); New->regis.new_ethernet_count = ( Prev->regis.new_ethernet_count ); New->regis.unknown_type = ( Prev->regis.unknown_type ); break; } /* case 1 */ case 2: { /* case 2 */ PtrCpy(New, Prev, New->prot.types, ntohl( (int)Prev->prot_types) ); PtrCpy(New, Prev, New->prot.t_count, ntohl( (int)Prev->prot.t_count) ); /* A few items which are not simple counters */ New->regis.unknown_type = ntohl( Prev->regis.unknown_type ); New->regis.unknown_frame_type = ntohl(Prev->regis.unknown_frame_type); New->regis.unknown_sap = ntohl( Prev->regis.unknown_sap ); New->regis.errcode = ntohl( Prev->regis.errcode ); New->regis.errcount = ntohl( Prev->regis.errcount ); New->regis.ethercount = ntohl( Prev->regis.ethercount ); New->regis.etherbytes = ntohl( Prev->regis.etherbytes ); New->regis.plipcount = ntohl( Prev->regis.plipcount ); New->regis.plipbytes = ntohl( Prev->regis.plipbytes ); New->regis.slipcount = ntohl( Prev->regis.slipcount ); New->regis.slipbytes = ntohl( Prev->regis.slipbytes ); New->regis.pppcount = ntohl( Prev->regis.pppcount ); New->regis.pppbytes = ntohl( Prev->regis.pppbytes ); New->regis.loopcount = ntohl( Prev->regis.loopcount ); New->regis.loopbytes = ntohl( Prev->regis.loopbytes ); New->regis.othercount = ntohl( Prev->regis.othercount ); New->regis.otherbytes = ntohl( Prev->regis.otherbytes ); New->regis.aarp = ntohl( Prev->regis.aarp ); New->regis.rtmprd = ntohl( Prev->regis.rtmprd ); New->regis.nbp = ntohl( Prev->regis.nbp ); New->regis.atp = ntohl( Prev->regis.atp ); New->regis.aep = ntohl( Prev->regis.aep ); New->regis.rtmpreq = ntohl( Prev->regis.rtmpreq ); New->regis.zip = ntohl( Prev->regis.zip ); New->regis.adsp = ntohl( Prev->regis.adsp ); New->regis.new_ethernet_count = ntohl( Prev->regis.new_ethernet_count ); New->regis.unknown_type = ntohl( Prev->regis.unknown_type ); break; } /* case 2 */ case 3: { /* case 3 */ PtrCpy(New, Prev, New->prot.types, htonl( (int)Prev->prot_types) ); PtrCpy(New, Prev, New->prot.t_count, htonl( (int)Prev->prot.t_count) ); /* A few items which are not simple counters */ New->regis.unknown_type = htonl( Prev->regis.unknown_type ); New->regis.unknown_frame_type = htonl(Prev->regis.unknown_frame_type); New->regis.unknown_sap = htonl( Prev->regis.unknown_sap ); New->regis.errcode = htonl( Prev->regis.errcode ); New->regis.errcount = htonl( Prev->regis.errcount ); New->regis.ethercount = htonl( Prev->regis.ethercount ); New->regis.etherbytes = htonl( Prev->regis.etherbytes ); New->regis.plipcount = htonl( Prev->regis.plipcount ); New->regis.plipbytes = htonl( Prev->regis.plipbytes ); New->regis.slipcount = htonl( Prev->regis.slipcount ); New->regis.slipbytes = htonl( Prev->regis.slipbytes ); New->regis.pppcount = htonl( Prev->regis.pppcount ); New->regis.pppbytes = htonl( Prev->regis.pppbytes ); New->regis.loopcount = htonl( Prev->regis.loopcount ); New->regis.loopbytes = htonl( Prev->regis.loopbytes ); New->regis.othercount = htonl( Prev->regis.othercount ); New->regis.otherbytes = htonl( Prev->regis.otherbytes ); New->regis.aarp = htonl( Prev->regis.aarp ); New->regis.rtmprd = htonl( Prev->regis.rtmprd ); New->regis.nbp = htonl( Prev->regis.nbp ); New->regis.atp = htonl( Prev->regis.atp ); New->regis.aep = htonl( Prev->regis.aep ); New->regis.rtmpreq = htonl( Prev->regis.rtmpreq ); New->regis.zip = htonl( Prev->regis.zip ); New->regis.adsp = htonl( Prev->regis.adsp ); New->regis.new_ethernet_count = htonl( Prev->regis.new_ethernet_count ); New->regis.unknown_type = htonl( Prev->regis.unknown_type ); break; } /* case 3 */ } /* switch based on needed conversion */ if (options.ip_option) { New->ip_types.count = New->ip_protocol_count; tally_ntoh( byteorder, New, Prev, &New->ip_types, &Prev->ip_types ); } tally_ntoh( byteorder, New, Prev, &New->prot, &Prev->prot ); if (options.tcp_option) { New->tcp_port.count = New->tcp_port_ctr; tally_ntoh( byteorder, New, Prev, &New->tcp_port, &Prev->tcp_port ); } if (options.udp_option) { New->udp_port.count = New->udp_port_ctr; tally_ntoh( byteorder, New, Prev, &New->udp_port, &Prev->udp_port ); } if (options.sap_option) { New->sap_types.count = New->sap_count ; tally_ntoh( byteorder, New, Prev, &New->sap_types, &Prev->sap_types ); } } netdiag-1.2/statnet-3.8/statnet.1.proto000066400000000000000000000153721323731111400176710ustar00rootroot00000000000000.\" "%W% %G%" .TH STATNET\ __SNVERSION__ 1 .SH NAME statnet,statnetd \- views the statistics of Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, etc .SH SYNOPSIS .PP .B statnet [ -agipstuh ] [-k key] .PP .B statnetd [ -adgipstuh ] [-k key] [-n name] [-w interface] .SH DESCRIPTION .PP .B statnetd is the privileged daemon which collects network data. .PP .B statnet views the current usage statistics of your Ethernet and PLIP/PPP/SLIP for TCP, IP, IPX, Appletalk, and more. It is terminated by typing "q". .PP It shows: .RS - kilobytes per second on ethernet, PPP, and other interfaces. .RE .RS - the percentage load of ethernet capacity. .RE .RS - frames per second. .RE .RS - how many frames of each type (like IP, 802.2, and some Appletalk or TCP frames) were seen. .RE .PP The purpose is to give some idea of the quantity and type of network activity (flashing lights on the hub are minimally informative). Other tools such as tcpdump are needed for detailed analysis. .PP Only certain frames/packets were shown in the first versions. Now the data for many more packets encountered on your net are shown. Only certain TCP/UDP ports are known (under port 1024 by default), and TCP/UDP traffic to unknown port numbers is not shown, although the presence of the frames are shown in protocol counts. .PP Note that .B statnetd uses IPC shared memory so there can be many clients such as .B statnet running. Other clients, such as an SNMP agent, may also be using the data. The .B statnetd IPC shared memory is enabled for DIPC, so the data from one copy of .B statnetd is available to all machines on a DIPC cluster. .SH OPTIONS .PP For .BR statnetd , most options select the type of data to be collected. For .BR statnet , most options select the type of data to be displayed. Defaults collect and display most data. .PP .TP .B \-a Appletalk protocol .TP .B \-d Daemonize ( .B statnetd only). Run as a background process. Probably should be entered as "/usr/local/bin/statnetd -d" in /etc/rc.d/rc.local. .TP .B \-g General statistics .TP .B \-i IP Protocols .TP .B \-k key Use .I key as the shared memory key. Base 16 recognized with '0x' prefix, base 8 with '0' prefix, otherwise .I key is in base 10. .TP .B \-n name Server or network name ( .B statnetd only). The label other than uname(2) nodename to label the data with. Often a computer or network name is used. .TP .B \-p PLIP/PPP/SLIP statistics .TP .B \-s IEEE 802.2 SAP protocol .TP .B \-t TCP/IP protocol .TP .B \-u UDP/IP protocol .TP .B \-w interface Specify an interface to monitor other than the default "eth0" ( .B statnetd only). See .I /proc/net/dev for a list of interfaces. .TP .B \-h print a short help message .SH DISPLAY .PP The .B statnet display client appearance will vary depending upon options and display type. It can operate under "curses" or "ncurses" libraries (compile time option). Another popular trick on X-Windows is to open an xterm window which is tall and as narrow as the "General" display, so the subwindows appear below each other. .PP Totals may vary slightly due to the data being captured as it is being collected, as more packets may arrive while the totals are being prepared for display (fortunately packets arrive slowly compared to the speed of copying the totals). .PP The percentage numbers are the percent of the total number of frames during the display period. .PP If the network interface reports errors, a summary is reported near the bottom of the "General" display. Error behavior depends upon your interface and device driver. (Error reporting not working in 3.2) .RE .SS SAMPLE TEXT DISPLAY .PP .nf STATISTICS OF NETWORKS GENERAL Frame: 341/6 sec ===== 802.2 SAP ===== ==== TCP/IP PORTS === KB/s Frame/s AvLen fragment 18 5.3% all 5.98 56 107 NetBIOS: 216 63.3% www: 0 0.0% eth 5.98 56 107 0xB4: 11 3.2% echo: 0 0.0% SNAP: 9 2.6% NetBIOS: 0 0.0% RPL: 1 0.3% ftp: 0 0.0% SNA: 4 1.2% NetWare: 2 0.6% SpanTree: 3 0.9% 802.2 pkt/sec: 41 Ethernet Load 0.49% 490 err/Hr( 0%) 490 drop/Hr ===== PROTOCOLS ===== ==== UDP/IP PORTS === NetB Dg: 56 16.4% ==== IP PROTOCOLS ==== IEEE802.3 246 72.1% snmp: 0 0.0% Ethernet 77 22.6% fragment 0 0.0% UDP: 58 17.0% ARP 13 3.8% NetB NS: 0 0.0% TCP: 18 5.3% HP Probe 3 0.9% domain: 2 0.6% ICMP: 1 0.3% DEC LAT 2 0.6% ntp: 0 0.0% Novell 0 0.0% loc-srv: 0 0.0% timed: 0 0.0% syslog: 0 0.0% Other: 0 0.0% .fi .RE .SH FILES .PP The files .IR /etc/services , .IR /etc/opt/statnet/services , and .I services in the current directory are read in that order for port number definitions. Later definitions override previous ones. A few names are replaced with shorter or more recognizable names (ie, .I nameserver is replaced with .IR DNS ). .PP File format: .nf telnet 23/tcp # Telnet .fi The above line specifies that TCP port 23 is used for the .B telnet service. .PP The file .I /etc/protocols is also read with the .B getprotoent(3) routine for IP protocol definitions. .SH PROBLEMS .PP By default the eth0 ethernet device is monitored. Monitoring SLIP or PPP devices may not work. Data from devices other than the one specified may be shown, depending upon operating system characteristics of a promiscuous socket. .PP Many networking numbers are compiled within the program and cannot be updated without altering a source file. But this is still more informative than a flashing light on the hub. .SH AUTHOR .PP .I Jeroen Baekelandt is the original author. .RS .nf jeroenb@igwe.vub.ac.be we47143@vub.ac.be .fi .RE .PP .I Scot E. Wilcoxon is present maintainer of Statnet. Made numerous alterations to the original. Generalized to tally arbitrary packet types rather than specific ones, changed to use daemon and shared memory instead of coroutines. Modified for glibc2(libc6) under 2.1.1* kernels. .RS .nf sewilco@fieldday.mn.org .fi .RE .PP .I Philip Hands maintains Debian netdiag packaging, and added glibc2(libc6) alterations. .RS .nf phil@hands.com .fi .RE .PP .I Christoph Lameter wrote the first version of this man page, and did Debian netdiag packaging. .RS .nf chris@waterf.org .fi .RE .SH COPYRIGHT GPL .I Copyright __UPDATED__ Scot E. Wilcoxon All Rights Reserved netdiag-1.2/statnet-3.8/statnet.c000066400000000000000000000740051323731111400166070ustar00rootroot00000000000000/* statnet.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 21DEC2002: Scot E. Wilcoxon (scot@wilcoxon.org) */ /* This is the main program for the terminal display client */ #define MAIN_LINE 1 #include #include "stat.h" #include "curs.h" #include #include #include #ifdef IPC_DIPC #include #else /* Always define so all compilations can run distributed. */ #define IPC_DIPC 00010000 /* make it distributed */ #endif #ifndef DIPC_SIG_READER #define DIPC_SIG_READER SIGURG /* for compilation on non-DIPC systems */ #endif #ifndef DIPC_SIG_WRITER #define DIPC_SIG_WRITER SIGPWR /* for compilation on non-DIPC systems */ #endif #include #define Stringify(X) #X #define Quoteify(X) Stringify(X) #define dX 2 /* Default X location: column to start at on left */ #define dY 1 /* Default Y location: column to start at on top */ #define padH 1 /* Default padding to expand windows */ #define padW 2 /* Default padding to expand windows */ #define AH (10+padH) /* atwin Height */ #define AW (22+padW) /* atwin Width */ #define GH (12+padH) /* genwin Height */ #define GW (27+padW) /* genwin Width */ #define IH (1+SN_NUM_IP_TYPES+padH) /* ipwin Height */ #define IW (22+padW) /* ipwin Width */ #define PH (1+SN_NUM_PROTOCOLS+padH) /* protwin Height */ #define PW (22+padW) /* protwin Width */ #define SH (1+SN_NUM_SAP_TYPES+padH) /* sapwin Height */ #define SW (22+padW) /* sapwin Width */ #define TH (1+SN_NUM_TCP_PORTS+padH) /* tcpwin Height */ #define TW (22+padW) /* tcpwin Width */ #define UH (1+SN_NUM_UDP_PORTS+padH) /* udpwin Height */ #define UW (22+padW) /* udpwin Width */ static int AY; static int AX; static int GY; static int GX; static int IY; static int IX; static int PY; static int PX; static int SY; static int SX; static int TY; static int TX; static int UY; static int UX; struct StatMemStruct *StatMem; /* pointer to shared memory segment */ /* Change the following to #if 1 to enable window debugging code */ #if 0 #define DEBUG_WINDOW(win_name,xx,yy) \ { \ mvwprintw (win_name, 0, 0, "+"); \ mvwprintw (win_name, (yy-1), 0, "+"); \ mvwprintw (win_name, (yy-1), (xx-1), "+"); \ mvwprintw (win_name, 0, (xx-1), "+"); \ } #endif void find_window_loc (int *X, int *Y, int width, int height); void show_prot_labels ( struct Tally *Now_ts ); void show_tcp_labels ( struct Tally *Now_ts ); void show_sap_labels ( struct Tally *Now_ts ); void show_ip_labels ( struct Tally *Now_ts ); void show_udp_labels ( struct Tally *Now_ts ); void signal_handler (int signal_number); static WINDOW *atwin = NULL; static WINDOW *genwin = NULL; static WINDOW *ipwin = NULL; static WINDOW *protwin = NULL; static WINDOW *sapwin = NULL; static WINDOW *tcpwin = NULL; static WINDOW *udpwin = NULL; static gen_all, gen_eth, gen_plip, gen_slip, gen_ppp, gen_loop, gen_802 = 0; static int shutdown_flag = 0; int free_Xtop, free_Xbottom, free_Y; main (int argc, char *argv[]) { /* main */ int op; int shmid; /* shared memory ID */ char in_char; struct StatMemStruct Now; /* current totals */ struct StatMemStruct Prev; /* previous totals */ key_t mem_key; mem_key = (key_t)STAT_IPC_KEY; if ( ( signal( SIGINT, signal_handler ) == SIG_ERR ) || ( signal( SIGQUIT, signal_handler ) == SIG_ERR ) || /* Ignore DIPC signals which this app does not care about */ ( signal( DIPC_SIG_READER, SIG_IGN ) == SIG_ERR ) || ( signal( DIPC_SIG_WRITER, SIG_IGN ) == SIG_ERR ) || ( signal( SIGUSR1, signal_handler ) == SIG_ERR ) || ( signal( SIGUSR2, signal_handler ) == SIG_ERR ) ) { perror ("Can't register signal handler"); exit (5); } options.g = 1; /* General */ options.ip_option = 1; /* IP protocols */ options.at_option = 1; /* Appletalk activity */ options.prot_option = 1; /* Protocol activity */ options.tcp_option = 1; /* TCP/IP activity */ options.udp_option = 1; /* UDP/IP activity */ options.sap_option = 1; /* SAP activity */ if (argc != 1) while ((op = getopt (argc, argv, "acghik:pstu")) != EOF) { /* if there are command-line arguments */ switch (op) { case 'a': options.at_option = 1; break; case 'c': /* clear options */ options.g = 0; /* General */ options.ip_option = 0; /* IP protocols */ options.at_option = 0; /* Appletalk activity */ options.prot_option = 0; /* Protocol activity */ options.tcp_option = 0; /* TCP/IP activity */ options.udp_option = 0; /* UDP/IP activity */ options.sap_option = 0; /* SAP activity */ mem_key = (key_t)STAT_IPC_KEY; break; case 'g': options.g = 1; break; case 'i': options.ip_option = 1; break; case 'k': if( optarg == (char *)NULL) usage(argv[0]); mem_key = (key_t)strtol(optarg, (char **)NULL, 0); break; case 'p': options.prot_option = 1; break; case 's': options.sap_option = 1; break; case 't': options.tcp_option = 1; break; case 'u': options.udp_option = 1; break; case 'h': default: usage (argv[0]); exit(0); break; } } /* if there are command-line arguments */ /* Initialize shared memory */ if ((shmid = shmget(mem_key, sizeof(struct StatMemStruct), IPC_DIPC)) == -1 ) { /* error, could not find shared memory segment */ perror ("Can't get shared memory"); if( errno == ENOENT ) fprintf( stderr, "Was \"statnetd -d\" run by root?\n" ); exit (6); } /* error, could not find shared memory segment */ if(( (char *)StatMem = (struct StatMemStruct *)shmat(shmid, 0, SHM_RDONLY) ) == (char *)-1) { /* if error in attaching with read permission */ perror ("Can't attach shared memory"); exit (7); } /* if error in attaching with read permission */ #if 0 memset( &Prev, 0, sizeof(struct StatMemStruct) ); #endif Prev.prot.types = Prev.prot_types; Prev.prot.t_count = Prev.protocol_count; Prev.prot.t_labels = (char *)protocol_types[0]; Prev.prot.t_max_labels = SN_MAX_PROTO_DESC; Prev.ip_types.count = Prev.ip_protocol_count; Prev.ip_types.c_show_max = SN_NUM_IP_TYPES; Prev.ip_types.c_show_list = IP_types; Prev.ip_types.c_labels = (char *)ip_protocol_types[0]; Prev.tcp_port.c_show_max = SN_NUM_TCP_PORTS; Prev.tcp_port.c_show_list = tcp_ports; Prev.tcp_port.c_labels = (char *)tcp_port_types[0]; Prev.udp_port.c_show_max = SN_NUM_UDP_PORTS; Prev.udp_port.c_show_list = udp_ports; Prev.udp_port.c_labels = (char *)udp_port_types[0]; Prev.sap_types.count = Prev.sap_count; Prev.sap_types.c_show_max = SN_NUM_SAP_TYPES; Prev.sap_types.c_show_list = SAP_types; Prev.sap_types.c_labels = (char *)sap_port_types[0]; #if 0 /* removed for statnet 3.* due to awkwardness in reading data. */ last_stats = &stat_buf1; now_stats = &stat_buf2; #endif services(); /* default labels for these services */ /* Now replace some names */ /* TCP names */ strcpy(tcp_port_types[0], "fragment "); if(!strcmp(tcp_port_types[42],"name:")) strcpy(tcp_port_types[42], "DNS:"); if(!strcmp(tcp_port_types[42],"nameserver:")) strcpy(tcp_port_types[42], "DNS:"); if(!strcmp(tcp_port_types[101],"hostnames:")) strcpy(tcp_port_types[101], "NIC Host NS:"); if(!strcmp(tcp_port_types[101],"hostname:")) strcpy(tcp_port_types[101], "NIC Host NS:"); if(!strcmp(tcp_port_types[111],"sunrpc:")) strcpy(tcp_port_types[111], "RPC/NFS:"); if(!strcmp(tcp_port_types[137],"netbios-ns:")) strcpy(tcp_port_types[137], "NetB NS:"); /* NetBIOS Name Service */ if(!strcmp(tcp_port_types[138],"netbios-dgm:")) strcpy(tcp_port_types[138], "NetB Dg:"); /* NetBIOS Datagram */ if(!strcmp(tcp_port_types[139],"netbios-ssn:")) strcpy(tcp_port_types[139], "NetBIOS:"); /* NetBIOS Session Service */ if(!strcmp(tcp_port_types[520],"router:")) strcpy(tcp_port_types[520], "RIP:"); /* now UDP */ if(!strcmp(udp_port_types[42],"name:")) strcpy(udp_port_types[42], "DNS:"); if(!strcmp(udp_port_types[42],"nameserver:")) strcpy(udp_port_types[42], "DNS:"); if(!strcmp(udp_port_types[101],"hostnames:")) strcpy(udp_port_types[101], "NIC Host NS:"); if(!strcmp(udp_port_types[101],"hostname:")) strcpy(udp_port_types[101], "NIC Host NS:"); if(!strcmp(udp_port_types[111],"sunrpc:")) strcpy(udp_port_types[111], "RPC/NFS:"); if(!strcmp(udp_port_types[137],"netbios-ns:")) strcpy(udp_port_types[137], "NetB NS:"); /* NetBIOS Name Service */ if(!strcmp(udp_port_types[138],"netbios-dgm:")) strcpy(udp_port_types[138], "NetB Dg:"); /* NetBIOS Datagram */ if(!strcmp(udp_port_types[139],"netbios-ssn:")) strcpy(udp_port_types[139], "NetBIOS:"); /* NetBIOS Session Service */ if(!strcmp(udp_port_types[520],"router:")) strcpy(udp_port_types[520], "RIP:"); rewrite_labels = 1; /* Request initialization of text */ help_flag = 0; /* No help unless asked for */ redraw_screen = 0; /* No redraw unless asked for */ { /* Compound statement to make initializers vanish after init. */ int temp_int; for (temp_int = 0; temp_int < SN_NUM_IP_TYPES; temp_int++) { IP_types[temp_int] = -1; } for (temp_int = 0; temp_int < SN_NUM_TCP_PORTS; temp_int++) { tcp_ports[temp_int] = -1; } for (temp_int = 0; temp_int < SN_NUM_UDP_PORTS; temp_int++) { udp_ports[temp_int] = -1; } for (temp_int = 0; temp_int < SN_NUM_SAP_TYPES; temp_int++) { SAP_types[temp_int] = -1; } } /* Compound statement to make initializers vanish after init. */ init_curses(); /* initialize the screen */ clrscr(); /* clear the screen */ memcpy( &Prev, StatMem, sizeof( struct StatMemStruct ) ); /* initialize */ Prev.prot.types = Prev.prot_types; Prev.prot.t_count = Prev.protocol_count; Prev.prot.t_labels = (char *)protocol_types[0]; Prev.prot.t_max_labels = SN_MAX_PROTO_DESC; Prev.ip_types.count = Prev.ip_protocol_count; Prev.ip_types.c_show_max = SN_NUM_IP_TYPES; Prev.ip_types.c_show_list = IP_types; Prev.ip_types.c_labels = (char *)ip_protocol_types[0]; Prev.tcp_port.count = Prev.tcp_port_ctr; Prev.tcp_port.c_show_max = SN_NUM_TCP_PORTS; Prev.tcp_port.c_show_list = tcp_ports; Prev.tcp_port.c_labels = (char *)tcp_port_types[0]; Prev.udp_port.count = Prev.udp_port_ctr; Prev.udp_port.c_show_max = SN_NUM_UDP_PORTS; Prev.udp_port.c_show_list = udp_ports; Prev.udp_port.c_labels = (char *)udp_port_types[0]; Prev.sap_types.count = Prev.sap_count; Prev.sap_types.c_show_max = SN_NUM_SAP_TYPES; Prev.sap_types.c_show_list = SAP_types; Prev.sap_types.c_labels = (char *)sap_port_types[0]; while( !shutdown_flag ) { /* while not shutdown */ do { /* do while no keystroke */ memcpy( &Now, StatMem, sizeof( struct StatMemStruct ) ); Now.prot.types = Now.prot_types; Now.prot.t_count = Now.protocol_count; Now.prot.t_labels = (char *)protocol_types[0]; Now.prot.t_max_labels = SN_MAX_PROTO_DESC; Now.ip_types.count = Now.ip_protocol_count; Now.ip_types.c_show_max = SN_NUM_IP_TYPES; Now.ip_types.c_show_list = IP_types; Now.ip_types.c_labels = (char *)ip_protocol_types[0]; Now.tcp_port.count = Now.tcp_port_ctr; Now.tcp_port.c_show_max = SN_NUM_TCP_PORTS; Now.tcp_port.c_show_list = tcp_ports; Now.tcp_port.c_labels = (char *)tcp_port_types[0]; Now.udp_port.count = Now.udp_port_ctr; Now.udp_port.c_show_max = SN_NUM_UDP_PORTS; Now.udp_port.c_show_list = udp_ports; Now.udp_port.c_labels = (char *)udp_port_types[0]; Now.sap_types.count = Now.sap_count; Now.sap_types.c_show_max = SN_NUM_SAP_TYPES; Now.sap_types.c_show_list = SAP_types; Now.sap_types.c_labels = (char *)sap_port_types[0]; if( ! options.prot_option ) Now.prot.type_code = disabled; if( ! options.ip_option ) Now.ip_types.type_code = disabled; if( ! options.tcp_option ) Now.tcp_port.type_code = disabled; if( ! options.udp_option ) Now.udp_port.type_code = disabled; if( ! options.sap_option ) Now.sap_types.type_code = disabled; update_display( &Now, &Prev ); memcpy( &Prev, &Now, sizeof( struct StatMemStruct ) ); Prev.prot.types = Prev.prot_types; Prev.prot.t_count = Prev.protocol_count; Prev.prot.t_labels = (char *)protocol_types[0]; Prev.prot.t_max_labels = SN_MAX_PROTO_DESC; Prev.ip_types.count = Prev.ip_protocol_count; Prev.ip_types.c_show_max = SN_NUM_IP_TYPES; Prev.ip_types.c_show_list = IP_types; Prev.ip_types.c_labels = (char *)ip_protocol_types[0]; Prev.tcp_port.count = Prev.tcp_port_ctr; Prev.tcp_port.c_show_max = SN_NUM_TCP_PORTS; Prev.tcp_port.c_show_list = tcp_ports; Prev.tcp_port.c_labels = (char *)tcp_port_types[0]; Prev.udp_port.count = Prev.udp_port_ctr; Prev.udp_port.c_show_max = SN_NUM_UDP_PORTS; Prev.udp_port.c_show_list = udp_ports; Prev.udp_port.c_labels = (char *)udp_port_types[0]; Prev.sap_types.count = Prev.sap_count; Prev.sap_types.c_show_max = SN_NUM_SAP_TYPES; Prev.sap_types.c_show_list = SAP_types; Prev.sap_types.c_labels = (char *)sap_port_types[0]; timeout( SN_UPDATE_SECS * 1000 ); } /* do while no keystroke */ while ( ( in_char=getch() ) == ERR ); if( ( in_char ) != ERR ) { /* if keystroke given */ /* A key has been pressed; we fall out of main loop to process it. */ /* Wanted: A HELP screen should be added somehow. */ /* Wanted: Should show "q to quit" reminder if unknown key is pressed. */ switch( in_char ) { /* switch( in_char ) */ case 'a': case 'A': options.at_option = !options.at_option; break; case 'g': case 'G': options.g = !options.g; break; case 'i': case 'I': options.ip_option = !options.ip_option; break; case 'p': case 'P': options.prot_option = !options.prot_option; break; case 's': case 'S': options.sap_option = !options.sap_option; break; case 't': case 'T': options.tcp_option = !options.tcp_option; break; case 'u': case 'U': options.udp_option = !options.udp_option; break; case '\f': clear(); /* Forcefully clear the screen */ redraw_screen = 1; break; case 'q': case 'Q': shutdown_flag = 1; /* request a shutdown */ break; default: case 'h': case 'H': help_flag = !help_flag; break; } /* switch( in_char ) */ rewrite_labels = 1; /* Screen may have changed, rewrite the labels */ } /* if keystroke given */ } /* while not shutdown */ shmdt( (char *)StatMem ); /* detach shared memory */ cleanup_curses(); exit (0); } /* main */ void update_display( struct StatMemStruct *Now, struct StatMemStruct *Prev ) { static short update_tcp_labels, update_ip_labels, update_prot_labels, update_udp_labels, update_sap_labels; int len, noframes, true_noframes; int port_int; int port_now; int now_value; int search_int; int last_value; long int nobytes; struct StatMemStruct Delta; /* differences */ char eth[20]; stat_delta( Now, Prev, &Delta ); /* calculate changes */ /* This code calculates Kilobytes Per Second by dividing by the time */ /* period for which the timer was set. This would be more accurate */ /* on a busy system if the actual time since the previous display */ /* was used, but more CPU time would be used. This code allows */ /* the compiler to perform part of the calculation at compile time. */ nobytes = Delta.regis.etherbytes + Delta.regis.plipbytes + Delta.regis.loopbytes + Delta.regis.slipbytes + Delta.regis.pppbytes + Delta.regis.otherbytes; noframes = true_noframes = Delta.regis.ethercount + Delta.regis.plipcount + Delta.regis.loopcount + Delta.regis.slipcount + Delta.regis.pppcount + Delta.regis.othercount; if (noframes == 0) { noframes = 1; /* dirty, i know, but it's easier and doesn't give errors */ } if (rewrite_labels) { /* if rewrite_labels */ clrscr (); #define min(a,b) (((a) > (b)) ? (b) : (a)) if( COLS < 25 + min( 25, strlen( StatMem->servername ) ) ) { mvprintw (0, (COLS - min( 25, strlen( StatMem->servername ) )) / 2, StatMem->servername); } else { if( ((COLS/2) + 14) > COLS - min( 25, strlen( StatMem->servername )+1 ) ) { mvprintw (0, 0, "STATISTICS OF NETWORKS"); mvprintw (0, (COLS - min( 25, strlen( StatMem->servername )+1 )), StatMem->servername); } else { mvprintw (0, (COLS - 22) / 2, "STATISTICS OF NETWORKS"); mvprintw (0, (COLS - min( 25, strlen( StatMem->servername )+1 )), StatMem->servername); } } if (help_flag) { mvprintw (LINES - 1, 26, "keys: Quit/General/Ip/Sap/Protocols/Tcp/Udp/Appletalk"); help_flag = 0; } /* Close any open subwindows before assigning new window locations */ close_all_subwin (); AX = AY = -1; GX = GY = -1; IX = IY = -1; PX = PY = -1; SX = SY = -1; TX = TY = -1; UX = UY = -1; /* Now assign locations for all requested windows */ free_Xtop = dX; free_Xbottom = dX; free_Y = 0; /* The sequence of this paragraph affects the location of the windows */ if (options.g) find_window_loc (&GX, &GY, GW, GH); if (options.ip_option) find_window_loc (&IX, &IY, IW, IH); if (options.sap_option) find_window_loc (&SX, &SY, SW, SH); if (options.prot_option) find_window_loc (&PX, &PY, PW, PH); if (options.tcp_option) find_window_loc (&TX, &TY, TW, TH); if (options.udp_option) find_window_loc (&UX, &UY, UW, UH); if (options.at_option) find_window_loc (&AX, &AY, AW, AH); if (options.g && genwin == NULL && GX >= 0) genwin = subwin (stdscr, GH, GW, GY, GX); if (options.prot_option && protwin == NULL && PX >= 0) protwin = subwin (stdscr, PH, PW, PY, PX); if (options.ip_option && ipwin == NULL && IX >= 0) ipwin = subwin (stdscr, IH, IW, IY, IX); if (options.tcp_option && tcpwin == NULL && TX >= 0) tcpwin = subwin (stdscr, TH, TW, TY, TX); if (options.udp_option && udpwin == NULL && UX >= 0) udpwin = subwin (stdscr, UH, UW, UY, UX); if (options.at_option && atwin == NULL && AX >= 0) atwin = subwin (stdscr, AH, AW, AY, AX); if (options.sap_option && sapwin == NULL && SX >= 0) sapwin = subwin (stdscr, SH, SW, SY, SX); } /* if rewrite_labels */ if (options.g && genwin != NULL) { /* if general window was created */ if (rewrite_labels && genwin != NULL) { mvwprintw (genwin, 0, 0, "GENERAL Frame: /%-02d sec", SN_UPDATE_SECS); mvwprintw (genwin, 1, 0, " KB/s Frame/s AvLen"); } mvwprintw (genwin, 0, 15, "%5d", true_noframes); if (true_noframes == 0) { len = 0; } else len = nobytes / true_noframes; if (true_noframes || gen_all) { mvwprintw (genwin, 2, 0, "all %8.2f %5d %5d", nobytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ true_noframes / SN_UPDATE_SECS, /* frames/sec */ len); /* frame length */ /* Note that the maximum is 14,200 64 bit frames per second [WRL-TR-88.4] */ gen_all = true_noframes; } if (Delta.regis.ethercount == 0) len = 0; else len = Delta.regis.etherbytes / Delta.regis.ethercount; if (Delta.regis.ethercount || gen_eth) { mvwprintw (genwin, 3, 0, "%3.3s %8.2f %5d %5d", ETH, Delta.regis.etherbytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ Delta.regis.ethercount / SN_UPDATE_SECS, /* frames/sec */ len); /* average frame len */ gen_eth = Delta.regis.ethercount; } if (Delta.regis.plipcount == 0) len = 0; else len = Delta.regis.plipbytes / Delta.regis.plipcount; if (Delta.regis.plipcount || gen_plip) { mvwprintw (genwin, 4, 0, "PLIP %8.2f %5d %5d", Delta.regis.plipbytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ Delta.regis.plipcount / SN_UPDATE_SECS, /* frames/sec */ len); /* average frame len */ gen_plip = Delta.regis.plipcount; } if (Delta.regis.slipcount == 0) len = 0; else len = Delta.regis.slipbytes / Delta.regis.slipcount; if (Delta.regis.slipcount || gen_slip) { mvwprintw (genwin, 5, 0, "SLIP %8.2f %5d %5d", Delta.regis.slipbytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ Delta.regis.slipcount / SN_UPDATE_SECS, /* frames/sec */ len); /* average frame len */ gen_slip = Delta.regis.slipcount; } if (Delta.regis.pppcount == 0) len = 0; else len = Delta.regis.pppbytes / Delta.regis.pppcount; if (Delta.regis.pppcount || gen_ppp) { mvwprintw (genwin, 6, 0, "PPP %8.2f %5d %5d", Delta.regis.pppbytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ Delta.regis.pppcount / SN_UPDATE_SECS, /* frames/sec */ len); /* average frame len */ gen_ppp = Delta.regis.pppcount; } if (Delta.regis.loopcount == 0) len = 0; else len = Delta.regis.loopbytes / Delta.regis.loopcount; if (Delta.regis.loopcount || gen_loop) { mvwprintw (genwin, 7, 0, "loop %8.2f %5d %5d", Delta.regis.loopbytes / (1024.0 * SN_UPDATE_SECS), /* KB/sec */ Delta.regis.loopcount / SN_UPDATE_SECS, /* frames/sec */ len); /* average frame len */ gen_loop = Delta.regis.loopcount; } if (Delta.regis.new_ethernet_count || gen_802) { mvwprintw (genwin, GH - 4, 0, "802.2 pkt/sec: %5d ", Delta.regis.new_ethernet_count / SN_UPDATE_SECS); /* IEEE 802.2 frames per second */ gen_802 = Delta.regis.new_ethernet_count; } mvwprintw (genwin, GH - 3, 1, "Ethernet Load %6.2f%%", Delta.regis.etherbytes * 100.0 / (1250000.0 * SN_UPDATE_SECS)); /* percent load */ /* The 1,250,000 number is 10Mbits divided by 8 bits per byte (octet) */ if (SM_regis.rx_errors_d || SM_regis.rx_dropped_d ) { /* if errors reported */ mvwprintw (genwin, GH - 2, 0, "%4d err/Hr(%2d%%)%4d drop/Hr", SM_regis.rx_errors_d * ((60 * 60) / SM_regis.rx_interval), (int) ((((float) SM_regis.rx_errors_d) / ((float) (SM_regis.rx_errors_d + SM_regis.rx_packets_d ))) * 100.0), SM_regis.rx_dropped_d * ((60 * 60) / SM_regis.rx_interval)); } /* if errors reported */ else { /* else clear the line */ wmove (genwin, GH - 2, 0); wclrtoeol (genwin); } /* else clear the line */ if (Delta.regis.errcount > 0) { /* if an error was found */ mvwprintw (genwin, GH - 1, 0, "Error: %d (%d)", Delta.regis.errcount, Delta.regis.errcode); } /* if an error was found */ } /* if general window was created */ if (options.prot_option && protwin != NULL) win_show_stat( protwin, 9, 1, noframes, &Now->prot, &Prev->prot, &Delta.prot, rewrite_labels, &update_prot_labels, &show_prot_labels ); if (options.prot_option && protwin != NULL) { /* if protocol window to be shown */ if (Now->regis.unknown_frame_type > 0) { /* if an unknown frame type was encountered */ mvwprintw (protwin, PH - 1, 6, "%04X", Now->regis.unknown_frame_type); } /* if an unknown frame type was encountered */ else mvwprintw (protwin, PH - 1, 6, " "); mvwprintw (protwin, PH - 1, 10, "%4d %5.1f%%", Delta.regis.unknown_type, Delta.regis.unknown_type * 100.0 / noframes); } /* if protocol window to be shown */ if (options.ip_option && ipwin != NULL) { /* if IP window to be shown */ Now->ip_types.c_labels = (char *)ip_protocol_types[0]; if (rewrite_labels || update_ip_labels) { show_ip_labels ( &Now->ip_types ); update_ip_labels = 0; } win_show_stat( ipwin, 9, 1, noframes, &Now->ip_types, &Prev->ip_types, &Delta.ip_types, rewrite_labels, &update_ip_labels, &show_ip_labels ); } /* if IP window to be shown */ if (options.tcp_option && tcpwin != NULL) { /* if TCP window to be shown */ Now->tcp_port.c_labels = (char *)tcp_port_types[0]; if (rewrite_labels || update_tcp_labels) { show_tcp_labels ( &Now->tcp_port ); update_tcp_labels = 0; } win_show_stat( tcpwin, 9, 1, noframes, &Now->tcp_port, &Prev->tcp_port, &Delta.tcp_port, rewrite_labels, &update_tcp_labels, &show_tcp_labels ); } /* if TCP window to be shown */ if (options.udp_option && udpwin != NULL) { /* if UDP window to be shown */ Now->udp_port.c_labels = udp_port_types[0]; if (rewrite_labels || update_udp_labels) { show_udp_labels ( &Now->udp_port ); update_udp_labels = 0; } win_show_stat( udpwin, 9, 1, noframes, &Now->udp_port, &Prev->udp_port, &Delta.udp_port, rewrite_labels, &update_udp_labels, &show_udp_labels ); } /* if UDP window to be shown */ if (options.at_option && atwin != NULL) { /* if AppleTalk window to be shown */ if (rewrite_labels) { mvwprintw (atwin, 0, 0, "==== APPLETALK ===="); mvwprintw (atwin, 2, 0, "AARP:"); mvwprintw (atwin, 3, 0, "RTMPRD:"); mvwprintw (atwin, 4, 0, "RTMPREQ:"); mvwprintw (atwin, 5, 0, "NBP:"); mvwprintw (atwin, 6, 0, "ATP:"); mvwprintw (atwin, 7, 0, "AEP:"); mvwprintw (atwin, 8, 0, "ZIP:"); mvwprintw (atwin, 9, 0, "ADSP:"); } /* if rewrite_labels */ mvwprintw (atwin, 2, 9, "%5d %5.1f%%", Delta.regis.aarp, Delta.regis.aarp * 100.0 / noframes); mvwprintw (atwin, 3, 9, "%5d %5.1f%%", Delta.regis.rtmprd, Delta.regis.rtmprd * 100.0 / noframes); mvwprintw (atwin, 4, 9, "%5d %5.1f%%", Delta.regis.rtmpreq, Delta.regis.rtmpreq * 100.0 / noframes); mvwprintw (atwin, 5, 9, "%5d %5.1f%%", Delta.regis.nbp, Delta.regis.nbp * 100.0 / noframes); mvwprintw (atwin, 6, 9, "%5d %5.1f%%", Delta.regis.atp, Delta.regis.atp * 100.0 / noframes); mvwprintw (atwin, 7, 9, "%5d %5.1f%%", Delta.regis.aep, Delta.regis.aep * 100.0 / noframes); mvwprintw (atwin, 8, 9, "%5d %5.1f%%", Delta.regis.zip, Delta.regis.zip * 100.0 / noframes); mvwprintw (atwin, 9, 9, "%5d %5.1f%%", Delta.regis.adsp, Delta.regis.adsp * 100.0 / noframes); } /* if AppleTalk window to be shown */ if (options.sap_option && sapwin != NULL) { /* if SAP window to be shown */ Now->sap_types.c_labels = sap_port_types[0]; if (rewrite_labels || update_sap_labels) { show_sap_labels ( &Now->udp_port ); update_sap_labels = 0; } win_show_stat( sapwin, 9, 1, noframes, &Now->sap_types, &Prev->sap_types, &Delta.sap_types, rewrite_labels, &update_sap_labels, &show_sap_labels ); } /* if SAP window to be shown */ rewrite_labels = 0; /* labels have been written */ if (redraw_screen) { wredrawln (stdscr, 0, LINES); /* redraw the entire screen */ redraw_screen = 0; } touchwin (stdscr); /* make screen ready to be refreshed */ refresh (); /* update the screen with the new info */ #if( defined(DEBUG_WINDOW) ) if (atwin != NULL) DEBUG_WINDOW (atwin, AW, AH); if (genwin != NULL) DEBUG_WINDOW (genwin, GW, GH); if (ipwin != NULL) DEBUG_WINDOW (ipwin, IW, IH); if (protwin != NULL) DEBUG_WINDOW (protwin, PW, PH); if (sapwin != NULL) DEBUG_WINDOW (sapwin, SW, SH); if (tcpwin != NULL) DEBUG_WINDOW (tcpwin, TW, TH); if (udpwin != NULL) DEBUG_WINDOW (udpwin, UW, UH); #endif return; } void show_tcp_labels ( struct Tally *Now_ts ) { tally_label( Now_ts, tcpwin, TW, TH ); } void show_ip_labels ( struct Tally *Now_ts ) { tally_label( Now_ts, ipwin, UW, UH ); } void show_udp_labels ( struct Tally *Now_ts ) { tally_label( Now_ts, udpwin, UW, UH ); } void show_sap_labels ( struct Tally *Now_ts ) { tally_label( Now_ts, sapwin, SW, SH ); } void show_prot_labels ( struct Tally *Now_ts ) { tally_label( Now_ts, protwin, PW, PH ); } void find_window_loc (int *X, int *Y, int width, int height) { /* Find location for a subwindow */ if (free_Y == 0) { /* if starting at top, put this in upper left corner */ if (width <= COLS - free_Xtop) { /* if wide enough on the top */ *X = free_Xtop; *Y = dY; free_Xtop += width; free_Y = height + dY; } /* if wide enough on the top */ } /* if starting at top, put this in upper left corner */ else if (width <= (COLS - free_Xbottom)) { /* if wide enough on the bottom */ if (LINES >= (free_Y + height)) { /* if enough height on the bottom */ *X = free_Xbottom; *Y = free_Y; free_Y += height; } /* if enough height on the bottom */ else { /* else not enough height on the bottom */ if (free_Xbottom > free_Xtop) free_Xtop = free_Xbottom; free_Xbottom = free_Xtop; /* line up the subwindows */ free_Y = 0; /* Ready to start from the top again */ if (width <= COLS - free_Xtop) { /* if should be enough room at the top, put it there else quit */ find_window_loc (X, Y, width, height); } /* if should be enough room at the top, put it there else quit */ } /* else not enough height on the bottom */ } /* if wide enough on the bottom */ return; } /* Find location for a subwindow */ void close_all_subwin () { if (atwin != NULL) { delwin (atwin); atwin = NULL; } if (genwin != NULL) { delwin (genwin); genwin = NULL; } if (ipwin != NULL) { delwin (ipwin); ipwin = NULL; } if (protwin != NULL) { delwin (protwin); protwin = NULL; } if (sapwin != NULL) { delwin (sapwin); sapwin = NULL; } if (tcpwin != NULL) { delwin (tcpwin); tcpwin = NULL; } if (udpwin != NULL) { delwin (udpwin); udpwin = NULL; } } void signal_handler (int signal_number) { shutdown_flag = 1; /* shut down upon any signal */ } void usage (char *arg) { fprintf (stderr, "\n%s [-acgikpstuh] [-k key]\n\n", arg); fprintf (stderr, " Display network statistics\n"); fprintf (stderr, " version " Quoteify(SNVERSION) "\n\n"); fprintf (stderr, " -a show Appletalk window\n"); fprintf (stderr, " -c clear the other option settings\n"); fprintf (stderr, " -g show General window\n"); fprintf (stderr, " -i show IP Protocols window\n"); fprintf (stderr, " -k key define shared memory key (base 8, 10, 16)\n"); fprintf (stderr, " -p show Protocols window\n"); fprintf (stderr, " -s show IEEE 802.2 SAP window\n"); fprintf (stderr, " -t show TCP/IP window\n"); fprintf (stderr, " -u show UDP/IP window\n"); fprintf (stderr, " -h show this message\n"); fprintf (stderr, " no options: show most windows\n"); fprintf (stderr, " Most options may be typed while running.\n\n"); exit (0); } netdiag-1.2/statnet-3.8/statnet.lsm000066400000000000000000000012441323731111400171530ustar00rootroot00000000000000Begin3 Title: statnet Version: 3.8 Entered-date: 21DEC2002 Description: Summary of protocols currently being used on network. Statnet views the statistics of ethernet/PLIP/PPP for IP, IPX and Appletalk. Statnetd gathers the info. Shows number of frames of IP, TCP, UDP, 802.3, and more. Keywords: protocol statistics load ethernet appletalk DIPC Author: jeroenb@igwe.vub.ac.be ( Jeroen Baekelandt) Maintained-by: scot@wilcoxon.org ( Scot Wilcoxon) Primary-site: wilcoxon.org ~sewilco/statnet-3.8.tgz 152K statnet-3.8.tar.gz Platforms: Linux Copying-policy: GPL2.0 End netdiag-1.2/statnet-3.8/statnet.lsm.proto000066400000000000000000000013101323731111400203070ustar00rootroot00000000000000Begin3 Title: statnet Version: __SNVERSION__ Entered-date: __UPDATED__ Description: Summary of protocols currently being used on network. Statnet views the statistics of ethernet/PLIP/PPP for IP, IPX and Appletalk. Statnetd gathers the info. Shows number of frames of IP, TCP, UDP, 802.3, and more. Keywords: protocol statistics load ethernet appletalk DIPC Author: jeroenb@igwe.vub.ac.be ( Jeroen Baekelandt) Maintained-by: scot@wilcoxon.org ( Scot Wilcoxon) Primary-site: wilcoxon.org ~sewilco/statnet-3.8.tgz __TARSIZE__`'K statnet-`'__SNVERSION__`'.tar.gz Platforms: Linux Copying-policy: GPL2.0 End netdiag-1.2/statnet-3.8/statnetd.c000066400000000000000000000546071323731111400167610ustar00rootroot00000000000000/* statnetd.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 13DEC98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* This is the main program for the monitoring daemon */ #define MAIN_LINE 1 /* #include */ #include /* #include */ #include #include #include #include #include #ifdef IPC_DIPC #include #else /* Always define so all compilations can run distributed. */ #define IPC_DIPC 00010000 /* make it distributed */ #ifndef DIPC_SIG_READER #define DIPC_SIG_READER SIGURG /* for compilation on non-DIPC systems */ #endif #ifndef DIPC_SIG_WRITER #define DIPC_SIG_WRITER SIGPWR /* for compilation on non-DIPC systems */ #endif #endif #include #define Stringify(X) #X #define Quoteify(X) Stringify(X) #if !(defined(__GLIBC__) && __GLIBC__ >= 2) #include #include #include #include #include #else #include #include #include #include #include #endif #include #include #include "stat.h" #ifdef _LINUX_IF_ETHER_H #undef NET_3 /* not using Net/3 definitions */ #endif #ifndef ETH_HLEN #define ETH_HLEN 14 /* Ethernet header length */ #endif #ifndef ETH_P_ATALK #define ETH_P_ATALK 0x809B /* Appletalk */ #endif #ifndef SOCK_PACKET #define SOCK_PACKET SOCK_RAW /* If SOCK_PACKET is wrong, try SOCK_RAW */ #endif #ifndef NET_3 #define ether_head ethhdr /* ether_head structure */ #define ether_type h_proto /* Ethernet Packet Type ID field */ #define ip iphdr /* IP header structure */ #define ip_off frag_off /* IP protocol field */ #define ip_p protocol /* IP protocol field */ #define ip_hl ihl /* IP header length field */ #define th_sport source /* TCP source port field */ #define th_dport dest /* TCP destination port field */ #define ui_sport source /* UDP source port field */ #define ui_dport dest /* UDP destination port field */ #endif #if 1 #define SN_RCV_BUF_SIZE 1600 #else #define SN_RCV_BUF_SIZE (sizeof(struct ether_head)+ \ sizeof(struct ip)+ \ sizeof(struct options)+ \ sizeof(struct tcphdr)) /* above was 1600, but kernel discards */ /* excess and tells us full length, */ /* so we only need enough to analyze. */ /* Removed the above precision because Linux 1.1.* delivered only the size */ /* requested, but by Linux 2.0.* this optimization no longer worked. */ #endif struct at_frame_type { unsigned char filler[20]; #if !(defined(__GLIBC__) && __GLIBC__ >= 2) __u16 appletalk_type1; /* what is formal name? */ unsigned char filler2[12]; __u8 appletalk_type2; /* what is formal name? */ #else u_int16_t appletalk_type1; /* what is formal name? */ unsigned char filler2[12]; u_int8_t appletalk_type2; /* what is formal name? */ #endif }; /* Ethernet Appletalk */ void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr); void handle_ip (struct ip *buf, int length); void signal_handler (int signal_number); int shutdown_flag = 0; struct StatMemStruct *StatMem; /* pointer to shared memory segment */ main (int argc, char *argv[]) { int daemon_option = 0; int length; int sd; int shmid; /* shared memory ID */ int sizeaddr; char interface_name[STATNETD_IFACE_LEN+1]; /* name of interface */ char server_label[STATNETD_NAME_LEN+1]; /* name of this server */ struct ifreq ifr, oldifr; struct sockaddr saddr; struct utsname utsbuf; unsigned char buf[SN_RCV_BUF_SIZE]; key_t mem_key; extern char *optarg; /* set by getopt(3) */ extern int optind, opterr, optopt; /* set by getopt(3) */ mem_key = (key_t)STAT_IPC_KEY; memset( interface_name, 0, STATNETD_IFACE_LEN+1 ); strcpy( interface_name, ETH); timer_flag = 0; memset( server_label, 0, STATNETD_NAME_LEN+1 ); if( uname(&utsbuf) != 0 ) { /* if error getting system name */ strcpy( server_label, "unknown server" ); } /* if error getting system name */ else { /* else copy node name */ strncpy( server_label, utsbuf.nodename, STATNETD_NAME_LEN ); } /* else copy node name */ if ( ( signal( SIGINT, signal_handler ) == SIG_ERR ) || ( signal( SIGQUIT, signal_handler ) == SIG_ERR ) || ( signal( SIGCHLD, SIG_IGN ) == SIG_ERR ) || /* Ignore DIPC signals which this app does not care about */ ( signal( DIPC_SIG_READER, SIG_IGN ) == SIG_ERR ) || ( signal( DIPC_SIG_WRITER, SIG_IGN ) == SIG_ERR ) || ( signal( SIGUSR1, signal_handler ) == SIG_ERR ) || ( signal( SIGUSR2, signal_handler ) == SIG_ERR ) ) { perror ("Can't register signal handler"); exit (5); } /* Default settings */ options.g = 1; /* General */ options.ip_option = 1; /* IP protocols */ options.at_option = 1; /* Appletalk activity */ options.prot_option = 1; /* Protocol activity */ options.tcp_option = 1; /* TCP/IP activity */ options.udp_option = 1; /* UDP/IP activity */ options.sap_option = 1; /* SAP activity */ if( argc != 1 ) { /* if there are command-line arguments */ int op; while ((op = getopt (argc, argv, "acdghik:n:pstuw:")) != EOF) { switch (op) { case 'a': options.at_option = 1; break; case 'c': /* clear options */ options.g = 0; /* General */ options.ip_option = 0; /* IP protocols */ options.at_option = 0; /* Appletalk activity */ options.prot_option = 0; /* Protocol activity */ options.tcp_option = 0; /* TCP/IP activity */ options.udp_option = 0; /* UDP/IP activity */ options.sap_option = 0; /* SAP activity */ mem_key = (key_t)STAT_IPC_KEY; memset( interface_name, 0, STATNETD_IFACE_LEN+1 ); strcpy( interface_name, ETH); memset( server_label, 0, STATNETD_NAME_LEN+1 ); if( uname(&utsbuf) != 0 ) { /* if error getting system name */ strcpy( server_label, "unknown server" ); } /* if error getting system name */ else { /* else copy node name */ strncpy( server_label, utsbuf.nodename, STATNETD_NAME_LEN ); } /* else copy node name */ break; case 'd': daemon_option = 1; break; case 'g': options.g = 1; break; case 'i': options.ip_option = 1; break; case 'k': if( optarg == (char *)NULL) usage(argv[0]); mem_key = (key_t)strtol(optarg, (char **)NULL, 0); break; case 'n': if( optarg == (char *)NULL) usage(argv[0]); memset( server_label, 0, STATNETD_NAME_LEN+1 ); strncpy( server_label, optarg, STATNETD_NAME_LEN ); break; case 'p': options.prot_option = 1; break; case 's': options.sap_option = 1; break; case 't': options.tcp_option = 1; break; case 'u': options.udp_option = 1; break; case 'w': if( optarg == (char *)NULL) usage(argv[0]); memset( interface_name, 0, STATNETD_IFACE_LEN+1 ); strncpy( interface_name, optarg, STATNETD_IFACE_LEN ); break; case 'h': default: usage (argv[0]); exit(0); break; } } } /* if there are command-line arguments */ /* Initialize shared memory */ if ((shmid = shmget(mem_key, sizeof(struct StatMemStruct), IPC_DIPC|IPC_CREAT|IPC_EXCL|0644)) == -1 ) { /* if it might already exist, use it */ if ((shmid = shmget(mem_key, sizeof(struct StatMemStruct), IPC_DIPC)) == -1 ) { /* error, could not find shared memory segment */ perror ("Can't get shared memory"); exit (6); } /* error, could not find shared memory segment */ } /* if it might already exist, use it */ if(( (char *)StatMem = (struct StatMemStruct *)shmat(shmid, 0, 0) ) == (char *)-1) { /* if error in attaching with write permission */ perror ("Can't attach shared memory"); exit (7); } /* if error in attaching with write permission */ { /* Compound statement to make initializers vanish after init. */ memset (&SM_regis, 0, sizeof (struct registers)); memset (StatMem, 0, sizeof (struct StatMemStruct)); strncpy( StatMem->servername, server_label, STATNETD_NAME_LEN ); tally_init ( &StatMem->prot, disabled, (unsigned int *)0, -1, (int *)0, -1, (char *)0, StatMem->prot_types, StatMem->protocol_count, protocol_num, SN_NUM_PROTOCOLS-1, SN_MAX_PROTO_DESC, (char *)0); tally_init ( &StatMem->ip_types, disabled, StatMem->ip_protocol_count, -1, (int *)0, SN_MAX_IP_PORT, (char *)0, (unsigned int *)0, (unsigned int *)0, 0, 0, 0, (char *)0); tally_init ( &StatMem->tcp_port, disabled, StatMem->tcp_port_ctr, -1, (int *)0, SN_MAX_TCP_PORTS, (char *)0, (unsigned int *)0, (unsigned int *)0, 0, 0, 0, (char *)0); tally_init ( &StatMem->udp_port, disabled, StatMem->udp_port_ctr, -1, (int *)0, SN_MAX_UDP_PORTS, (char *)0, (unsigned int *)0, (unsigned int *)0, 0, 0, 0, (char *)0); tally_init ( &StatMem->sap_types, disabled, StatMem->sap_count, -1, (int *)0, SN_MAX_SAP, (char *)0, (unsigned int *)0, (unsigned int *)0, 0, 0, 0, (char *)0); if( daemon_option ) { /* if should run in the background */ int pid; int fileDesc = -1; close(0); /* close stdin */ close(1); /* close stdout */ close(2); /* close stderr */ if( (pid = fork()) < 0 ) { /* error, could not become a background task */ exit(10); } /* error, could not become a background task */ if( pid != 0 ) exit(0); /* end the original program */ (void) setsid(); /* process group leader */ if( (pid = fork()) < 0 ) { /* error, could not become a background task */ exit(10); } /* error, could not become a background task */ if( pid != 0 ) exit(0); /* end the original program */ fileDesc = open( "/dev/null", O_RDWR); /* stdin */ (void) dup(fileDesc); /* stdout */ (void) dup(fileDesc); /* stderr */ } /* if should run in the background */ /* OPEN SOCKET */ if ((sd = socket (AF_INET, SOCK_PACKET, htons (ETH_P_ALL))) < 0) { perror ("Can't get socket"); exit (1); } /* SET PROMISC */ strcpy (oldifr.ifr_name, interface_name); if (ioctl (sd, SIOCGIFFLAGS, &oldifr) < 0) { close (sd); perror ("Can't get flags"); exit (2); } /* Should this be rewritten to cooperate with other net tools? */ memcpy( &ifr, &oldifr, sizeof( struct ifreq ) ); ifr.ifr_flags |= IFF_PROMISC; if (ioctl (sd, SIOCSIFFLAGS, &ifr) < 0) { close (sd); perror ("Can't set flags"); exit (3); } StatMem->prot.type_code = options.prot_option ? protocol : disabled; StatMem->ip_types.type_code = options.ip_option ? ip_prot : disabled; StatMem->tcp_port.type_code = options.tcp_option ? tcp : disabled; StatMem->udp_port.type_code = options.udp_option ? udp : disabled; StatMem->sap_types.type_code = options.sap_option ? sap : disabled; SM_regis.errcode = 0; SM_regis.errcount = 0; SM_regis.rx_errors_d = 0; SM_regis.rx_dropped_d = 0; SM_regis.rx_packets_d = 0; SM_regis.rx_interval = 1; #if 0 /* removed for statnet 3.* due to awkwardness in reading data. */ #if !( defined(__GLIBC__) && __GLIBC__ >= 2 ) memset( &stat_buf1, 0, sizeof(struct enet_statistics) ); memset( &stat_buf2, 0, sizeof(struct enet_statistics) ); #else memset( &stat_buf1, 0, sizeof(struct net_device_stats) ); memset( &stat_buf2, 0, sizeof(struct net_device_stats) ); #endif last_stats = &stat_buf1; now_stats = &stat_buf2; if_getstats (interface_name, last_stats); /* get starting interface statistics */ #endif } /* Compound statement to make initializer variables vanish after init. */ /* END OF INITIALISATION */ set_null ( StatMem ); /* clear all variables */ services(); /* default values for services */ while (!shutdown_flag) { /* while no shutdown requested */ /* This is the main data-gathering loop; keep it small and fast */ sizeaddr = sizeof(struct sockaddr); /* size of saddr */ length = recvfrom (sd, buf, SN_RCV_BUF_SIZE, 0, &saddr, &sizeaddr); if (length < 0) { /* if length < 0 */ if (errno != EINTR) { /* if error detected and error is not expected type */ SM_regis.errcode = errno; SM_regis.errcount++; continue; } else continue; } /* if length < 0 */ else handle_frame (buf, length, &saddr); if( !timer_flag ) { /* if timer not running */ if (signal (SIGALRM, itstime) == SIG_ERR) { SM_regis.errcode = errno; SM_regis.errcount++; timer_flag = 0; } else { /* else signal registered */ alarm (SN_STATS_SECS); timer_flag = 1; } /* else signal registered */ } /* if timer not running */ } /* while no shutdown requested */ /* TERMINATE */ /* Should this be rewritten to cooperate with other net tools? */ if (ioctl (sd, SIOCSIFFLAGS, &oldifr) < 0) { close (sd); perror ("Can't unset flags"); exit (4); } close (sd); shmdt( (char *)StatMem ); /* detach shared memory */ exit (0); } void exatalk (struct at_frame_type *buf, int length) { /* Need some documentation of these definitions and the AT packet types */ switch (buf->appletalk_type2) /* Appletalk */ { case 0x01: SM_regis.rtmprd++; break; case 0x02: SM_regis.nbp++; break; case 0x03: SM_regis.atp++; break; case 0x04: SM_regis.aep++; break; case 0x05: SM_regis.rtmpreq++; break; case 0x06: SM_regis.zip++; break; case 0x07: SM_regis.adsp++; break; default: break; } } void handle_other (unsigned char *buf, int length) { /* frame_protocol is global */ if (frame_protocol < 1501) { /* if IEEE 802.3 packet instead of Ethernet packet (per RFC 1700) */ if ((short int) buf[14] <= StatMem->sap_types.c_max) { tally( (short int)buf[14], &StatMem->sap_types ); /* count 802.2 SAP number */ } SM_regis.new_ethernet_count++; } /* if IEEE 802.3 packet instead of Ethernet packet */ else { /* else is an Ethernet packet */ switch (htons (((struct at_frame_type *) buf)->appletalk_type1)) /* Appletalk */ { case ETH_P_ATALK: if (options.at_option) exatalk ((struct at_frame_type *) buf, length); break; case ETH_P_AARP: SM_regis.aarp++; break; default: break; } } /* else is an Ethernet packet */ } void handle_ip (struct ip *buf, int length) { static int src_port, dest_port; if (buf->ip_p < StatMem->ip_types.c_max) { /* if IP protocol type is to be tallied */ tally( buf->ip_p, &StatMem->ip_types ); /* count IP protocol */ } /* if IP protocol type is to be tallied */ switch (buf->ip_p) /* IP Protocol */ { case IPPROTO_TCP: /* TCP */ { /* Fix to ignore "Don't Fragment" packets pointed out by spock@phoenix.earthlight.co.nz */ if ( #if (__BYTE_ORDER == __BIG_ENDIAN) (buf->ip_off != 0) && ((buf->ip_off & 0x4000) == 0) #elif (__BYTE_ORDER == __LITTLE_ENDIAN) (buf->ip_off != 0) && ((buf->ip_off & 0x0040) == 0) #else #error "Please fix " #endif ) { /* if this is not the first frame of a fragmented packet */ tally( 0, &StatMem->tcp_port ); /* count fragment */ } /* if this is not the first frame of a fragmented packet */ else { /* else this is the first frame of a packet */ /* The below may count packets twice, but probably both are not displayed */ if (buf->ip_hl == 5) { /* if IP header is normal length we can assume 20 octects length */ if ((src_port = ntohs (((struct tcphdr *) ((void *) buf + 20))->th_sport)) <= SN_MAX_TCP_PORTS) tally( src_port, &StatMem->tcp_port ); /* count source port */ if ((dest_port = ntohs (((struct tcphdr *) ((void *) buf + 20))->th_dport)) <= SN_MAX_TCP_PORTS) if (dest_port != src_port) { /* ignore when dest same as src to avoid apparent over-tallying */ tally( dest_port, &StatMem->tcp_port ); } /* ignore when dest same as src to avoid apparent over-tallying */ } /* IP header normal length */ else { /* IP header with options */ /* Incidentally, the (void *) is to cause byte-level math not sizeof(struct ip) */ if ((src_port = ntohs (((struct tcphdr *) ((void *) buf + ((buf->ip_hl) * 4)))->th_sport)) <= SN_MAX_TCP_PORTS) tally( src_port, &StatMem->tcp_port ); /* count source port */ if ((dest_port = ntohs (((struct tcphdr *) ((void *) buf + ((buf->ip_hl) * 4)))->th_dport)) <= SN_MAX_TCP_PORTS) if (dest_port != src_port) { /* ignore when dest same as src to avoid apparent over-tallying */ tally( dest_port, &StatMem->tcp_port ); } /* ignore when dest same as src to avoid apparent over-tallying */ } /* IP header with options */ } /* else this is the first frame of a packet */ } break; case IPPROTO_UDP: /* UDP */ { /* Fix to ignore "Don't Fragment" packets pointed out by spock@phoenix.earthlight.co.nz */ if ( #if (__BYTE_ORDER == __BIG_ENDIAN) (buf->ip_off != 0) && ((buf->ip_off & 0x4000) == 0) #elif (__BYTE_ORDER == __LITTLE_ENDIAN) (buf->ip_off != 0) && ((buf->ip_off & 0x0040) == 0) #else #error "Please fix " #endif ) { /* if this is not the first frame of a fragmented packet */ tally( 0, &StatMem->udp_port ); /* count fragment */ } /* if this is not the first frame of a fragmented packet */ else { /* else this is the first frame of a packet */ /* The below may count packets twice, but probably both are not displayed */ if (buf->ip_hl == 5) { /* if IP header is normal length we can assume 20 octects length */ if ((src_port = ntohs (((struct udphdr *) ((void *) buf + 20))->ui_sport)) <= SN_MAX_UDP_PORTS) tally( src_port, &StatMem->udp_port ); /* count source port */ if ((dest_port = ntohs (((struct udphdr *) ((void *) buf + 20))->ui_dport)) <= SN_MAX_UDP_PORTS) if (dest_port != src_port) { /* ignore when dest same as src to avoid apparent over-tallying */ tally( dest_port, &StatMem->udp_port ); } /* ignore when dest same as src to avoid apparent over-tallying */ } /* IP header normal length */ else { /* IP header with options */ /* Incidentally, the (void *) is to cause byte-level math not sizeof(struct ip) */ if ((src_port = ntohs (((struct tcphdr *) ((void *) buf + ((buf->ip_hl) * 4)))->ui_sport)) <= SN_MAX_UDP_PORTS) tally( src_port, &StatMem->udp_port ); /* count source port */ if ((dest_port = ntohs (((struct tcphdr *) ((void *) buf + ((buf->ip_hl) * 4)))->ui_dport)) <= SN_MAX_UDP_PORTS) if (dest_port != src_port) { /* ignore when dest same as src to avoid apparent over-tallying */ tally( dest_port, &StatMem->udp_port ); } /* ignore when dest same as src to avoid apparent over-tallying */ } /* IP header with options */ } /* else this is the first frame of a packet */ } break; default: /* Don't increment "Other" because are not displaying "Other IP" counts */ /* This packet does show in the "IP" total, but not elsewhere. */ break; } } void handle_frame (unsigned char *buf, int length, struct sockaddr *saddr) { int prot_int; int search_int; int prot_now; struct ip *ip_ptr; ip_ptr = (struct ip *) ((void *) buf + ETH_HLEN); if (length > 0) { packet_type = ((struct ether_head *) buf)->ether_type; /* Ethernet packet type ID field */ frame_protocol = ntohs (packet_type); /* Convert from network to host seq */ if (frame_protocol < 1501) { /* if an IEEE 802.3 packet */ frame_protocol = SN_PROT_IEEE802_3; } /* if an IEEE 802.3 packet */ /* The grand totals by interface type */ if (strncmp (saddr->sa_data, "eth", 3) == 0) { SM_regis.etherbytes += length; SM_regis.ethercount++; } else if (strncmp (saddr->sa_data, "plip", 4) == 0) { SM_regis.plipbytes += length; SM_regis.plipcount++; } else if (strncmp (saddr->sa_data, "lo", 2) == 0) { SM_regis.loopbytes += length; SM_regis.loopcount++; frame_protocol = SN_PROT_LOOP; } else if (strncmp (saddr->sa_data, "ppp", 3) == 0) { SM_regis.pppbytes += length; SM_regis.pppcount++; frame_protocol = SN_PROT_PPP; ip_ptr = (struct ip *) ((void *) buf); /* No Ethernet Header */ } else if (strncmp (saddr->sa_data, "sl", 2) == 0) { SM_regis.slipbytes += length; SM_regis.slipcount++; frame_protocol = SN_PROT_SLIP; ip_ptr = (struct ip *) ((void *) buf); /* No Ethernet Header */ } else { SM_regis.otherbytes += length; SM_regis.othercount++; } if( tally( frame_protocol, &StatMem->prot ) > 0 ) { /* if protocol was not found */ SM_regis.unknown_type++; SM_regis.unknown_frame_type = frame_protocol; } /* if protocol was not found */ switch (frame_protocol) { case ETH_P_IP: case SN_PROT_PPP: case SN_PROT_SLIP: case SN_PROT_LOOP: if (options.tcp_option || options.udp_option || options.ip_option) handle_ip (ip_ptr, length); break; case ETH_P_ATALK: if (options.at_option) exatalk ((struct at_frame_type *) ((void *) buf + ETH_HLEN), length); break; default: if (options.ip_option || options.at_option) handle_other (buf, length); break; } } /* if length > 0 */ } void signal_handler (int signal_number) { shutdown_flag = 1; /* shut down upon any signal */ } void usage (char *arg) { fprintf (stderr, "\n%s [-adgipstuh] [-k key] [-n name] [-w interface]\n\n", arg); fprintf (stderr, " Gather network statistics\n"); fprintf (stderr, " version " Quoteify(SNVERSION) "\n\n"); fprintf (stderr, " -a gather Appletalk statistics\n"); fprintf (stderr, " -c clear the other option settings\n"); fprintf (stderr, " -d daemonize (run in background)\n"); fprintf (stderr, " -g gather General statistics\n"); fprintf (stderr, " -i gather IP Protocols statistics\n"); fprintf (stderr, " -k key define shared memory key (base 8, 10, 16)\n"); fprintf (stderr, " -n name label this server with this name\n"); fprintf (stderr, " -p gather Protocols statistics\n"); fprintf (stderr, " -s gather IEEE 802.2 SAP statistics\n"); fprintf (stderr, " -t gather TCP/IP statistics\n"); fprintf (stderr, " -u gather UDP/IP statistics\n"); fprintf (stderr, " -w eth0 interface to watch\n"); fprintf (stderr, " -h show this message\n"); fprintf (stderr, " no options: gather most statisticss\n"); exit (0); } netdiag-1.2/statnet-3.8/tally.c000066400000000000000000000065661323731111400162610ustar00rootroot00000000000000/* tally.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 08FEB98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* This function tallies an item in a tally structure. */ #include "stat.h" int tally (int type_wanted, struct Tally *tally) { int result; int index, search_int, value_now; result = 0; search_int = 0; if( tally == (struct Tally *)0 ) result = 1; /* flag that could not tally here */ else { /* if pointer defined */ if( tally->count != (unsigned int *)0 ) { /* if using counter array */ if( type_wanted <= tally->c_max ) tally->count[type_wanted]++; else result = 2; /* flag that could not tally here */ } /* if using counter array */ else result = 3; /* flag that could not tally here */ if( result > 0 ) { /* if not tallied yet, try an array of types */ result = 0; if( tally->types != (unsigned int *)0 && tally->t_count != (unsigned int *)0 && tally->t_values != (unsigned int *)0 ) { /* if using an array of type counters */ for (index = 0; index < tally->t_max; index++) { /* for all counters */ if ((value_now = tally->types[index]) > 0) { /* if a type to display is defined */ if (tally->t_values[value_now] == type_wanted) { /* if this is the type number which was encountered */ tally->t_count[index]++; /* tally this type */ break; } /* if this is the type number which was encountered */ } /* if a type to display is defined */ } /* for all counters */ if (index >= tally->t_max) { /* if type was not found */ for (search_int = 0; search_int < tally->t_max_labels; search_int++) { /* for all known types */ if (type_wanted == tally->t_values[search_int]) { /* if wanted type was found */ if (tally->types[tally->t_max - 1] > 0 && tally->t_count[tally->t_max - 1] > 0) { /* if last displayed type was in use, add to bottom */ tally->t_count[tally->t_max-1] = 1; tally->types[tally->t_max-1] = search_int; /* remember type index */ } /* if last displayed type was in use, add to bottom */ tally->types[tally->t_max - 1] = search_int; tally->t_count[tally->t_max - 1] = 1; /* tally this type */ for (index = tally->t_max-1; index > 0; index--) { /* sort all displayed types */ if (tally->t_count[index] > tally->t_count[index-1] ) { /* if previous count is smaller than this one, shuffle up */ int temp_count, temp_type; temp_count = tally->t_count[index]; temp_type = tally->types[index]; tally->t_count[index] = tally->t_count[index-1]; tally->types[index] = tally->types[index-1]; tally->t_count[index-1] = temp_count; tally->types[index-1] = temp_type; } /* if previous count is smaller than this one, shuffle up */ } /* sort all displayed types */ break; } /* if wanted type was found */ } /* for all known types */ if( search_int >= tally->t_max_labels ) result = 4; /* not tallied */ } /* if type was not found */ } /* if using an array of type counters */ else result = 5; /* not tallied */ } /* if not tallied yet, try an array of types */ } /* if pointer defined */ return result; } netdiag-1.2/statnet-3.8/tally_delta.c000066400000000000000000000057351323731111400174270ustar00rootroot00000000000000/* tally_delta.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 15FEB98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #include "stat.h" /* Deal with overflow/restart in simpleminded way */ #define DIFFZERO(a,b) ( ( a > b ) ? ( a - b ) : 0 ) void tally_delta ( struct Tally *New_t, struct Tally *Prev_t, struct Tally *Delta_t ) { unsigned temp_int, search; if( New_t != (struct Tally *)0 && Prev_t != (struct Tally *)0 && Delta_t != (struct Tally *)0 ) { /* if pointers initialized */ Delta_t->types = Prev_t->types; Delta_t->t_count = Prev_t->t_count; if (New_t->type_code != disabled) { /* if type not disabled */ if( New_t->c_max > 0 && New_t->count != (unsigned int *)0 && Prev_t->count != (unsigned int *)0 && Delta_t->count != (unsigned int *)0 ) { /* if using array of counters */ for (temp_int = 0; temp_int <= New_t->c_max; temp_int++ ) { /* for all in the array of counters */ if( New_t->count[temp_int] > 0 ) Delta_t->count[temp_int] = DIFFZERO( New_t->count[temp_int], Prev_t->count[temp_int] ); else Delta_t->count[temp_int] = 0; } /* for all in the array of counters */ } /* if using array of counters */ if( New_t->t_max > 0 && New_t->types != (unsigned int *)0 && Prev_t->types != (unsigned int *)0 && Delta_t->types != (unsigned int *)0 && New_t->t_count != (unsigned int *)0 && Prev_t->t_count != (unsigned int *)0 && Delta_t->t_count != (unsigned int *)0 ) { /* if using array of types */ for (temp_int = 0; temp_int <= New_t->t_max; temp_int++ ) { /* for all types in the array */ if( New_t->t_count[temp_int] > 0 ) { /* if counter is in use */ if( New_t->types[temp_int] == Prev_t->types[temp_int] ) { /* if the protocol type has not moved */ Delta_t->t_count[temp_int] = DIFFZERO( New_t->t_count[temp_int], Prev_t->t_count[temp_int] ); } /* if the protocol type has not moved */ else { /* else protocol type not in same order */ for (search = 0; search <= New_t->t_max; search++ ) { /* for all protocol types */ if( temp_int != search && New_t->types[temp_int] == Prev_t->types[search] ) { /* if found same protocol type */ Delta_t->t_count[temp_int] = DIFFZERO( New_t->t_count[temp_int], Prev_t->t_count[search] ); break; /* found, stop searching */ } /* if found same protocol type */ } /* for all protocol types */ if (search > New_t->t_max) { /* if did not find same protocol */ Delta_t->t_count[temp_int] = 0; } /* if did not find same protocol */ } /* else protocol type not in same order */ } /* if counter is in use */ else Delta_t->t_count[temp_int] = 0; } /* for all types in the array */ } /* if using array of types */ } /* if type not disabled */ } /* if pointers initialized */ } netdiag-1.2/statnet-3.8/tally_init.c000066400000000000000000000027101323731111400172670ustar00rootroot00000000000000/* tally_init.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 21FEB98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* This initializes a struct Tally item. */ #include #include "stat.h" void tally_init ( struct Tally *ts, Tally_Type type_code, unsigned int *count, /* Array of counters */ int c_show_max, int *c_show_list, int c_max, /* Maximum counter index value */ char *c_labels, /* Array of counter labels */ unsigned int *types, /* Array of types */ unsigned int *t_count, /* Array of type counters */ unsigned int *t_values, /* Array of type values */ int t_max, /* Maximum type counter index value */ int t_max_labels, /* Maximum type label index value */ char *t_labels /* Array of type labels */ ) { int temp_int; memset( ts, 0, sizeof(struct Tally) ); ts->type_code = type_code; ts->count = count; ts->c_show_max = c_show_max; ts->c_show_list = c_show_list; ts->c_max = c_max; ts->c_labels = c_labels; if( c_max > 0 && count != (unsigned int *)0 ) { for (temp_int = 0; temp_int <= c_max; temp_int++) { ts->count[temp_int] = 0; } } ts->types = types; ts->t_count = t_count; ts->t_values = t_values; ts->t_max = t_max; ts->t_max_labels = t_max_labels; if( t_max > 0 && types != (unsigned int *)0 ) { for (temp_int = 0; temp_int <= t_max; temp_int++) { ts->types[temp_int] = 0; } } } netdiag-1.2/statnet-3.8/tally_label.c000066400000000000000000000063371323731111400174140ustar00rootroot00000000000000/* tally_label.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 15FEB98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ /* This shows labels for a struct Tally list. */ #include "stat.h" #include "curs.h" static WINDOW *win; tally_label ( struct Tally *Now_ts, WINDOW *win, int width, int height ) { int typelen; typelen = 1; if ( Now_ts != (struct Tally *)0 && Now_ts->type_code != disabled ) { /* if not disabled */ unsigned int temp_int, now_value; switch ( Now_ts->type_code ) { /* select type_code */ case protocol: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "===== PROTOCOLS ====="); mvwprintw (win, height - 1, 0, "Other:"); break; case appletalk: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "===== APPLETALK ====="); break; case ip_prot: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "==== IP PROTOCOLS ===="); break; case tcp: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "==== TCP/IP PORTS ===="); break; case udp: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "==== UDP/IP PORTS ===="); break; case sap: typelen = SN_PORT_TYPE_LEN+1; mvwprintw (win, 0, 0, "==== 802.2 SAP ===="); break; default: break; } /* select type_code */ if( Now_ts->count != (unsigned int *)0 && Now_ts->c_max > 0 && Now_ts->c_labels != (char *)0 && Now_ts->c_show_max > 0 && Now_ts->c_show_list != (int *)0 ) { /* if an array of counters */ for (temp_int = 0; temp_int < height-1 && temp_int < Now_ts->c_show_max; temp_int++) { /* for all counters */ if ((now_value=Now_ts->c_show_list[temp_int]) >= 0 && now_value <= Now_ts->c_max) { /* if something to show */ #if 0 /* this is just for tracing which value is being shown on display */ mvwprintw (win, 1 + temp_int, 0, "%3d%*.*s", now_value, 6, 6, &Now_ts->c_labels[now_value*typelen]); #else mvwprintw (win, 1 + temp_int, 0, "%*.*s", 9, 9, &Now_ts->c_labels[now_value*typelen]); #endif } /* if something to show */ else { /* else fill the line with spaces */ mvwprintw (win, 1 + temp_int, 0, "%*s", width - 1, " "); } /* else fill the line with spaces */ } /* for all counters */ } /* if an array of counters */ if( Now_ts->types != (unsigned int *)0 && Now_ts->t_max > 0 && Now_ts->t_max_labels > 0 && Now_ts->t_labels != (char *)0 ) { /* if an array of types */ for (temp_int = 0; temp_int < Now_ts->t_max; temp_int++) { /* for all types */ if (Now_ts->types[temp_int] > 0) { /* if something to show */ mvwprintw (win, 1 + temp_int, 0, "%*.*s", 9, 9, &Now_ts->t_labels[Now_ts->types[temp_int]*typelen]); } /* if something to show */ else { /* else fill the line with spaces */ mvwprintw (win, 1 + temp_int, 0, "%*s", width - 1, " "); } /* else fill the line with spaces */ } /* for all types */ } /* if an array of types */ } /* if not disabled */ } netdiag-1.2/statnet-3.8/tally_ntoh.c000066400000000000000000000146711323731111400173050ustar00rootroot00000000000000/* tally_ntoh.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 13MAR98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #include "stat.h" /* Copy a pointer which is relative to the start of a block of memory */ #define PtrCpy(A,B,AP,BP) AP = (void *)((A) + (((void *)BP) - ((void *)B))); void tally_ntoh ( int bytecode, struct StatMemStruct *New, struct StatMemStruct *Prev, struct Tally *New_t, struct Tally *Prev_t ) { unsigned temp_int, search; if( New_t != (struct Tally *)0 && Prev_t != (struct Tally *)0 ) { /* if pointers initialized */ switch( bytecode ) { /* switch bytecode */ default: case 0: case 1: New_t->type_code = Prev_t->type_code; if( Prev_t->count == (unsigned int *)0 ) New_t->count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->count,Prev_t->count); New_t->c_show_max = Prev_t->c_show_max; New_t->c_max = Prev_t->c_max; if( Prev_t->c_show_list == (int *)0 ) New_t->c_show_list = (int *)0; else PtrCpy(New,Prev,New_t->c_show_list,Prev_t->c_show_list); if( Prev_t->c_labels == (char *)0 ) New_t->c_labels = (char *)0; else PtrCpy(New,Prev,New_t->c_labels,Prev_t->c_labels); if( Prev_t->types == (unsigned int *)0 ) New_t->types = (unsigned int *)0; else PtrCpy(New,Prev,New_t->types,Prev_t->types); if( Prev_t->t_count == (unsigned int *)0 ) New_t->t_count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_count,Prev_t->t_count); if( Prev_t->t_values == (unsigned int *)0 ) New_t->t_values = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_values,Prev_t->t_values); New_t->t_max = Prev_t->t_max; New_t->t_max_labels = Prev_t->t_max_labels; if( Prev_t->t_labels == (char *)0 ) New_t->t_labels = (char *)0; else PtrCpy(New,Prev,New_t->t_labels,Prev_t->t_labels); break; case 2: New_t->type_code = Prev_t->type_code; if( Prev_t->count == (unsigned int *)0 ) New_t->count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->count,ntohl((int)Prev_t->count)); New_t->c_show_max = Prev_t->c_show_max; New_t->c_max = Prev_t->c_max; if( Prev_t->c_show_list == (int *)0 ) New_t->c_show_list = (int *)0; else PtrCpy(New,Prev,New_t->c_show_list,ntohl((int)Prev_t->c_show_list)); if( Prev_t->c_labels == (char *)0 ) New_t->c_labels = (char *)0; else PtrCpy(New,Prev,New_t->c_labels,ntohl((int)Prev_t->c_labels)); if( Prev_t->types == (unsigned int *)0 ) New_t->types = (unsigned int *)0; else PtrCpy(New,Prev,New_t->types,ntohl((int)Prev_t->types)); if( Prev_t->t_count == (unsigned int *)0 ) New_t->t_count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_count,ntohl((int)Prev_t->t_count)); if( Prev_t->t_values == (unsigned int *)0 ) New_t->t_values = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_values,ntohl((int)Prev_t->t_values)); New_t->t_max = Prev_t->t_max; New_t->t_max_labels = Prev_t->t_max_labels; if( Prev_t->t_labels == (char *)0 ) New_t->t_labels = (char *)0; else PtrCpy(New,Prev,New_t->t_labels,ntohl((int)Prev_t->t_labels)); break; case 3: New_t->type_code = Prev_t->type_code; if( Prev_t->count == (unsigned int *)0 ) New_t->count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->count,htonl((int)Prev_t->count)); New_t->c_show_max = Prev_t->c_show_max; New_t->c_max = Prev_t->c_max; if( Prev_t->c_show_list == (int *)0 ) New_t->c_show_list = (int *)0; else PtrCpy(New,Prev,New_t->c_show_list,htonl((int)Prev_t->c_show_list)); if( Prev_t->c_labels == (char *)0 ) New_t->c_labels = (char *)0; else PtrCpy(New,Prev,New_t->c_labels,htonl((int)Prev_t->c_labels)); if( Prev_t->types == (unsigned int *)0 ) New_t->types = (unsigned int *)0; else PtrCpy(New,Prev,New_t->types,htonl((int)Prev_t->types)); if( Prev_t->t_count == (unsigned int *)0 ) New_t->t_count = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_count,htonl((int)Prev_t->t_count)); if( Prev_t->t_values == (unsigned int *)0 ) New_t->t_values = (unsigned int *)0; else PtrCpy(New,Prev,New_t->t_values,htonl((int)Prev_t->t_values)); New_t->t_max = Prev_t->t_max; New_t->t_max_labels = Prev_t->t_max_labels; if( Prev_t->t_labels == (char *)0 ) New_t->t_labels = (char *)0; else PtrCpy(New,Prev,New_t->t_labels,htonl((int)Prev_t->t_labels)); break; } /* switch bytecode */ if (New_t->type_code != disabled) { /* if type not disabled */ if( New_t->c_max > 0 && New_t->count != (unsigned int *)0 && Prev_t->count != (unsigned int *)0 ) { /* if using array of counters */ for (temp_int = 0; temp_int <= New_t->c_max; temp_int++ ) { /* for all in the array of counters */ switch( bytecode ) { /* switch bytecode */ default: case 0: case 1: New_t->count[temp_int] = Prev_t->count[temp_int]; break; case 2: New_t->count[temp_int] = ntohl(Prev_t->count[temp_int]); break; case 3: New_t->count[temp_int] = htonl(Prev_t->count[temp_int]); break; } /* switch bytecode */ } /* for all in the array of counters */ } /* if using array of counters */ if( New_t->t_max > 0 && New_t->types != (unsigned int *)0 && Prev_t->types != (unsigned int *)0 && New_t->t_count != (unsigned int *)0 && Prev_t->t_count != (unsigned int *)0 && New_t->t_values != (unsigned int *)0 && Prev_t->t_values != (unsigned int *)0 ) { /* if using array of types */ for (temp_int = 0; temp_int <= New_t->t_max; temp_int++ ) { /* for all types in the array */ switch( bytecode ) { /* switch bytecode */ default: case 0: case 1: New_t->t_count[temp_int] = Prev_t->t_count[temp_int]; break; case 2: New_t->t_count[temp_int] = ntohl(Prev_t->t_count[temp_int]); break; case 3: New_t->t_count[temp_int] = htonl(Prev_t->t_count[temp_int]); break; } /* switch bytecode */ } /* for all types in the array */ } /* if using array of types */ } /* if type not disabled */ } /* if pointers initialized */ } netdiag-1.2/statnet-3.8/win_show_stat.c000066400000000000000000000120461323731111400200120ustar00rootroot00000000000000/* win_show_stat.c is part of Statnet */ /* Statnet is protected under the GNU Public License (GPL2). */ /* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */ /* 05FEB98: Scot E. Wilcoxon (sewilco@fieldday.mn.org) */ #include #include "stat.h" #include "curs.h" void win_show_stat( WINDOW *win, int X, int Y, int noframes, struct Tally *Now_ts, struct Tally *Prev_ts, struct Tally *Delta_ts, short rewrite_labels, short *update_labels, void *show_labels() ) { if (win != NULL) { /* if window to be shown */ int port_int, port_now, now_value; int last_value; unsigned int search_int; if (rewrite_labels || *update_labels) { show_labels ( Now_ts ); *update_labels = 0; } if( Now_ts->c_show_max > 0 && Now_ts->c_show_list != (int *)0 && Delta_ts->count != (unsigned int *)0 ) { /* if an array of counters to display */ last_value = 0; for (port_int = 0; port_int < Now_ts->c_show_max; port_int++) { /* do any needed sorting */ if ((port_now = Now_ts->c_show_list[port_int]) >= 0) { /* if a counter to display is defined */ now_value = Delta_ts->count[port_now]; if (now_value > last_value) { /* if should move this higher on the list */ if (port_int > 0 && (now_value > SN_LIST_SWAP || Now_ts->c_show_list[port_int - 1] < 0 || port_int == Now_ts->c_show_max-1)) { /* if not already at the top of the list, swap */ Now_ts->c_show_list[port_int] = Now_ts->c_show_list[port_int - 1]; Now_ts->c_show_list[port_int - 1] = port_now; *update_labels = 1; } /* if not already at the top of the list, swap */ } /* if should move this higher on the list */ last_value = now_value; } /* if a counter to display is defined */ else last_value = 0; } /* do any needed sorting */ for (port_int = 0; port_int < Now_ts->c_show_max; port_int++) { /* for all counters to display */ if ((port_now = Now_ts->c_show_list[port_int]) >= 0) { /* if a counter to display is defined */ now_value = Delta_ts->count[port_now]; mvwprintw (win, Y + port_int, X, "%5d %5.1f%%", now_value, now_value * 100.0 / noframes); last_value = now_value; } /* if a counter to display is defined */ else last_value = 0; } /* for all counters to display */ if (last_value == 0) { /* if last item on the screen is zero, find something to replace it */ for (search_int = 0; search_int <= Now_ts->c_max; search_int++) { /* for all counters which might be displayed */ if (now_value = Delta_ts->count[search_int]) { /* if another port with activity was found */ for (port_int = 0; port_int < Now_ts->c_show_max; port_int++) { /* for all TCP protocols to display */ if (Now_ts->c_show_list[port_int] == search_int) break; /* if this has been displayed, don't need to consider it further */ if (Now_ts->c_show_list[port_int] < 0) { /* if a TCP protocol to display is not defined for this field */ Now_ts->c_show_list[port_int] = search_int; mvwprintw (win, Y + port_int, X, "%5d %5.1f%%", now_value, now_value * 100.0 / noframes); *update_labels = 1; break; } /* if a TCP protocol to display is not defined for this field */ } /* for all TCP protocols to display */ if (port_int >= Now_ts->c_show_max) { /* if no empty TCP protocol slot was found */ Now_ts->c_show_list[Now_ts->c_show_max - 1] = search_int; mvwprintw (win, Y+Now_ts->c_show_max-1, X, "%5d %5.1f%%", now_value, now_value * 100.0 / noframes); *update_labels = 1; break; } /* if no empty TCP protocol slot was found */ } /* if another port with activity was found */ } /* for all counters which might be displayed */ } /* if last item on the screen is zero, find something to replace it */ } /* if an array of counters to display */ if( Now_ts->t_max > 0 ) { /* if an array of types to display */ for (port_int = 0; port_int < Now_ts->t_max; port_int++) { /* for all types to display */ if ((port_now = Now_ts->types[port_int]) > 0) { /* if a type to display is defined for this field */ if ( Prev_ts->types[port_int] != Now_ts->types[port_int] ) { /* if types have changed */ *update_labels = 1; } /* if types have changed */ now_value = Delta_ts->t_count[port_int]; mvwprintw (win, port_int + Y, X, "%5d %5.1f%%", now_value, now_value * 100.0 / noframes); } /* if a type to display is defined for this field */ } /* for all types to display */ } /* if an array of types to display */ if (rewrite_labels || *update_labels) { show_labels ( Now_ts ); *update_labels = 0; } } /* if window to be shown */ } /* win_show_stat() */ netdiag-1.2/tcpblast-20011111/000077500000000000000000000000001323731111400154635ustar00rootroot00000000000000netdiag-1.2/tcpblast-20011111/.ccmalloc000066400000000000000000000407331323731111400172500ustar00rootroot00000000000000 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% generic configureation file for %%%% %%%% the ccmalloc memory profiler %%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %-----------------------------------------------------------------% % COPY THIS FILE TO `.ccmalloc' in your project or home directory % %-----------------------------------------------------------------% ############################################################################## ## (C) 1997-1998 Armin Biere, 1998 Johannes Keukelaar ## $Id: ccmalloc.cfg,v 1.1.1.1 2000/05/02 13:59:26 biere Exp $ ############################################################################## %%% `%' and `#' are comments !!!!!!! % This file must be called `.ccmalloc' and is searched for in the % current directory and in the home directory of the user. If it % does not exist then the default values mentioned below are used. % It is also the currently only available user manual ;-) So here % is a reading hint. First have a look at the short one line % descriptions of each option ... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % with `file' the executable is specified [a.out] % ---------------------------------------------------------------------- % This should not be necessary for Linux and Solaris because the proc % file system can be used to find argv[0]. % % (the rest of this comment only applies to other OS) % % For other OS you should use this option unless the executable is % in the current directory or its name is `a.out'. % % If you do not specify this then ccmalloc tries to find an executable % in the current directory that matches the running program starting % with `a.out'. For this process it must call `nm' on each executable % file in the directory which may be time consuming. With this option % you can speed up this process. % % You can also specify absolute or relative path names. This is % necessary if you do not start your program from the current directory. % But you can also simply link or name your program to `a.out'. %file FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `log' specify the logfile [stderr] % ---------------------------------------------------------------------- % The default is to use stderr. The argument to `log' is the name of % the file you want to write to. It can also be `stdout' or `-' which % sets stdout as logfile. If the logfile is stdout or stderr and is % connected to a terminal then the output is slightly different. % % For big programs the logfile can be really big. To reduce the size % you can use a small chain length (see `chain-length' below). The other % possibility is to use compressed logfiles. This can be done by % specifying a logfile name with a `.gz' (or a `.Z') suffix. This means % that gnuzip (resp. compress) is used to compress the output. %log FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `logpid' specify the logfile % ---------------------------------------------------------------------- % Can be used alternatively to the `log' command if you want to use % ccmalloc for debugging parallel applications where several copies of % the program you are debugging must be run simoultaneously. In this % case you can not use `log' because you do not want to write to the same % log file. Using `logpid' uses a file name ending with the of % the process which means the name is unique even if several copies of % your program are run simoultaneously. % % If you use the compressing suffixes then the is inserted before % the suffix (e.g. `logpid ccmalloc.log.gz' uses `ccmalloc.log..gz' % as the name for the log file). %logpid FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `dont-log-chain' skip info about certain chains [] % ---------------------------------------------------------------------- % This command may be repeated any number of times. The argument to this % command is a comma-separated list of function-or-file-and-line % specifications. Garbage allocated from a callchain that contains this % subchain anywhere will _not_ be logged. % % The comma-separated list should not contain any spaces. E.g. not: % main, foo, bar % but: % main,foo,bar % A function-or-file-and-line specification is a string followed by an % optional colon and number, for example: main or main:14 or main.c or % main.c:15. Note that the string is compared with both the function and % the file name, if available. If main.c happens to be a function name, % that will cause a match (for that string at least). % Not specifying a line number will match any line number. If line number % information is not available, anything will match! % Not specifying a name (e.g. ,,,) will match an unknown function name. % Not giving any parameters at all, will match a chain containing at least % one unknown function. % % Note that if you say % dont-log-chain wrapper.c % _nothing_ will be logged... %dont-log-chain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `only-log-chain' skip info about other chains [] % ---------------------------------------------------------------------- % The obvious counterpart to dont-log-chain. In this case, only matching % chains will be reported. Non-matching chains will not be reported. % Can be repeated any number of times; if the chain matches any of the % instances, it will be reported. %only-log-chain ######################################################################## # # # This is the `flag' section # # # # `set FLAG' is the same as `set FLAG 1' # # # # The default values are those set below. If `silent' is disabled # # then you will find the banner in the log file (or it is listed on # # stdout or stderr). The banner describes the current settings of all # # these flags. # # # ######################################################################## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % with `only-count' ccmalloc only counts garbage - no call chains [0] % ---------------------------------------------------------------------- % If only-count is set to one then only one additional pointer for % each allocated data is used and no call chain is generated. This is % the fasted and most space efficient mode ccmalloc can operate % in. In this mode you get at least the size of garbage produced. % % Note that `check-free-space' does not work at all with `only-count' % set and over writes (`check-overwrites') are only checked when % calling free. %set only-count 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `load-dynlibs' load dynamic linked libraries into gdb [0] % ---------------------------------------------------------------------- % If your program is linked with dynamic libraries, function and file % name information is not available for addresses in those libraries, % unless you set `load-dynlibs' to 1. set load-dynlibs 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `keep-deallocated-data' does not recycle deallocated data [0] % ---------------------------------------------------------------------- % If you enable keep-deallocated-data then all data deallocated with % `free' (or `delete' in C++) is not given back to the free store % but stays associated with the call chain of its allocation. This is % very useful if your program does multiple deallocation of the % same data. set keep-deallocated-data 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `check-overwrites' detect overwrites [0] % ---------------------------------------------------------------------- % If you want to detect `off by n bytes' errors you should set % `checking-overwrites' to n/4 (on 32-Bit machines). % % ccmalloc inserts a boundary above allocated data. This boundary % consists of `check-overwrites' words. If your program writes to % this area then ccmalloc can detect this (see also check-start % and check-interval). `ccmalloc' also does checking for overwrites % at non word boundaries (e.g. strcpy(malloc(strlen("hello")),"hello");) set check-overwrites 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `check-underwrites' detect overwrites [0] % ---------------------------------------------------------------------- % same with writes below allocated data. You do not have to set this % option if you only want detect `off (below) by one' errors because % ccmalloc keeps a magic value just before the user data. set check-overwrites 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `check-free-space' can be used to find dangling pointers. [0] % ---------------------------------------------------------------------- % A very serious type of bug is to write on data that has already been % freed. If this happens the free space management of malloc is in % trouble and you will perhaps encounter non deterministic behaviour of % your program. To test this first enable `keep-deallocated-data' and % restart your program. If the problem goes away and ccmalloc does not % report anything then you should *also* enable `check-free-space'. Now % ccmalloc checks already deallocated data for corruption. % % Note that to perform this check `keep-deallocated-data' also must % be enabled and `only-count' disabled. set check-free-space 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `check-interval' can be used to speed up checks [0] % ---------------------------------------------------------------------- % If check-overwrite, check-underwrites or check-free-space is set then % the default is to do `write checks' when data is deallocated and % to do `free space checks' when reporting together with % `write checks' for garbage. When you want these checks to be % performed more often then you should set `check-interval' to a % positive number. This number is the interval between the number of % calls to free or malloc without performing the checks. %set check-interval 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `check-start' can be used to speed up checks [0] % ---------------------------------------------------------------------- % The flag `check-start' delays the start of checks until the given % number of calls to free and malloc have occured. Together with % `check-interval' you can use a binary search to find an aproximation % when a corruption occured! If you simply set check-interval to 1 and % check-start to 0 then this will slow done your program too much. %set check-start 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `silent' disables banner [0] % ---------------------------------------------------------------------- % If you don't want to see the banner of ccmalloc then set % `silent' to 1 (f.e. when logging to stderr) set silent 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `file-info' en/disables file and line number information [1] % ---------------------------------------------------------------------- % If your program was compiled with debugging information (-g) then % ccmalloc can generate line number and file info for call chains opening % a pipe to gdb. For very big programs this method is slow. In this case % you can set `file-info' to zero and you will only get the function % names. For SunOS 4.3.1 `nm' does not `demangle' C++ identifiers % very well. So gdb is called instead but only if `file-info' is % not set to 0. set file-info 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `continue' if ccmalloc aborts when something weired happened [0] % ---------------------------------------------------------------------- % If the free function of ccmalloc is called with an argument that does % not make sense to ccmalloc or that has already been freed then you % probably want the program to stop at this point. This is also % the default behaviour. But you can force ccmalloc also to ignore % this if you set `continue' to 1. This flag also controls the behaviour % of ccmalloc when free space is found to be corrupted or a write % boundary has been overwritten. %set continue 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `chain-length' is the length of the maximal call chain [0 = infinite] % ---------------------------------------------------------------------- % You can restrict the length of call chains by setting `chain-length' % to a number greater than zero. If `chain-length' is zero (the default) % then chains are as long as possible (on a non x86 system only call % chains with a finite maximal length can be generated). For big % programs especially if keep-deallocated-data is enabled this can % reduce the size of the log file from over 100MB to several MB! %set chain-length 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `print-addresses' of data [0] % ---------------------------------------------------------------------- % If you want to see the addresses of the allocated data (and % deallocated data if keep-deallocated-data is set to 1) set % `print-addresses' to 1. set print-addresses 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `print-on-one-line' shortens log file [0] % ---------------------------------------------------------------------- % The default is to print function names and file/line number info % on separate lines. With `print-on-one-line' set 1 all are printed % on one line. set print-on-one-line 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `additional-line' enlarges readability [1] % ---------------------------------------------------------------------- % When printing call chains an empty line is printed between to % call points. Set `additional-line' to 0 to disable this feature. set additional-line 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % `statistics' enables more accurate profiling [0] % ---------------------------------------------------------------------- % Calculate number of allocations and deallocations and bytes also on % a per call chain basis. This uses 4 additional pointers for each % call chain. set statistics 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % set order for sorting of call chains [1] [1] % ---------------------------------------------------------------------- % When printing the report to the log file the call chains are sorted by % default with respect to the largest accumulated garbage produced by % that call chain. This can be changed with setting `sort-by-wasted' % to 0. In this case they are sorted by the number of allocated bytes. % If you want the number of allocations (only possible if `statistics' % is enabled) as sorting criteria instead then set `sort-by-size' to 0. %set sort-by-wasted 1 %set sort-by-size 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % report library chains [0] % ---------------------------------------------------------------------- % Some external libraries (like libg++) have memory leaks. On some % systems even a call to printf produces a leak. ccmalloc tries to % detect this (only heuristically!) and with this flag you can control % if leaks produced by such library calls are reported. % % Since version 0.2.1 some similar effect can be achieved by using % `dont-log-chain' with no argument. %set library-chains 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % print debugging information [X] (compile time dependend) % ---------------------------------------------------------------------- %set debug X %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % align memory on 8 byte boundary [0] (no effect on SunOS or Solaris) % ---------------------------------------------------------------------- %set align-8-byte 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % only report allocations which ended up being wasted (i.e don't report % allocations which were completely freed properly. ) [1] % ---------------------------------------------------------------------- set only-wasting-alloc 1 netdiag-1.2/tcpblast-20011111/Makefile.in000066400000000000000000000045751323731111400175430ustar00rootroot00000000000000# Makefile.in borrowed from nmap-2.3BETA6 by fyodor@dhp.com prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ mandir = @mandir@ srcdir = @srcdir@ libdir = @libdir@ CC = @CC@ OPTOPT = -g -O3 # -pg -a CCOPT = $(OPTOPT) INCLS = -I. DEFS = @DEFS@ -DVERSION=\"@VERSION@\" CFLAGS = @CFLAGS@ $(CCOPT) $(DEFS) $(INCLS) # CFLAGS = -g -Wall $(DEFS) $(INCLS) STATIC = LDFLAGS = $(OPTOPT) @LDFLAGS@ $(STATIC) LIBS = @LIBS@ SHTOOL = ./shtool INSTALL = $(SHTOOL) install MAKEDEPEND = @MAKEDEPEND@ RPMTDIR=$(HOME)/rpmdir RH = /usr/src/redhat HOME=root@6bone-gw.6bone.pl:~ftp/pub/blast TARGET = tcpblast TARGET2 = discard SRCS = tcpblast.c @COMPAT_SRCS@ OBJS = @COMPAT_OBJS@ @LIBOBJS@ all: $(TARGET) $(TARGET2) $(TARGET): $(OBJS) tcpblast.o rm -f $@ $(CC) $(LDFLAGS) -o $@ tcpblast.o $(OBJS) $(LIBS) $(TARGET2): $(OBJS) discard.o rm -f $@ $(CC) $(LDFLAGS) -o $@ discard.o $(OBJS) $(LIBS) clean: rm -f *.o gmon.* *~ distclean: clean rm -f Makefile Makefile.bak config.h stamp-h stamp-h.in \ config.cache config.log config.status $(TARGET) $(TARGET2) purge: distclean distr: distclean cd ..; tar cvvzf $(TARGET)-@VERSION@.tar.gz $(TARGET)-@VERSION@; cp -p $(TARGET)-@VERSION@.tar.gz $(RH)/SOURCES rpm -ba docs/tcpblast.spec # theoretically the release number could change sometimes scp -Cpv $(RH)/SRPMS/$(TARGET)-@VERSION@-1.src.rpm $(RH)/RPMS/i386/$(TARGET)-@VERSION@-1.i386.rpm ../$(TARGET)-@VERSION@.tar.gz docs/README docs/tcpblast.lsm $(HOME) depend: $(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS) install: all $(SHTOOL) mkdir -f -p -m 755 $(sbindir) $(mandir)/man8 $(INSTALL) -s -c -m 755 $(TARGET) $(sbindir)/$(TARGET) $(INSTALL) -c -m 644 docs/$(TARGET).8 $(mandir)/man8/$(TARGET).8 echo Ignore error which may follow. cd $(sbindir); ln -s tcpblast udpblast uninstall: rm -f $(sbindir)/$(TARGET) $(sbindir)/udpblast ${srcdir}/configure: configure.in cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in acconfig.h \ config.h.top config.h.bot cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status ./config.status Makefile: Makefile.in config.status ./config.status config.status: configure ./config.status --recheck # DO NOT DELETE -- Needed by makedepend netdiag-1.2/tcpblast-20011111/compat.h000066400000000000000000000035421323731111400171230ustar00rootroot00000000000000#include /* for Solaris 2.6 */ #ifndef INADDR_NONE # ifndef INADDR_BROADCAST # define INADDR_NONE -1 # else # define INADDR_NONE INADDR_BROADCAST # endif #endif #ifndef HAVE_STRSEP char *strsep (char **stringp, const char *delim); #endif /* HAVE_STRSEP */ #ifndef HAVE_DAEMON int daemon(int nochdir, int noclose); #endif /* HAVE_DAEMON */ #ifndef HAVE_TIMERSUB #define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((result)->tv_usec >= 1000000) \ { \ ++(result)->tv_sec; \ (result)->tv_usec -= 1000000; \ } \ } while (0) #define timersub(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((result)->tv_usec < 0) { \ --(result)->tv_sec; \ (result)->tv_usec += 1000000; \ } \ } while (0) #endif /* HAVE_TIMERSUB */ #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif /* HAVE_SOCKLEN_T */ netdiag-1.2/tcpblast-20011111/config.guess000077500000000000000000001056271323731111400200160ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. version='2000-07-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of this system. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit" help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) exec >&2 echo "$me: invalid option $1" echo "$help" exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then CC_FOR_BUILD="$HOST_CC" else if test x"$CC" != x; then CC_FOR_BUILD="$CC" else CC_FOR_BUILD=cc fi fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-cbm ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in *ia64) echo "${UNAME_MACHINE}-unknown-linux" exit 0 ;; i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; elf_i?86) echo "${UNAME_MACHINE}-pc-linux" exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32arm*) echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" exit 0 ;; armelf_linux*) echo "${UNAME_MACHINE}-unknown-linux-gnu" exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32ppc | elf32ppclinux) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unkown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; shelf_linux) echo "${UNAME_MACHINE}-unknown-linux-gnu" exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif #ifdef __MIPSEL__ printf ("%sel-unknown-linux-gnu\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy elif test "${UNAME_MACHINE}" = "s390"; then echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-W:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess version = $version uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "version='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: netdiag-1.2/tcpblast-20011111/config.h.in000066400000000000000000000015301323731111400175050ustar00rootroot00000000000000#undef STDC_HEADERS #undef HAVE_STRING_H #undef HAVE_GETOPT_H #undef HAVE_STRINGS_H #undef HAVE_BSTRING_H #undef HAVE_SOCKLEN_T #undef WORDS_BIGENDIAN #undef HAVE_MEMORY_H #undef HAVE_BZERO #undef HAVE_STRERROR #undef HAVE_SYS_PARAM_H #undef HAVE_SYS_SOCKIO_H #undef BSD_NETWORKING #undef HAVE_SNPRINTF #undef HAVE_GETOPT_LONG #undef HAVE_STRSEP #undef HAVE_DAEMON #undef HAVE_TIMERSUB /* assuming we can use IPv6 if getaddrinfo() exists */ #undef HAVE_GETADDRINFO /* if there is no inet_pton() we assume that specified source address is IPv4 and can be converted by inet_addr */ #undef HAVE_INET_PTON #undef HAVE_IN6_ADDR #undef HAVE_NETINET_IN_SYSTEM_H #undef STUPID_SOLARIS_CHECKSUM_BUG #undef SPRINTF_RETURNS_STRING #undef LINUX #undef FREEBSD #undef OPENBSD #undef SOLARIS #undef SUNOS #undef BSDI #undef IRIX #undef NETBSD netdiag-1.2/tcpblast-20011111/config.sub000077500000000000000000000634641323731111400174630ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. version='2000-07-06' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit" help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case "$1" in --version | --vers* | -V ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) exec >&2 echo "$me: invalid option $1" echo "$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[234567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ | bs2000-* | tic54x-* | c54x-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; i386-go32 | go32) basic_machine=i386-unknown os=-go32 ;; i386-mingw32 | mingw32) basic_machine=i386-unknown os=-mingw32 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-unknown os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4) base_machine=sh-unknown ;; sparc | sparcv9) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i[34567]86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -*MiNT) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -*MiNT) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "version='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: netdiag-1.2/tcpblast-20011111/configure000077500000000000000000001625541323731111400174070ustar00rootroot00000000000000#! /bin/sh VERSION=`pwd | sed 's/.*-//'` if test -d /usr/local/lib; then LDFLAGS="$LDFLAGS -L/usr/local/lib" fi if test -d /usr/local/include; then CFLAGS="$CLFAGS -I/usr/local/include" fi # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=tcpblast.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:541: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:571: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:622: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 665 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:701: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:729: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi if test -n "$GCC"; then CFLAGS="$CFLAGS -Wall " fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:793: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 linux=no case "$host" in *-netbsd*) cat >> confdefs.h <<\EOF #define NETBSD 1 EOF ;; *-openbsd*) cat >> confdefs.h <<\EOF #define OPENBSD 1 EOF ;; *-sgi-irix5*) cat >> confdefs.h <<\EOF #define IRIX 1 EOF no_libsocket=yes no_libnsl=yes if test -z "$GCC"; then sgi_cc=yes fi ;; *-sgi-irix6*) cat >> confdefs.h <<\EOF #define IRIX 1 EOF no_libsocket=yes no_libnsl=yes if test -z "$GCC"; then sgi_cc=yes fi ;; *-solaris2.0*) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris2.1*) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris2.2*) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris2.3*) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris2.4*) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris2.5.1) cat >> confdefs.h <<\EOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 EOF cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-solaris*) cat >> confdefs.h <<\EOF #define SOLARIS 1 EOF ;; *-sunos4*) cat >> confdefs.h <<\EOF #define SUNOS 1 EOF cat >> confdefs.h <<\EOF #define SPRINTF_RETURNS_STRING 1 EOF no_libnsl=yes no_libsocket=yes ;; *-linux*) linux=yes cat >> confdefs.h <<\EOF #define LINUX 1 EOF cat >> confdefs.h <<\EOF #define PCAP_TIMEOUT_IGNORED 1 EOF # libpcap doesn't even LOOK at # the timeout you give it under Linux ;; *-freebsd*) cat >> confdefs.h <<\EOF #define FREEBSD 1 EOF ;; *-bsdi*) cat >> confdefs.h <<\EOF #define BSDI 1 EOF ;; esac if test -z "$no_libnsl"; then echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 echo "configure:957: checking for inet_ntoa in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi if test -z "$no_libsocket"; then echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 echo "configure:1006: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1055: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1135: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi for ac_hdr in string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1242: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:1279: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 echo "configure:1317: checking for socklen_t" >&5 cat > conftest.$ac_ext < #include int main() { socklen_t len; len = 1; ; return 0; } EOF if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 EOF else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 echo "configure:1343: checking for in6_addr" >&5 cat > conftest.$ac_ext < #include int main() { struct in6_addr addr; ; return 0; } EOF if { (eval echo configure:1354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF #define HAVE_IN6_ADDR 1 EOF else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 echo "configure:1372: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include int main() { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } EOF if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include int main() { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } EOF if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_bigendian=no fi rm -f conftest* else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_c_bigendian=yes fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_c_bigendian" 1>&6 if test $ac_cv_c_bigendian = yes; then cat >> confdefs.h <<\EOF #define WORDS_BIGENDIAN 1 EOF fi for ac_func in bzero getaddrinfo inet_pton strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1467: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for timersub""... $ac_c" 1>&6 echo "configure:1521: checking for timersub" >&5 cat > conftest.$ac_ext < int main() { #ifndef timersub error #endif ; return 0; } EOF if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF #define HAVE_TIMERSUB 1 EOF else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 echo "configure:1547: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getopt_long(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getopt_long) || defined (__stub___getopt_long) choke me #else getopt_long(); #endif ; return 0; } EOF if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt_long=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getopt_long=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 COMPAT_SRCS="$COMPAT_SRCS getopt.c getopt1.c" COMPAT_OBJS="$COMPAT_OBJS getopt.o getopt1.o" fi for ac_func in strsep daemon do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1600: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir trap 'rm -fr `echo "Makefile docs/tcpblast.spec config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@VERSION@%$VERSION%g s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@COMPAT_OBJS@%$COMPAT_OBJS%g s%@COMPAT_SRCS@%$COMPAT_SRCS%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 netdiag-1.2/tcpblast-20011111/configure.in000066400000000000000000000064451323731111400200050ustar00rootroot00000000000000# configure.in borrowed from nmap-2.3BETA6 by fyodor@dhp.com AC_SUBST(VERSION) VERSION=`pwd | sed 's/.*-//'` if test -d /usr/local/lib; then LDFLAGS="$LDFLAGS -L/usr/local/lib" fi if test -d /usr/local/include; then CFLAGS="$CLFAGS -I/usr/local/include" fi dnl Process this file with autoconf to produce a configure script. AC_INIT(tcpblast.c) dnl use config.h instad of -D macros AC_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC if test -n "$GCC"; then CFLAGS="$CFLAGS -Wall " fi AC_SUBST(COMPAT_OBJS) AC_SUBST(COMPAT_SRCS) dnl Host specific hacks AC_CANONICAL_HOST linux=no case "$host" in *-netbsd*) AC_DEFINE(NETBSD) ;; *-openbsd*) AC_DEFINE(OPENBSD) ;; *-sgi-irix5*) AC_DEFINE(IRIX) no_libsocket=yes no_libnsl=yes if test -z "$GCC"; then sgi_cc=yes fi ;; *-sgi-irix6*) AC_DEFINE(IRIX) no_libsocket=yes no_libnsl=yes if test -z "$GCC"; then sgi_cc=yes fi ;; *-solaris2.0*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris2.1*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris2.2*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris2.3*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris2.4*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris2.5.1) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) ;; *-solaris*) AC_DEFINE(SOLARIS) ;; *-sunos4*) AC_DEFINE(SUNOS) AC_DEFINE(SPRINTF_RETURNS_STRING) no_libnsl=yes no_libsocket=yes ;; *-linux*) linux=yes AC_DEFINE(LINUX) AC_DEFINE(PCAP_TIMEOUT_IGNORED) # libpcap doesn't even LOOK at # the timeout you give it under Linux ;; *-freebsd*) AC_DEFINE(FREEBSD) ;; *-bsdi*) AC_DEFINE(BSDI) ;; esac dnl Checks for libraries. dnl AC_CHECK_LIB(m, pow) if test -z "$no_libnsl"; then AC_CHECK_LIB(nsl, inet_ntoa) fi if test -z "$no_libsocket"; then AC_CHECK_LIB(socket, socket) fi dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h sys/time.h ) AC_HEADER_TIME dnl AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl socklen_t AC_MSG_CHECKING(for socklen_t) AC_TRY_COMPILE([ #include #include ], [socklen_t len; len = 1;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKLEN_T)], [AC_MSG_RESULT(no)]) dnl in6_addr AC_MSG_CHECKING(for in6_addr) AC_TRY_COMPILE([ #include #include ], [struct in6_addr addr;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_IN6_ADDR)], [AC_MSG_RESULT(no)]) dnl AC_HEADER_TIME AC_SUBST(CFLAGS) AC_C_BIGENDIAN dnl Checks for library functions. AC_CHECK_FUNCS(bzero getaddrinfo inet_pton strerror) AC_MSG_CHECKING(for timersub) AC_TRY_COMPILE([#include ], [#ifndef timersub error #endif], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMERSUB)], [AC_MSG_RESULT(no)]) AC_CHECK_FUNC(getopt_long, , [ COMPAT_SRCS="$COMPAT_SRCS getopt.c getopt1.c" COMPAT_OBJS="$COMPAT_OBJS getopt.o getopt1.o" ]) AC_REPLACE_FUNCS(strsep daemon) AC_OUTPUT(Makefile docs/tcpblast.spec) netdiag-1.2/tcpblast-20011111/daemon.c000066400000000000000000000044231323731111400170750ustar00rootroot00000000000000/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include /* #include */ #ifndef _PATH_DEVNULL #define _PATH_DEVNULL "/dev/null" #endif /* _PATH_DEVNULL */ #include int daemon(nochdir, noclose) int nochdir, noclose; { int fd; switch (fork()) { case -1: return (-1); case 0: break; default: _exit(0); } if (setsid() == -1) return (-1); if (!nochdir) (void)chdir("/"); if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { (void)dup2(fd, STDIN_FILENO); (void)dup2(fd, STDOUT_FILENO); (void)dup2(fd, STDERR_FILENO); if (fd > 2) (void)close (fd); } return (0); } netdiag-1.2/tcpblast-20011111/discard.c000066400000000000000000000161441323731111400172460ustar00rootroot00000000000000/* standalone discard and other services 2000.10.16 Rafal Maszkowski based on Richard Stevens unpv12e/tcpcliserv/tcpserv09.c Adding a new service: see MODE_TEMPLATE TODO: - binding a specific IPv[46] local address */ #include #include #include #include #include #include #include #include #include #include #include #include /* for Solaris */ #include "compat.h" /* Following could be derived from SOMAXCONN in , but many kernels still #define it as 5, while actually supporting many more */ #define LISTENQ 1024 /* 2nd argument to listen() */ /* Following shortens all the type casts of pointer arguments */ #define SA struct sockaddr /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ /* extern int daemon __P ((int __nochdir, int __noclose)); */ #define MODE_ECHO 1 #define MODE_DISCARD 2 #define MODE_CHARGEN 3 #define MODE_TEMPLATE 999 #define CHARGEN_START 32 #define CHARGEN_STOP 126 #define CHARGEN_WIDTH 72 int defports[] = { 0, 7, 9, 19, 0 }; int opt_proto = SOCK_STREAM; void process(int fdin, int fdout, int opt_mode) { int bytes, ch, ind; char buf[4096]; switch(opt_mode) { case MODE_ECHO: for ( ; ; ) { if ((bytes = read(fdin, buf, sizeof(buf))) <= 0) break; if ((bytes = write(fdin, buf, bytes)) <= 0) break; } break; case MODE_CHARGEN: for (ch = CHARGEN_START; ch<=CHARGEN_STOP; ch++) buf[ch-CHARGEN_START] = ch; bcopy(buf, buf+CHARGEN_STOP-CHARGEN_START+1, CHARGEN_STOP-CHARGEN_START+1); for (ind = 0; ; ind++) { if ((bytes = write(fdout, buf+ind, CHARGEN_WIDTH)) <= 0) break; if ((bytes = write(fdout, "\r\n", 2)) <= 0) break; if (ind>CHARGEN_STOP-CHARGEN_START) ind = 0; } break; case MODE_TEMPLATE: strncpy(buf, "Just a template for new services.\r\n", sizeof(buf)); write(fdout, buf, strlen(buf)); break; default: /* MODE_DISCARD */ for ( ; ; ) { if ((bytes = read(fdin, buf, sizeof(buf))) <= 0) break; } } } void sig_chld(int signo) { pid_t pid; int stat; while ( (pid = waitpid(-1, &stat, WNOHANG)) > 0) { /* printf("child %d terminated\n", pid); */ } return; } int name2mode(char *name) { if (strncmp(name, "discard", 8)==0) return MODE_DISCARD; if (strncmp(name, "echo", 5)==0) return MODE_ECHO; if (strncmp(name, "chargen", 8)==0) return MODE_CHARGEN; if (strncmp(name, "template", 9)==0) return MODE_TEMPLATE; return -1; } void usage(char *name) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: %s [options]\n\n", name); fprintf(stderr, "%s is a standalone echo/discard/chargen service.\n", name); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, "\n"); #ifdef HAVE_GETADDRINFO fprintf(stderr, "-4, --ipv4 bind ipv4 address (default)\n"); fprintf(stderr, "-6, --ipv6 bind ipv6 address (means: both?)\n"); #endif /* HAVE_GETADDRINFO */ fprintf(stderr, "-f, --foreground do not be a daemon (ignored with -i)\n"); fprintf(stderr, "-h, --help this help\n"); fprintf(stderr, "-i, --inetd runs as an inetd service\n"); fprintf(stderr, "-m MODE MODE can be echo, discard or chargen (default: %s)\n", name); fprintf(stderr, "-p PORT listen on PORT instead of default 7/9/19\n"); fprintf(stderr, "-t, --tcp use TCP%s\n", opt_proto==SOCK_STREAM ? " (default)" : "" ); fprintf(stderr, "-u, --udp use UDP%s\n", opt_proto==SOCK_DGRAM ? " (default)" : "" ); exit(0); } void usage_small(char *name) { fprintf(stderr, "type %s --help for help\n", name); exit(0); } int main(int argc, char **argv) { int listenfd, connfd, opt_fg = 0, opt_inetd = 0, opt_port = -1, opt_mode = MODE_DISCARD, on = 1, opt_family = AF_INET; pid_t childpid; void sig_chld(int); char fname[100], *name = NULL; /* changing default, based on program name */ strncpy(fname, argv[0], sizeof(fname)); if ( (name = rindex(fname, '/')) ) { name++; } else { name = fname; } opt_mode = name2mode(name); while (1) { static const struct option long_options[] = { { "foreground", no_argument, NULL, 'f' }, { "help", no_argument, NULL, 'h' }, { "inetd", no_argument, NULL, 'i' }, { "ipv4", no_argument, NULL, '4' }, { "ipv6", no_argument, NULL, '6' }, { "mode", required_argument, NULL, 'm' }, { "tcp", no_argument, NULL, 't' }, { "udp", no_argument, NULL, 'u' }, { NULL, 0, NULL, 0 } }; int optchar; if ((optchar = getopt_long (argc, argv, "46fhim:p:tu", long_options, NULL)) == -1) break; switch (optchar) { #ifdef HAVE_GETADDRINFO case '4': opt_family = AF_INET; break; case '6': opt_family = AF_INET6; break; #endif /* HAVE_GETADDRINFO */ case 'f': opt_fg = 1; break; case 'h': usage(name); break; case 'i': opt_inetd = 1; break; case 'm': if ( (opt_mode = name2mode(optarg)) == -1 ) { printf("Unknown mode\n"); exit(1); } break; case 'p': opt_port = atoi(optarg); if ((opt_port < 0) || (opt_port > 65535)) { printf("Local port must be in 0..65535 range\n"); exit(1); } break; case 't': opt_proto = SOCK_STREAM; break; case 'u': opt_proto = SOCK_DGRAM; break; default: usage_small(name); } } if (opt_port == -1) opt_port = defports[opt_mode]; if (opt_inetd) { process(STDIN_FILENO, STDOUT_FILENO, opt_mode); exit(0); } if (!opt_fg) daemon(0, 1); if ( (listenfd = socket(opt_family, opt_proto, 0)) == -1 ) { printf("socket(%d): %s\n", opt_family, strerror(errno)); exit(1); } setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); if (opt_family == AF_INET) { struct sockaddr_in servaddr; bzero(&servaddr, sizeof(servaddr)); servaddr.sin_family = opt_family; servaddr.sin_addr.s_addr = htonl(INADDR_ANY); servaddr.sin_port = htons(opt_port); if (bind(listenfd, (SA *) &servaddr, sizeof(servaddr)) == -1) { printf("bind(%d): %s\n", opt_family, strerror(errno)); exit(1); } #ifdef HAVE_GETADDRINFO } else { struct sockaddr_in6 servaddr; bzero(&servaddr, sizeof(servaddr)); servaddr.sin6_family = opt_family; servaddr.sin6_flowinfo = 0; servaddr.sin6_port = htons(opt_port); servaddr.sin6_addr = in6addr_any; /* structure assignment */ if (bind(listenfd, (SA *) &servaddr, sizeof(servaddr)) == -1) { printf("bind(%d): %s\n", opt_family, strerror(errno)); exit(1); } #endif /* HAVE_GETADDRINFO */ } listen(listenfd, LISTENQ); signal(SIGCHLD, sig_chld); for ( ; ; ) { socklen_t clilen; struct sockaddr_in cliaddr; clilen = sizeof(cliaddr); if ( (connfd = accept(listenfd, (SA *) &cliaddr, &clilen)) < 0) { if (errno == EINTR) continue; /* back to for() */ else strerror(errno); } if ( (childpid = fork()) == 0) { /* child process */ close(listenfd); /* close listening socket */ process(connfd, connfd, opt_mode); /* process the request */ exit(0); } close(connfd); /* parent closes connected socket */ } return 0; } netdiag-1.2/tcpblast-20011111/docs/000077500000000000000000000000001323731111400164135ustar00rootroot00000000000000netdiag-1.2/tcpblast-20011111/docs/3examples000077500000000000000000000004421323731111400202420ustar00rootroot00000000000000#!/bin/sh host=step amount=200 echo ./tcpblast -c $amount $host ./tcpblast -c $amount $host echo '' echo ./tcpblast -r -c $amount --nwrite $host:chargen ./tcpblast -r -c $amount --nwrite $host:chargen echo '' echo ./tcpblast -r -c $amount $host:echo ./tcpblast -r -c $amount $host:echo netdiag-1.2/tcpblast-20011111/docs/COPYING000066400000000000000000000440651323731111400174570ustar00rootroot00000000000000GNU General Public License ---------------------------------------------------------------------------- Table of Contents * GNU GENERAL PUBLIC LICENSE o Preamble o TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION o How to Apply These Terms to Your New Programs ---------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: * a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. * b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. * c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: * a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the program's name and an idea of what it does. Copyright (C) 19yy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. netdiag-1.2/tcpblast-20011111/docs/README000066400000000000000000000326351323731111400173040ustar00rootroot00000000000000 TCPBLAST - NETWORK BANDWIDTH MEASURING TOOL Tcpblast can be used for: - crude network throuput measurements - testing bandwidth limits (also in incoming direction or bidirectional) Tcpblast typically will need one of the discard, echo or chargen services which are usually turned off because of security reasons. WARNING: tcpblast is really crude and measures the throuput by sending as much data as possible. USE CAREFULLY. For much more subtle bandwidth measurements use http://www.employees.org/~bmah/Software/pchar/ by Bruce A. Mah http://www.cs.colby.edu/~downey/clink/ by Allen B. Downey ftp://ftp.ee.lbl.gov/pathchar/ by Van Jacobson PATHCHAR-STYLE TOOLS AND TCPBLAST COMPARISON Pro: - gives immediate results - clogs the link - good for testing actual bandwidth limits (like CBQ+TBF) - bidirectional - can generate traffic with specific limit for specified time Contra: - needs discard or echo service - wastes bandwidth - bottleneck measurement only - cannot measure raw capacity on loaded link COUSINS New version of tcpblast is based on (or ideas contained in) tcpblast, tcpping, tcpspray and ttcp, various versions floating around, mostly on FreeBSD version of tcpblast (signed: Daniel Karrenberg , but I do not think we should bother him with bugs of this version). INSTALLATION Tcpblast can be made as follows: ./configure make make install The standalone discard program is not installed by default. RECENT VERSION The newest version is available in ftp://ftp.6bone.pl/pub/blast/ Discussion list, subscribing: echo subscribe tcpblast | mail majordomo@sunsite.icm.edu.pl messages to: tcpblast@sunsite.icm.edu.pl OPTIONS WARNING: most of the options changed since version 19991109! NEW!: RATE, using units Usage: tcpblast [options] destination[:port] tcpblast/udpblast is a simple tool for probing network and estimating its throughput. By default it sends 300 blocks (1024 bytes each) of data to specified destination host. Options: -a send random data -b BUF_SIZE socket buf size (default: -1 == don't change), with `-' to be substracted from results -c BLOCKS change default (300) number of blocks, range: 1..10000000 -d DOTFREQ print dot every DOTFREQ blocks, disables cont. speed disp. -h, --help this help -i, --delay DELAY write delay in microseconds (EXPERIMENTAL) -l, --last BLKS show also speed for last BLKS blocks --nwrite do not write, use e.g. with chargen port -m results for every block in separate line -o turn off default continuous speed displaying -p PORT bind this local PORT -q --quiet show only final statistics -r, --read read data returned to us, switches default port to echo -R, --rate RATESPEC limit the speed according to the RATESPEC -s BLOCK_SIZE block size (default 1024 bytes) -t MAXTIME limit time to MAXTIME s (up to 42950 h) --tcp use TCP (default) --udp use UDP (default if named udpblast) -v, --verbosity verbosity, default 0, maximum 3. -v adds time display, -vv also speed in B/s, -v - speed in b/s. -V, --version version destination host name or address port use port #/name xyz instead of default port 9 RATESPEC RATE[,TIME][:RATE[,TIME]]... RATE generating data at RATE speed in B/s TIME for TIME seconds (can be floating point number), last can be omitted and that time will be infinite Options -b, -c and -R can use case insensitive unit multipliers and specifiers: -b without units is in bytes, can use [{k,m,g}]b (lower or upper case) for KB, MB or GB. {k,m,g} are powers of 1024. -c argument is just a number, can have k, m or g added (powers of 1024), no unit needed -R RATE is in B/s or Bps, the postfixes can be [{k,m,g}]{b/s,bps} -R TIME is in seconds, can be posfixed with [{k,m,g}]{s,min,h,w,m,y} Example: tcpblast -b 4KB -c 10k -R 10kbps,2:20kbps,3s target tcpblast version: FreeBSD + rzm 20001017 EXAMPLES tcpblast -c 200 step read SO_SNDBUF = 65535 Sending non-random TCP data to step:9 using 1024 B blocks. Written 200 KB 35.10 KB/s tcpblast -r -c 200 --nwrite step:chargen read SO_SNDBUF = 65535 Sending non-random TCP data to step:chargen using 1024 B blocks. /Read /200 KB /9.65 KB/s tcpblast -r -c 200 step:echo read SO_SNDBUF = 65535 Sending non-random TCP data to step:echo using 1024 B blocks. Written/Read 200/200 KB 16.98/16.94 KB/s But: tcpblast step:chargen blocks after some time because chargen is not reading anything, we can fill the buffers and that is all. Such command can be stopped by ^C or using a time limit: tcpblast -t 10 step:chargen With UDP one can get very high apparent throuput because of discarded packets. UDP does NOT have the acknowledging mechanism as TCP has. You can check how many packets got to the destination with tcpdump - usually much less than sent. Some estimation is possible with usage of echo service: udpblast -r pingwin:echo read SO_SNDBUF = 8192 Sending non-random UDP data to pingwin:echo using 1024 B blocks. Written/Read 300/201 KB 5837.71/461.34 KB/s ^C tcpblast -p 40023 step Send/receive from/to port 40023. I needed it for one of the traffic limits tests. Simple rate limit (to 10000 B/s): tcpblast -R 10000 rzm-ac Advanced rate limits: tcpblast -c 9999 -R 10000,5:20000,5 -l 10 -vvv rzm-ac Sends 9999 blocks. The RATESPEC 10000,5:20000,5 says to send 10000 B/s for 5 s, then 20000 B/s for another 5 s. '-l 10' additionally shows the speed for last 10 blocks. -vvv displays the time, speed in B/s and b/s. The result Written 147 KB in 10002.8 ms 120389.2 b/s 15048.6 B/s 14.70 KB/s (last 10 KB: 19692.3 B/s) shows the final speed in B/s as more less 15000 B/s - it is an average of 10000 and 20000 B/s, 5 s each. For high speeds the TCP buffer size and time used for displaying speed continuously matter. In the last (or only) RATE,TIME in RATESPEC the TIME can be omitted. This means a more less infinite time. Recent version can use units: tcpblast -b 4KB -c 10k -R 10kbps,2:20kbps,3s target In this somewhat artificial example we are: - trying to set 4 KB buffer - sending 10 K == 10240 blocks; lower case 'k' is always the same as 'K' equal to 1024 - sending 10 KB/s (again lower case 'k' is 1024, 'b' in 'bps' is 'B', i.e. byte) for 2 seconds (no unit specified, default for time is 's') - and then sending 20 KB/s for 3 s to the target. CHANGES - setting TCP/UDP - setting block size - setting buffer size - sending random data 19960224 version released 19960926 setting port # uploaded to sunsite.unc.edu 19961001 option for setting # of dots per block sent some cleanup 19961002 better description of -b in usage() corrected bug in setsockopt (buffer wasn't set) for -r buffer still wasn't filled with random data (Pratip K. Banerji ) version 961002a 19961003 usage_small() used in same cases instead of usage() some help/error messages rearangement 19961028 getopt from GNU libc 961017 included #include compiles+links on Solaris 0.5 more files, Makefiles and such 19970119 -c option for continuous speed display either port # or name can be used with -p SunOS (4.1.3) compile target works 19981108 included DEC OSF/1 changes from Arun Moorthy (sent Feb 97, sorry..) getsockopt() should know how much space can it use for returned parameter, so size must be 4 output shows data/time and (data-bufsize)/time. far from perfect, take a look y2k problem in version number (: install target 19981109 printresult() in a loop arguments corrected -e(xperimental) option default port now properly printed 19981112 dist Makefile target changed . into - in the package name 19990326 install udpblast too (as a symlink) version.h depending on tcpblast.c 19990504 2 spaces after 'KB/s' I don't understand why write(3, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..., 65536) = -1 EFAULT (Bad address) write(2, "tcp/udpblast send:: Bad address\n"..., 32tcp/udpblast send:: Bad address ) = 32 with -s 65536. It works OK up to 46648 B (?!) 19991102 configure.in and such borrowed from nmap Karsten Hecker had problems compiling it on Solaris, should work with configure Michal 'Orr' Daszkowski spotted a long standing bug in port arg copying included a manual from Artur R. Czechowski , I'm sure it is going to be outdated soon moved binary do ..../sbin 19991103 -c (continuous) is default now, instead of dots millisecond = ms (not msec) time scaling when adding s and us (USCALE) circular buffer for measuring last nnn blocks speed, the option: -l nnn (off by default) 19991103a one more correction to port arg copying 19991104 massive rewrite, mostly for bidirectionality summary on ^C both read and write are O_NONBLOCK can run RO, RW, WO 19991108 htons(port) (Peter Barton was complaining on it, backported to 19991103a) 19991109 changed options letters 19991116 small fatal error, this version can be considered beta RPM made 20000525 small changes in source and README, UDP example -r changes default port to "7" (echo) -i DELAY option implemented, seems to not to scale below 30000 us 20000711 -p PORT for specifying local port spell check 20000725 char -> int optchar - spotted while compiling on AIX; no other corrections needed! the same on mips-sgi-irix6.3 checked compiling on sparc-sun-solaris2.7 20000727 new config.{sub,guess} 20000810 checked compiling on i386-unknown-openbsd2.7 20000904 -R RATESPEC, see --help and examples, tested on Linux only maximal # of blocks in -c is 100000 now -q --quiet option (the same as -d 0) excluded completely outdated man page from an RPM 20001016 separate standalone discard/echo/chargen 20001017 Solaris compatibility, added compat.h (timersub(), timeradd() from Linux includes), daemon.c and strsep.c from glibc-2.1.91 parsing units in -R, -c, -b MODE_TEMPLATE in discard to make adding new services easier getopt* compatibility files update, new taken form glibc-2.1.91 oops! forgotten that -s and -t options could use units too; there are some others too 20001019 preliminary IPv6 support timersub() detection corrected UDP in discard some configure.in cleanups don't backspace in dots mode when not writing (problem seen by Edgar Glowacki) man page update 20001026 portability fixes 20001101 optimization attempts 20001101 release 20010104 TCP_MAXSEG option to specify packet size beta release 20010620 SOL_TCP (Linx specific?) -> IPPROTO_TCP 20010925 ... tried to compile on Digital Unix V4.0 and could not. I have added casts to int in few places. 20011110 badly formulated ifs in printresult() were leaking memory with every block sent --source address option; with getaddriinfo() and inet_pton() works for IPv6 too actually binding a local port in getaddrinfo() version in setmaxseg(): message about TCP_MAXSEG, not SO_SNDBUF defining INADDR_NONE as INADDR_BROADCAST or just -1 (for Solaris 2.6) instead of "compat.h" in tcpblast.c and discard.c was catching some other compat.h than ours as usual, NEVER EVER USE SINGLE VARIABLE FOR TWO PURPOSES: with #undef HAVE_GETADDRINFO and #define HAVE_INET_PTON , int err declaration was hidden 20011111 new version PORTS Done and tested (20000711): - Linux Rawhide 19991031, Sparc, 19991102 - Linux RedHat 6.0, i486, 19991109; 6.2, i686 - 20000711 - Solaris 2.6, Sparc, 19991102 - Solaris 2.7, Sparc, 20000725 (sparc-sun-solaris2.7) - FreeBSD 4.0, i686, 20000711 (hm.. no getopt.h?) - AIX 4.1, powerpc, 20000725 (powerpc-ibm-aix4.1.4.0) - IRIX 6.3, mips, 20000725 (mips-sgi-irix6.3) - OpenBSD 2.7, ix86, 2000810 (i386-unknown-openbsd2.7) 20001017: - Linux RedHat 6.2 - Solaris 2.6, 2.7 20001026 - Linux RedHat 6.2 - Solaris 2.6, 2.7 - FreeBSD 4.0 20010620 - Linux RedHat 6.2 i386, Sparc32 - Solaris 2.6 - does not compile on Solaris 2.5.1 - FreeBSD 4.3 - OpenBSD 2.8 - AIX 4.1.4 powerpc 20011110 - Linux RedHat 7.2 i386 - Linux RedHat 6.2 sparc - Solaris 2.5.1, 2.6, 2.8 sparc - FreeBSD 4.3 i386 - OpenBSD 2.8 i386 - AIX 4.1.4 powerpc - IRIX 6.5 mips TODO - make a real man page instead of .pod - multi-port discard? - source address option in discard - statistics and logging of them in discard - rate self limiting: to save CPU limit sending speed to 110% of average rate off when -R on (will it help really? negative experimental results) - 'goto 3' - G3 in -R would allow looping - add even more options - progressing, 17 on Oct 17th, 2000 - sending file contents - -f - comparing when write-read, like tcpblast-dfk or tcpspray - what features netperf can offer? (i.e. which I could steal?) - learn/invent more theory and think how to improve accuracy of bandwidth measurement (maybe it could be corrected for the buffer size.. - doesn't help much 19981108) (-b 1024 gives more reasonable results) - Menno Pieters made a timeout option, maybe better than mine - adding more services to discard/echo/chargen (time, daytime?) - gettext i18n BUGS - I'm a perfectly bad and careless maintainer - we have memory leaks: in getaddrinfo() (?!) as ccmalloc shows: 4595 bytes in 79 chunks - is it real? - autoconf system is somewhat shaky here Patches for this and other problems send to the address below. rzm@icm.edu.pl netdiag-1.2/tcpblast-20011111/docs/ccmalloc.log000066400000000000000000004176411323731111400207100ustar00rootroot00000000000000Sending non-random TCP data to rzm-ac, port 9 using 1024 B blocks. read SO_SNDBUF = 16384 read SO_SNDBUF = 536 Written 1 KB 11111.11 KB/s Written 2 KB 5000.00 KB/s Written 3 KB 6000.00 KB/s Written 4 KB 6779.66 KB/s Written 5 KB 7352.94 KB/s Written 6 KB 7407.41 KB/s Written 7 KB 7692.31 KB/s Written 8 KB 8000.00 KB/s Written 9 KB 8256.88 KB/s Written 10 KB 8474.58 KB/s Written 11 KB 8661.42 KB/s Written 12 KB 8823.53 KB/s Written 13 KB 8965.52 KB/s Written 14 KB 9090.91 KB/s Written 15 KB 9259.26 KB/s Written 16 KB 9580.84 KB/s Written 17 KB 10000.00 KB/s Written 18 KB 10404.62 KB/s Written 19 KB 10795.45 KB/s Written 20 KB 11111.11 KB/s Written 21 KB 11475.41 KB/s Written 22 KB 11827.96 KB/s Written 23 KB 12169.31 KB/s Written 24 KB 12500.00 KB/s Written 25 KB 12820.51 KB/s Written 26 KB 13131.31 KB/s Written 27 KB 13366.34 KB/s Written 28 KB 13658.54 KB/s Written 29 KB 13942.31 KB/s Written 30 KB 14218.01 KB/s Written 31 KB 13777.78 KB/s Written 32 KB 13852.81 KB/s Written 33 KB 14102.56 KB/s Written 34 KB 14285.71 KB/s Written 35 KB 14522.82 KB/s Written 36 KB 14754.10 KB/s Written 37 KB 14979.76 KB/s Written 38 KB 15200.00 KB/s Written 39 KB 15354.33 KB/s Written 40 KB 15564.20 KB/s Written 41 KB 15769.23 KB/s Written 42 KB 15969.58 KB/s Written 43 KB 16165.41 KB/s Written 44 KB 16356.88 KB/s Written 45 KB 16544.12 KB/s Written 46 KB 16727.27 KB/s Written 47 KB 16845.88 KB/s Written 48 KB 16961.13 KB/s Written 49 KB 17132.87 KB/s Written 50 KB 17301.04 KB/s Written 51 KB 17465.75 KB/s Written 52 KB 17567.57 KB/s Written 53 KB 17725.75 KB/s Written 54 KB 17880.79 KB/s Written 55 KB 18032.79 KB/s Written 56 KB 18181.82 KB/s Written 57 KB 18327.97 KB/s Written 58 KB 18412.70 KB/s Written 59 KB 18553.46 KB/s Written 60 KB 18691.59 KB/s Written 61 KB 18827.16 KB/s Written 62 KB 18960.24 KB/s Written 63 KB 1543.74 KB/s Written 64 KB 1565.94 KB/s Written 65 KB 1588.85 KB/s Written 66 KB 1612.12 KB/s Written 67 KB 1635.34 KB/s Written 68 KB 1658.54 KB/s Written 69 KB 1681.29 KB/s Written 70 KB 1704.41 KB/s Written 71 KB 1727.49 KB/s Written 72 KB 1750.55 KB/s Written 73 KB 1773.14 KB/s Written 74 KB 1796.12 KB/s Written 75 KB 1819.06 KB/s Written 76 KB 1841.98 KB/s Written 77 KB 1864.41 KB/s Written 78 KB 1887.25 KB/s Written 79 KB 1909.60 KB/s Written 80 KB 1932.37 KB/s Written 81 KB 1955.10 KB/s Written 82 KB 1977.81 KB/s Written 83 KB 2000.00 KB/s Written 84 KB 2022.63 KB/s Written 85 KB 2045.24 KB/s Written 86 KB 2067.80 KB/s Written 87 KB 2090.34 KB/s Written 88 KB 2112.85 KB/s Written 89 KB 2135.32 KB/s Written 90 KB 2157.24 KB/s Written 91 KB 2179.64 KB/s Written 92 KB 2202.01 KB/s Written 93 KB 2224.35 KB/s Written 94 KB 2246.65 KB/s Written 95 KB 2268.39 KB/s Written 96 KB 2290.08 KB/s Written 97 KB 2312.28 KB/s Written 98 KB 2334.44 KB/s Written 99 KB 2356.58 KB/s Written 100 KB 2378.69 KB/s Written 101 KB 2400.76 KB/s Written 102 KB 2422.23 KB/s Written 103 KB 2444.23 KB/s Written 104 KB 2466.21 KB/s Written 105 KB 2488.15 KB/s Written 106 KB 2509.47 KB/s Written 107 KB 2531.35 KB/s Written 108 KB 2550.78 KB/s Written 109 KB 2571.97 KB/s Written 110 KB 2593.12 KB/s Written 111 KB 2614.23 KB/s Written 112 KB 2635.91 KB/s Written 113 KB 2657.57 KB/s Written 114 KB 2679.20 KB/s Written 115 KB 2700.16 KB/s Written 116 KB 2721.73 KB/s Written 117 KB 2743.26 KB/s Written 118 KB 2764.76 KB/s Written 119 KB 2785.58 KB/s Written 120 KB 2807.02 KB/s Written 121 KB 2828.42 KB/s Written 122 KB 2849.80 KB/s Written 123 KB 2870.48 KB/s Written 124 KB 2891.79 KB/s Written 125 KB 2913.07 KB/s Written 126 KB 2933.64 KB/s Written 127 KB 2954.86 KB/s Written 128 KB 2975.36 KB/s Written 129 KB 2996.52 KB/s Written 130 KB 3017.64 KB/s Written 131 KB 3038.03 KB/s Written 132 KB 3059.10 KB/s Written 133 KB 3079.42 KB/s Written 134 KB 3100.42 KB/s Written 135 KB 3121.39 KB/s Written 136 KB 3141.60 KB/s Written 137 KB 3162.51 KB/s Written 138 KB 3183.39 KB/s Written 139 KB 3203.50 KB/s Written 140 KB 3224.32 KB/s Written 141 KB 3245.11 KB/s Written 142 KB 3265.12 KB/s Written 143 KB 3285.09 KB/s Written 144 KB 3305.79 KB/s Written 145 KB 3326.45 KB/s Written 146 KB 3347.09 KB/s Written 147 KB 3366.93 KB/s Written 148 KB 3387.50 KB/s Written 149 KB 3408.05 KB/s Written 150 KB 3428.57 KB/s Written 151 KB 3448.28 KB/s Written 152 KB 3468.74 KB/s Written 153 KB 3489.17 KB/s Written 154 KB 3509.57 KB/s Written 155 KB 3529.14 KB/s Written 156 KB 3549.49 KB/s Written 157 KB 3569.80 KB/s Written 158 KB 3589.28 KB/s Written 159 KB 1401.13 KB/s Written 160 KB 1408.70 KB/s Written 161 KB 1417.13 KB/s Written 162 KB 1425.55 KB/s Written 163 KB 1433.85 KB/s Written 164 KB 1442.27 KB/s Written 165 KB 1450.68 KB/s Written 166 KB 1459.08 KB/s Written 167 KB 1467.49 KB/s Written 168 KB 1475.89 KB/s Written 169 KB 1484.15 KB/s Written 170 KB 1492.54 KB/s Written 171 KB 1500.92 KB/s Written 172 KB 1509.30 KB/s Written 173 KB 1517.68 KB/s Written 174 KB 1526.05 KB/s Written 175 KB 1533.47 KB/s Written 176 KB 1541.43 KB/s Written 177 KB 1549.78 KB/s Written 178 KB 1558.12 KB/s Written 179 KB 1566.33 KB/s Written 180 KB 1574.67 KB/s Written 181 KB 1583.00 KB/s Written 182 KB 1591.19 KB/s Written 183 KB 1599.51 KB/s Written 184 KB 1607.83 KB/s Written 185 KB 1616.14 KB/s Written 186 KB 1624.45 KB/s Written 187 KB 1632.76 KB/s Written 188 KB 1640.92 KB/s Written 189 KB 1649.21 KB/s Written 190 KB 1657.51 KB/s Written 191 KB 1665.79 KB/s Written 192 KB 1673.93 KB/s Written 193 KB 1682.21 KB/s Written 194 KB 1690.48 KB/s Written 195 KB 1698.75 KB/s Written 196 KB 1706.87 KB/s Written 197 KB 1715.13 KB/s Written 198 KB 1723.24 KB/s Written 199 KB 1731.49 KB/s Written 200 KB 1739.74 KB/s Written 201 KB 1747.83 KB/s Written 202 KB 1756.06 KB/s Written 203 KB 1764.30 KB/s Written 204 KB 1772.53 KB/s Written 205 KB 1780.75 KB/s Written 206 KB 1788.82 KB/s Written 207 KB 1797.03 KB/s Written 208 KB 1805.24 KB/s Written 209 KB 1813.29 KB/s Written 210 KB 1821.49 KB/s Written 211 KB 1829.69 KB/s Written 212 KB 1837.73 KB/s Written 213 KB 1845.91 KB/s Written 214 KB 1854.10 KB/s Written 215 KB 1862.12 KB/s Written 216 KB 1870.29 KB/s Written 217 KB 1878.46 KB/s Written 218 KB 1886.47 KB/s Written 219 KB 1894.14 KB/s Written 220 KB 1901.96 KB/s Written 221 KB 1909.95 KB/s Written 222 KB 1918.09 KB/s Written 223 KB 1926.07 KB/s Written 224 KB 1934.20 KB/s Written 225 KB 1942.17 KB/s Written 226 KB 1950.29 KB/s Written 227 KB 1958.42 KB/s Written 228 KB 1966.36 KB/s Written 229 KB 1974.48 KB/s Written 230 KB 1982.59 KB/s Written 231 KB 1990.52 KB/s Written 232 KB 1998.62 KB/s Written 233 KB 2006.54 KB/s Written 234 KB 2014.64 KB/s Written 235 KB 2022.72 KB/s Written 236 KB 2030.81 KB/s Written 237 KB 2038.71 KB/s Written 238 KB 2046.78 KB/s Written 239 KB 2054.85 KB/s Written 240 KB 2062.74 KB/s Written 241 KB 2070.80 KB/s Written 242 KB 2078.86 KB/s Written 243 KB 2086.91 KB/s Written 244 KB 2094.78 KB/s Written 245 KB 2102.82 KB/s Written 246 KB 2110.86 KB/s Written 247 KB 2118.90 KB/s Written 248 KB 2126.75 KB/s Written 249 KB 2134.77 KB/s Written 250 KB 2142.80 KB/s Written 251 KB 2150.63 KB/s Written 252 KB 2158.64 KB/s Written 253 KB 2166.65 KB/s Written 254 KB 2174.47 KB/s Written 255 KB 2182.28 KB/s Written 256 KB 2190.28 KB/s Written 257 KB 2198.08 KB/s Written 258 KB 2206.07 KB/s Written 259 KB 2214.05 KB/s Written 260 KB 2221.84 KB/s Written 261 KB 2229.82 KB/s Written 262 KB 2237.79 KB/s Written 263 KB 2245.56 KB/s Written 264 KB 2253.33 KB/s Written 265 KB 2261.29 KB/s Written 266 KB 2269.24 KB/s Written 267 KB 2276.99 KB/s Written 268 KB 2284.93 KB/s Written 269 KB 2292.68 KB/s Written 270 KB 2300.61 KB/s Written 271 KB 2308.35 KB/s Written 272 KB 2316.27 KB/s Written 273 KB 2324.00 KB/s Written 274 KB 2331.91 KB/s Written 275 KB 2339.63 KB/s Written 276 KB 2347.54 KB/s Written 277 KB 2355.44 KB/s Written 278 KB 2363.14 KB/s Written 279 KB 2371.04 KB/s Written 280 KB 2378.73 KB/s Written 281 KB 2386.61 KB/s Written 282 KB 2394.29 KB/s Written 283 KB 2402.17 KB/s Written 284 KB 2409.84 KB/s Written 285 KB 2417.71 KB/s Written 286 KB 2425.58 KB/s Written 287 KB 2298.57 KB/s Written 288 KB 2304.74 KB/s Written 289 KB 2312.18 KB/s Written 290 KB 2319.63 KB/s Written 291 KB 2326.88 KB/s Written 292 KB 2334.32 KB/s Written 293 KB 2341.75 KB/s Written 294 KB 2348.99 KB/s Written 295 KB 2356.42 KB/s Written 296 KB 2363.84 KB/s Written 297 KB 2371.07 KB/s Written 298 KB 2378.48 KB/s Written 299 KB 2385.89 KB/s Written 300 KB 2393.30 KB/s Written 301 KB 2400.51 KB/s Written 302 KB 2407.91 KB/s Written 303 KB 2414.15 KB/s Written 304 KB 2420.77 KB/s Written 305 KB 2428.15 KB/s Written 306 KB 2435.53 KB/s Written 307 KB 2442.71 KB/s Written 308 KB 2450.08 KB/s Written 309 KB 2457.45 KB/s Written 310 KB 2464.82 KB/s Written 311 KB 2472.18 KB/s Written 312 KB 2479.34 KB/s Written 313 KB 2486.69 KB/s Written 314 KB 2494.04 KB/s Written 315 KB 2501.39 KB/s Written 316 KB 2508.53 KB/s Written 317 KB 2515.87 KB/s Written 318 KB 2523.21 KB/s Written 319 KB 2530.34 KB/s Written 320 KB 2537.67 KB/s Written 321 KB 2544.79 KB/s Written 322 KB 2552.11 KB/s Written 323 KB 2559.43 KB/s Written 324 KB 2566.74 KB/s Written 325 KB 2574.05 KB/s Written 326 KB 2581.16 KB/s Written 327 KB 2588.46 KB/s Written 328 KB 2595.76 KB/s Written 329 KB 2602.23 KB/s Written 330 KB 2609.31 KB/s Written 331 KB 2616.39 KB/s Written 332 KB 2623.68 KB/s Written 333 KB 2630.96 KB/s Written 334 KB 2638.23 KB/s Written 335 KB 2645.29 KB/s Written 336 KB 2652.56 KB/s Written 337 KB 2659.83 KB/s Written 338 KB 2667.09 KB/s Written 339 KB 2674.35 KB/s Written 340 KB 2681.60 KB/s Written 341 KB 2688.64 KB/s Written 342 KB 2695.89 KB/s Written 343 KB 2703.13 KB/s Written 344 KB 2710.37 KB/s Written 345 KB 2717.39 KB/s Written 346 KB 2724.62 KB/s Written 347 KB 2731.85 KB/s Written 348 KB 2739.08 KB/s Written 349 KB 2746.09 KB/s Written 350 KB 2753.30 KB/s Written 351 KB 2760.52 KB/s Written 352 KB 2767.73 KB/s Written 353 KB 2774.72 KB/s Written 354 KB 2781.93 KB/s Written 355 KB 2789.13 KB/s Written 356 KB 2796.32 KB/s Written 357 KB 2803.52 KB/s Written 358 KB 2810.71 KB/s Written 359 KB 2817.90 KB/s Written 360 KB 2824.86 KB/s Written 361 KB 2832.04 KB/s Written 362 KB 2839.22 KB/s Written 363 KB 2846.39 KB/s Written 364 KB 2853.34 KB/s Written 365 KB 2860.50 KB/s Written 366 KB 2867.66 KB/s Written 367 KB 2874.82 KB/s Written 368 KB 2881.98 KB/s Written 369 KB 2888.91 KB/s Written 370 KB 2896.06 KB/s Written 371 KB 2903.20 KB/s Written 372 KB 2910.34 KB/s Written 373 KB 2917.48 KB/s Written 374 KB 2924.39 KB/s Written 375 KB 2931.52 KB/s Written 376 KB 2938.65 KB/s Written 377 KB 2945.77 KB/s Written 378 KB 2952.89 KB/s Written 379 KB 2960.01 KB/s Written 380 KB 2967.13 KB/s Written 381 KB 2974.01 KB/s Written 382 KB 2981.11 KB/s Written 383 KB 2988.22 KB/s Written 384 KB 2995.09 KB/s Written 385 KB 3002.18 KB/s Written 386 KB 3009.28 KB/s Written 387 KB 3016.37 KB/s Written 388 KB 3023.22 KB/s Written 389 KB 3030.30 KB/s Written 390 KB 3037.38 KB/s Written 391 KB 3044.22 KB/s Written 392 KB 3051.30 KB/s Written 393 KB 3058.37 KB/s Written 394 KB 3065.19 KB/s Written 395 KB 3072.26 KB/s Written 396 KB 3079.32 KB/s Written 397 KB 3086.13 KB/s Written 398 KB 3093.18 KB/s Written 399 KB 3100.23 KB/s Written 400 KB 3107.28 KB/s Written 401 KB 3114.08 KB/s Written 402 KB 3121.12 KB/s Written 403 KB 3128.15 KB/s Written 404 KB 3134.94 KB/s Written 405 KB 3141.97 KB/s Written 406 KB 3149.00 KB/s Written 407 KB 3155.77 KB/s Written 408 KB 3162.79 KB/s Written 409 KB 3169.81 KB/s Written 410 KB 3176.57 KB/s Written 411 KB 3183.58 KB/s Written 412 KB 3190.34 KB/s Written 413 KB 3197.34 KB/s Written 414 KB 3204.33 KB/s Written 415 KB 3211.08 KB/s Written 416 KB 3135.13 KB/s Written 417 KB 3139.11 KB/s Written 418 KB 3145.46 KB/s Written 419 KB 3152.03 KB/s Written 420 KB 3158.84 KB/s Written 421 KB 3165.65 KB/s Written 422 KB 3172.22 KB/s Written 423 KB 3179.02 KB/s Written 424 KB 3185.81 KB/s Written 425 KB 3192.61 KB/s Written 426 KB 3199.40 KB/s Written 427 KB 3206.19 KB/s Written 428 KB 3212.97 KB/s Written 429 KB 3219.75 KB/s Written 430 KB 3226.53 KB/s Written 431 KB 3233.07 KB/s Written 432 KB 3239.84 KB/s Written 433 KB 3242.72 KB/s Written 434 KB 3246.32 KB/s Written 435 KB 3251.36 KB/s Written 436 KB 3257.62 KB/s Written 437 KB 3264.12 KB/s Written 438 KB 3270.85 KB/s Written 439 KB 3277.59 KB/s Written 440 KB 3283.58 KB/s Written 441 KB 3290.06 KB/s Written 442 KB 3296.79 KB/s Written 443 KB 3303.50 KB/s Written 444 KB 3310.22 KB/s Written 445 KB 3316.69 KB/s Written 446 KB 3323.40 KB/s Written 447 KB 3330.11 KB/s Written 448 KB 3336.81 KB/s Written 449 KB 3343.51 KB/s Written 450 KB 3350.21 KB/s Written 451 KB 3352.41 KB/s Written 452 KB 3355.85 KB/s Written 453 KB 3360.78 KB/s Written 454 KB 3366.70 KB/s Written 455 KB 3373.37 KB/s Written 456 KB 3380.03 KB/s Written 457 KB 3386.69 KB/s Written 458 KB 3393.10 KB/s Written 459 KB 3399.75 KB/s Written 460 KB 3406.40 KB/s Written 461 KB 3413.05 KB/s Written 462 KB 3419.69 KB/s Written 463 KB 3426.33 KB/s Written 464 KB 3432.97 KB/s Written 465 KB 3439.60 KB/s Written 466 KB 3445.98 KB/s Written 467 KB 3452.61 KB/s Written 468 KB 3459.24 KB/s Written 469 KB 3461.77 KB/s Written 470 KB 3465.05 KB/s Written 471 KB 3469.87 KB/s Written 472 KB 3475.96 KB/s Written 473 KB 3482.29 KB/s Written 474 KB 3488.89 KB/s Written 475 KB 3495.47 KB/s Written 476 KB 3502.06 KB/s Written 477 KB 3508.38 KB/s Written 478 KB 3514.96 KB/s Written 479 KB 3521.54 KB/s Written 480 KB 3528.11 KB/s Written 481 KB 3534.69 KB/s Written 482 KB 3541.25 KB/s Written 483 KB 3547.82 KB/s Written 484 KB 3554.38 KB/s Written 485 KB 3560.94 KB/s Written 486 KB 3567.50 KB/s Written 487 KB 3569.33 KB/s Written 488 KB 3572.74 KB/s Written 489 KB 3577.44 KB/s Written 490 KB 3583.18 KB/s Written 491 KB 3589.71 KB/s Written 492 KB 3596.23 KB/s Written 493 KB 3602.75 KB/s Written 494 KB 3609.26 KB/s Written 495 KB 3615.51 KB/s Written 496 KB 3622.29 KB/s Written 497 KB 3628.53 KB/s Written 498 KB 3635.04 KB/s Written 499 KB 3641.54 KB/s Written 500 KB 3648.04 KB/s Written 501 KB 3654.53 KB/s Written 502 KB 3661.03 KB/s Written 503 KB 3667.52 KB/s Written 504 KB 3674.00 KB/s Written 505 KB 3675.94 KB/s Written 506 KB 3678.93 KB/s Written 507 KB 3683.52 KB/s Written 508 KB 3689.45 KB/s Written 509 KB 3695.64 KB/s Written 510 KB 3702.09 KB/s Written 511 KB 3708.54 KB/s Written 512 KB 3714.99 KB/s Written 513 KB 3721.44 KB/s Written 514 KB 3727.88 KB/s Written 515 KB 3734.32 KB/s Written 516 KB 3740.76 KB/s Written 517 KB 3747.19 KB/s Written 518 KB 3753.62 KB/s Written 519 KB 3759.78 KB/s Written 520 KB 3766.21 KB/s Written 521 KB 3772.63 KB/s Written 522 KB 3779.05 KB/s Written 523 KB 3780.81 KB/s Written 524 KB 3783.94 KB/s Written 525 KB 3788.15 KB/s Written 526 KB 3794.00 KB/s Written 527 KB 3800.39 KB/s Written 528 KB 3806.78 KB/s Written 529 KB 3812.89 KB/s Written 530 KB 3819.27 KB/s Written 531 KB 3825.65 KB/s Written 532 KB 3832.02 KB/s Written 533 KB 3838.40 KB/s Written 534 KB 3844.77 KB/s Written 535 KB 3851.14 KB/s Written 536 KB 3857.50 KB/s Written 537 KB 3863.87 KB/s Written 538 KB 3869.95 KB/s Written 539 KB 3876.30 KB/s Written 540 KB 3882.66 KB/s Written 541 KB 3884.54 KB/s Written 542 KB 3887.26 KB/s Written 543 KB 3891.64 KB/s Written 544 KB 3897.41 KB/s Written 545 KB 3903.45 KB/s Written 546 KB 3909.77 KB/s Written 547 KB 3916.09 KB/s Written 548 KB 3922.41 KB/s Written 549 KB 3928.72 KB/s Written 550 KB 3935.04 KB/s Written 551 KB 3940.22 KB/s Written 552 KB 3946.52 KB/s Written 553 KB 3952.82 KB/s Written 554 KB 3958.84 KB/s Written 555 KB 3965.14 KB/s Written 556 KB 3971.43 KB/s Written 557 KB 3977.72 KB/s Written 558 KB 3984.01 KB/s Written 559 KB 3985.46 KB/s Written 560 KB 3988.04 KB/s Written 561 KB 3992.31 KB/s Written 562 KB 3998.01 KB/s Written 563 KB 4003.98 KB/s Written 564 KB 4010.24 KB/s Written 565 KB 4016.49 KB/s Written 566 KB 4022.74 KB/s Written 567 KB 4010.18 KB/s Written 568 KB 4014.70 KB/s Written 569 KB 4020.92 KB/s Written 570 KB 4026.85 KB/s Written 571 KB 4033.06 KB/s Written 572 KB 4039.26 KB/s Written 573 KB 4045.47 KB/s Written 574 KB 4051.67 KB/s Written 575 KB 4057.87 KB/s Written 576 KB 4064.07 KB/s Written 577 KB 4064.24 KB/s Written 578 KB 4066.41 KB/s Written 579 KB 4070.58 KB/s Written 580 KB 4076.18 KB/s Written 581 KB 4082.06 KB/s Written 582 KB 4088.23 KB/s Written 583 KB 4094.39 KB/s Written 584 KB 4100.55 KB/s Written 585 KB 4106.70 KB/s Written 586 KB 4112.86 KB/s Written 587 KB 4119.01 KB/s Written 588 KB 4125.16 KB/s Written 589 KB 4131.01 KB/s Written 590 KB 4137.16 KB/s Written 591 KB 4143.30 KB/s Written 592 KB 4149.44 KB/s Written 593 KB 4155.57 KB/s Written 594 KB 4161.70 KB/s Written 595 KB 4163.17 KB/s Written 596 KB 4165.50 KB/s Written 597 KB 4169.58 KB/s Written 598 KB 4175.10 KB/s Written 599 KB 4180.92 KB/s Written 600 KB 4187.02 KB/s Written 601 KB 4193.12 KB/s Written 602 KB 4199.22 KB/s Written 603 KB 4205.31 KB/s Written 604 KB 4211.11 KB/s Written 605 KB 4217.20 KB/s Written 606 KB 4223.29 KB/s Written 607 KB 4229.38 KB/s Written 608 KB 4235.46 KB/s Written 609 KB 4241.54 KB/s Written 610 KB 4247.62 KB/s Written 611 KB 4253.69 KB/s Written 612 KB 4259.76 KB/s Written 613 KB 4260.79 KB/s Written 614 KB 4263.30 KB/s Written 615 KB 4267.28 KB/s Written 616 KB 4272.44 KB/s Written 617 KB 4278.48 KB/s Written 618 KB 4284.53 KB/s Written 619 KB 4290.57 KB/s Written 620 KB 4296.60 KB/s Written 621 KB 4302.34 KB/s Written 622 KB 4308.37 KB/s Written 623 KB 4314.40 KB/s Written 624 KB 4320.43 KB/s Written 625 KB 4326.46 KB/s Written 626 KB 4332.48 KB/s Written 627 KB 4338.50 KB/s Written 628 KB 4344.52 KB/s Written 629 KB 4350.53 KB/s Written 630 KB 4356.55 KB/s Written 631 KB 4357.73 KB/s Written 632 KB 4359.82 KB/s Written 633 KB 4363.71 KB/s Written 634 KB 4369.10 KB/s Written 635 KB 4374.78 KB/s Written 636 KB 4380.77 KB/s Written 637 KB 4386.75 KB/s Written 638 KB 4392.73 KB/s Written 639 KB 4398.40 KB/s Written 640 KB 4404.38 KB/s Written 641 KB 4410.35 KB/s Written 642 KB 4416.32 KB/s Written 643 KB 4422.28 KB/s Written 644 KB 4428.25 KB/s Written 645 KB 4434.21 KB/s Written 646 KB 4440.17 KB/s Written 647 KB 4446.12 KB/s Written 648 KB 4451.77 KB/s Written 649 KB 4453.14 KB/s Written 650 KB 4455.11 KB/s Written 651 KB 4458.90 KB/s Written 652 KB 4463.92 KB/s Written 653 KB 4469.85 KB/s Written 654 KB 4475.77 KB/s Written 655 KB 4481.70 KB/s Written 656 KB 4487.62 KB/s Written 657 KB 4493.54 KB/s Written 658 KB 4499.15 KB/s Written 659 KB 4505.06 KB/s Written 660 KB 4510.97 KB/s Written 661 KB 4515.95 KB/s Written 662 KB 4521.55 KB/s Written 663 KB 4527.45 KB/s Written 664 KB 4533.35 KB/s Written 665 KB 4539.25 KB/s Written 666 KB 4545.14 KB/s Written 667 KB 4545.76 KB/s Written 668 KB 4547.62 KB/s Written 669 KB 4551.02 KB/s Written 670 KB 4556.27 KB/s Written 671 KB 4562.14 KB/s Written 672 KB 4568.01 KB/s Written 673 KB 4573.56 KB/s Written 674 KB 4579.43 KB/s Written 675 KB 4585.29 KB/s Written 676 KB 4591.14 KB/s Written 677 KB 4597.00 KB/s Written 678 KB 4602.85 KB/s Written 679 KB 4608.70 KB/s Written 680 KB 4614.24 KB/s Written 681 KB 4620.08 KB/s Written 682 KB 4625.92 KB/s Written 683 KB 4631.76 KB/s Written 684 KB 4637.60 KB/s Written 685 KB 4638.41 KB/s Written 686 KB 4640.15 KB/s Written 687 KB 4643.77 KB/s Written 688 KB 4648.65 KB/s Written 689 KB 4654.46 KB/s Written 690 KB 4660.27 KB/s Written 691 KB 4666.08 KB/s Written 692 KB 4671.57 KB/s Written 693 KB 4677.38 KB/s Written 694 KB 4683.18 KB/s Written 695 KB 4688.98 KB/s Written 696 KB 4694.77 KB/s Written 697 KB 4700.57 KB/s Written 698 KB 4706.36 KB/s Written 699 KB 4712.15 KB/s Written 700 KB 4717.93 KB/s Written 701 KB 4723.40 KB/s Written 702 KB 4729.18 KB/s Written 703 KB 4729.87 KB/s Written 704 KB 4731.82 KB/s Written 705 KB 4735.36 KB/s Written 706 KB 4740.16 KB/s Written 707 KB 4745.92 KB/s Written 708 KB 4751.68 KB/s Written 709 KB 4757.11 KB/s Written 710 KB 4762.86 KB/s Written 711 KB 4768.61 KB/s Written 712 KB 4774.36 KB/s Written 713 KB 4780.10 KB/s Written 714 KB 4785.84 KB/s Written 715 KB 4791.26 KB/s Written 716 KB 4797.00 KB/s Written 717 KB 4802.73 KB/s Written 718 KB 4808.47 KB/s Written 719 KB 4814.19 KB/s Written 720 KB 4819.92 KB/s Written 721 KB 4820.49 KB/s Written 722 KB 4822.01 KB/s Written 723 KB 4825.47 KB/s Written 724 KB 4830.21 KB/s Written 725 KB 4835.91 KB/s Written 726 KB 4841.61 KB/s Written 727 KB 4847.31 KB/s Written 728 KB 4852.69 KB/s Written 729 KB 4858.38 KB/s Written 730 KB 4864.07 KB/s Written 731 KB 4869.76 KB/s Written 732 KB 4875.45 KB/s Written 733 KB 4881.13 KB/s Written 734 KB 4886.82 KB/s Written 735 KB 4892.50 KB/s Written 736 KB 4897.85 KB/s Written 737 KB 4903.53 KB/s Written 738 KB 4909.20 KB/s Written 739 KB 4909.65 KB/s Written 740 KB 4911.07 KB/s Written 741 KB 4905.01 KB/s Written 742 KB 4909.36 KB/s Written 743 KB 4914.67 KB/s Written 744 KB 4920.31 KB/s Written 745 KB 4925.95 KB/s Written 746 KB 4931.25 KB/s Written 747 KB 4936.88 KB/s Written 748 KB 4942.51 KB/s Written 749 KB 4947.81 KB/s Written 750 KB 4953.44 KB/s Written 751 KB 4959.06 KB/s Written 752 KB 4964.68 KB/s Written 753 KB 4970.30 KB/s Written 754 KB 4975.91 KB/s Written 755 KB 4981.53 KB/s Written 756 KB 4987.14 KB/s Written 757 KB 4987.15 KB/s Written 758 KB 4988.48 KB/s Written 759 KB 4991.78 KB/s Written 760 KB 4996.38 KB/s Written 761 KB 5001.97 KB/s Written 762 KB 5007.56 KB/s Written 763 KB 5012.81 KB/s Written 764 KB 5018.39 KB/s Written 765 KB 5023.97 KB/s Written 766 KB 5029.55 KB/s Written 767 KB 5034.79 KB/s Written 768 KB 5040.36 KB/s Written 769 KB 5045.93 KB/s Written 770 KB 5051.50 KB/s Written 771 KB 5057.06 KB/s Written 772 KB 5061.63 KB/s Written 773 KB 5066.86 KB/s Written 774 KB 5072.42 KB/s Written 775 KB 5072.32 KB/s Written 776 KB 5073.55 KB/s Written 777 KB 5076.77 KB/s Written 778 KB 5081.31 KB/s Written 779 KB 5086.85 KB/s Written 780 KB 5092.38 KB/s Written 781 KB 5097.58 KB/s Written 782 KB 5103.11 KB/s Written 783 KB 5108.63 KB/s Written 784 KB 5114.16 KB/s Written 785 KB 5119.68 KB/s Written 786 KB 5124.86 KB/s Written 787 KB 5130.38 KB/s Written 788 KB 5135.89 KB/s Written 789 KB 5141.40 KB/s Written 790 KB 5146.92 KB/s Written 791 KB 5152.42 KB/s Written 792 KB 5157.93 KB/s Written 793 KB 5158.06 KB/s Written 794 KB 5159.19 KB/s Written 795 KB 5162.34 KB/s Written 796 KB 5167.15 KB/s Written 797 KB 5172.64 KB/s Written 798 KB 5178.12 KB/s Written 799 KB 5183.26 KB/s Written 800 KB 5188.74 KB/s Written 801 KB 5194.22 KB/s Written 802 KB 5199.69 KB/s Written 803 KB 5205.16 KB/s Written 804 KB 5210.63 KB/s Written 805 KB 5216.10 KB/s Written 806 KB 5221.22 KB/s Written 807 KB 5226.68 KB/s Written 808 KB 5232.14 KB/s Written 809 KB 5237.60 KB/s Written 810 KB 5243.06 KB/s Written 811 KB 5243.08 KB/s Written 812 KB 5244.12 KB/s Written 813 KB 5247.19 KB/s Written 814 KB 5251.61 KB/s Written 815 KB 5257.05 KB/s Written 816 KB 5262.48 KB/s Written 817 KB 5267.91 KB/s Written 818 KB 5273.34 KB/s Written 819 KB 5278.76 KB/s Written 820 KB 5283.85 KB/s Written 821 KB 5289.27 KB/s Written 822 KB 5294.69 KB/s Written 823 KB 5300.10 KB/s Written 824 KB 5305.52 KB/s Written 825 KB 5310.93 KB/s Written 826 KB 5316.34 KB/s Written 827 KB 5321.75 KB/s Written 828 KB 5327.16 KB/s Written 829 KB 5327.08 KB/s Written 830 KB 5328.03 KB/s Written 831 KB 5331.02 KB/s Written 832 KB 5335.73 KB/s Written 833 KB 5340.77 KB/s Written 834 KB 5346.15 KB/s Written 835 KB 5351.53 KB/s Written 836 KB 5356.91 KB/s Written 837 KB 5362.29 KB/s Written 838 KB 5367.32 KB/s Written 839 KB 5372.69 KB/s Written 840 KB 5378.07 KB/s Written 841 KB 5383.43 KB/s Written 842 KB 5388.80 KB/s Written 843 KB 5394.16 KB/s Written 844 KB 5399.53 KB/s Written 845 KB 5404.89 KB/s Written 846 KB 5410.24 KB/s Written 847 KB 5409.72 KB/s Written 848 KB 5410.58 KB/s Written 849 KB 5413.51 KB/s Written 850 KB 5418.15 KB/s Written 851 KB 5423.49 KB/s Written 852 KB 5428.83 KB/s Written 853 KB 5433.81 KB/s Written 854 KB 5439.14 KB/s Written 855 KB 5444.47 KB/s Written 856 KB 5449.80 KB/s Written 857 KB 5455.12 KB/s Written 858 KB 5460.45 KB/s Written 859 KB 5465.77 KB/s Written 860 KB 5471.09 KB/s Written 861 KB 5476.40 KB/s Written 862 KB 5481.72 KB/s Written 863 KB 5486.68 KB/s Written 864 KB 5491.99 KB/s Written 865 KB 5492.06 KB/s Written 866 KB 5492.83 KB/s Written 867 KB 5495.69 KB/s Written 868 KB 5499.94 KB/s Written 869 KB 5505.23 KB/s Written 870 KB 5510.51 KB/s Written 871 KB 5515.80 KB/s Written 872 KB 5521.08 KB/s Written 873 KB 5526.02 KB/s Written 874 KB 5531.30 KB/s Written 875 KB 5536.57 KB/s Written 876 KB 5541.85 KB/s Written 877 KB 5547.12 KB/s Written 878 KB 5552.39 KB/s Written 879 KB 5557.66 KB/s Written 880 KB 5562.93 KB/s Written 881 KB 5567.84 KB/s Written 882 KB 5573.11 KB/s Written 883 KB 5570.98 KB/s Written 884 KB 5571.66 KB/s Written 885 KB 5574.45 KB/s Written 886 KB 5578.64 KB/s Written 887 KB 5583.88 KB/s Written 888 KB 5589.12 KB/s Written 889 KB 5594.01 KB/s Written 890 KB 5599.25 KB/s Written 891 KB 5604.48 KB/s Written 892 KB 5609.71 KB/s Written 893 KB 5614.94 KB/s Written 894 KB 5620.17 KB/s Written 895 KB 5625.39 KB/s Written 896 KB 5630.62 KB/s Written 897 KB 5635.84 KB/s Written 898 KB 5641.06 KB/s Written 899 KB 5645.92 KB/s Written 900 KB 5651.14 KB/s Written 901 KB 5651.03 KB/s Written 902 KB 5651.63 KB/s Written 903 KB 5654.35 KB/s Written 904 KB 5658.84 KB/s Written 905 KB 5663.68 KB/s Written 906 KB 5668.88 KB/s Written 907 KB 5674.07 KB/s Written 908 KB 5679.26 KB/s Written 909 KB 5684.09 KB/s Written 910 KB 5689.28 KB/s Written 911 KB 5694.46 KB/s Written 912 KB 5699.64 KB/s Written 913 KB 5704.82 KB/s Written 914 KB 5710.00 KB/s Written 915 KB 5715.18 KB/s Written 916 KB 5720.35 KB/s Written 917 KB 5725.52 KB/s Written 918 KB 5730.69 KB/s Written 919 KB 5729.78 KB/s Written 920 KB 5730.66 KB/s Written 921 KB 5733.32 KB/s Written 922 KB 5737.40 KB/s Written 923 KB 5682.80 KB/s Written 924 KB 5685.80 KB/s Written 925 KB 5690.91 KB/s Written 926 KB 5695.66 KB/s Written 927 KB 5700.76 KB/s Written 928 KB 5705.85 KB/s Written 929 KB 5710.95 KB/s Written 930 KB 5715.69 KB/s Written 931 KB 5720.78 KB/s Written 932 KB 5725.87 KB/s Written 933 KB 5730.96 KB/s Written 934 KB 5736.04 KB/s Written 935 KB 5741.13 KB/s Written 936 KB 5746.21 KB/s Written 937 KB 5743.53 KB/s Written 938 KB 5743.68 KB/s Written 939 KB 5746.28 KB/s Written 940 KB 5750.64 KB/s Written 941 KB 5755.35 KB/s Written 942 KB 5760.41 KB/s Written 943 KB 5765.47 KB/s Written 944 KB 5770.17 KB/s Written 945 KB 5775.22 KB/s Written 946 KB 5780.28 KB/s Written 947 KB 5785.33 KB/s Written 948 KB 5790.37 KB/s Written 949 KB 5795.42 KB/s Written 950 KB 5800.46 KB/s Written 951 KB 5805.51 KB/s Written 952 KB 5810.55 KB/s Written 953 KB 5815.23 KB/s Written 954 KB 5820.27 KB/s Written 955 KB 5819.62 KB/s Written 956 KB 5820.40 KB/s Written 957 KB 5822.94 KB/s Written 958 KB 5826.90 KB/s Written 959 KB 5831.91 KB/s Written 960 KB 5836.93 KB/s Written 961 KB 5841.95 KB/s Written 962 KB 5846.60 KB/s Written 963 KB 5851.61 KB/s Written 964 KB 5856.62 KB/s Written 965 KB 5861.63 KB/s Written 966 KB 5866.63 KB/s Written 967 KB 5871.64 KB/s Written 968 KB 5876.64 KB/s Written 969 KB 5881.28 KB/s Written 970 KB 5886.28 KB/s Written 971 KB 5891.28 KB/s Written 972 KB 5896.27 KB/s Written 973 KB 5895.54 KB/s Written 974 KB 5895.88 KB/s Written 975 KB 5898.37 KB/s Written 976 KB 5902.63 KB/s Written 977 KB 5907.61 KB/s Written 978 KB 5912.58 KB/s Written 979 KB 5917.20 KB/s Written 980 KB 5922.17 KB/s Written 981 KB 5927.13 KB/s Written 982 KB 5932.10 KB/s Written 983 KB 5936.71 KB/s Written 984 KB 5941.67 KB/s Written 985 KB 5946.63 KB/s Written 986 KB 5951.59 KB/s Written 987 KB 5956.55 KB/s Written 988 KB 5961.50 KB/s Written 989 KB 5966.46 KB/s Written 990 KB 5971.41 KB/s Written 991 KB 5970.60 KB/s Written 992 KB 5970.87 KB/s Written 993 KB 5973.29 KB/s Written 994 KB 5976.07 KB/s Written 995 KB 5980.65 KB/s Written 996 KB 5985.58 KB/s Written 997 KB 5990.51 KB/s Written 998 KB 5995.43 KB/s Written 999 KB 6000.36 KB/s Written 1000 KB 6005.28 KB/s Written 1001 KB 6009.85 KB/s Written 1002 KB 6014.77 KB/s Written 1003 KB 6019.69 KB/s Written 1004 KB 6024.60 KB/s Written 1005 KB 6029.52 KB/s Written 1006 KB 6034.43 KB/s Written 1007 KB 6039.34 KB/s Written 1008 KB 6044.25 KB/s Written 1009 KB 6043.00 KB/s Written 1010 KB 6043.20 KB/s Written 1011 KB 6045.57 KB/s Written 1012 KB 6049.74 KB/s Written 1013 KB 6054.27 KB/s Written 1014 KB 6059.16 KB/s Written 1015 KB 6064.05 KB/s Written 1016 KB 6068.93 KB/s Written 1017 KB 6073.82 KB/s Written 1018 KB 6078.70 KB/s Written 1019 KB 6083.22 KB/s Written 1020 KB 6088.10 KB/s Written 1021 KB 6092.98 KB/s Written 1022 KB 6097.85 KB/s Written 1023 KB 6102.73 KB/s Written 1024 KB 6107.60 KB/s Written 1025 KB 6112.47 KB/s Written 1026 KB 6117.34 KB/s Written 1027 KB 6116.37 KB/s Written 1028 KB 6116.50 KB/s Written 1029 KB 6118.81 KB/s Written 1030 KB 6122.57 KB/s Written 1031 KB 6127.42 KB/s Written 1032 KB 6132.27 KB/s Written 1033 KB 6136.76 KB/s Written 1034 KB 6141.60 KB/s Written 1035 KB 6146.45 KB/s Written 1036 KB 6151.29 KB/s Written 1037 KB 6156.13 KB/s Written 1038 KB 6160.97 KB/s Written 1039 KB 6165.81 KB/s Written 1040 KB 6170.64 KB/s Written 1041 KB 6175.48 KB/s Written 1042 KB 6179.94 KB/s Written 1043 KB 6184.77 KB/s Written 1044 KB 6189.60 KB/s Written 1045 KB 6188.56 KB/s Written 1046 KB 6188.98 KB/s Written 1047 KB 6191.24 KB/s Written 1048 KB 6194.95 KB/s Written 1049 KB 6199.76 KB/s Written 1050 KB 6204.57 KB/s Written 1051 KB 6209.38 KB/s Written 1052 KB 6214.19 KB/s Written 1053 KB 6218.99 KB/s Written 1054 KB 6223.43 KB/s Written 1055 KB 6228.23 KB/s Written 1056 KB 6233.03 KB/s Written 1057 KB 6237.83 KB/s Written 1058 KB 6242.62 KB/s Written 1059 KB 6247.42 KB/s Written 1060 KB 6252.21 KB/s Written 1061 KB 6257.00 KB/s Written 1062 KB 6261.79 KB/s Written 1063 KB 6260.31 KB/s Written 1064 KB 6260.66 KB/s Written 1065 KB 6262.50 KB/s Written 1066 KB 6266.53 KB/s Written 1067 KB 6270.94 KB/s Written 1068 KB 6275.71 KB/s Written 1069 KB 6280.48 KB/s Written 1070 KB 6285.24 KB/s Written 1071 KB 6290.01 KB/s Written 1072 KB 6294.77 KB/s Written 1073 KB 6299.54 KB/s Written 1074 KB 6304.30 KB/s Written 1075 KB 6309.06 KB/s Written 1076 KB 6313.81 KB/s Written 1077 KB 6318.20 KB/s Written 1078 KB 6322.95 KB/s Written 1079 KB 6327.70 KB/s Written 1080 KB 6332.45 KB/s Written 1081 KB 6316.10 KB/s Written 1082 KB 6316.04 KB/s Written 1083 KB 6320.03 KB/s Written 1084 KB 6324.76 KB/s Written 1085 KB 6329.11 KB/s Written 1086 KB 6333.84 KB/s Written 1087 KB 6338.56 KB/s Written 1088 KB 6343.28 KB/s Written 1089 KB 6347.63 KB/s Written 1090 KB 6352.35 KB/s Written 1091 KB 6357.07 KB/s Written 1092 KB 6361.78 KB/s Written 1093 KB 6366.50 KB/s Written 1094 KB 6371.21 KB/s Written 1095 KB 6375.92 KB/s Written 1096 KB 6380.63 KB/s Written 1097 KB 6384.96 KB/s Written 1098 KB 6387.06 KB/s Written 1099 KB 6390.65 KB/s Written 1100 KB 6394.98 KB/s Written 1101 KB 6399.67 KB/s Written 1102 KB 6404.37 KB/s Written 1103 KB 6409.06 KB/s Written 1104 KB 6412.27 KB/s Written 1105 KB 6416.58 KB/s Written 1106 KB 6421.27 KB/s Written 1107 KB 6425.96 KB/s Written 1108 KB 6430.27 KB/s Written 1109 KB 6434.95 KB/s Written 1110 KB 6439.64 KB/s Written 1111 KB 6444.32 KB/s Written 1112 KB 6448.99 KB/s Written 1113 KB 6453.30 KB/s Written 1114 KB 6454.23 KB/s Written 1115 KB 6457.40 KB/s Written 1116 KB 6461.70 KB/s Written 1117 KB 6466.37 KB/s Written 1118 KB 6471.03 KB/s Written 1119 KB 6475.69 KB/s Written 1120 KB 6479.98 KB/s Written 1121 KB 6484.64 KB/s Written 1122 KB 6489.30 KB/s Written 1123 KB 6493.96 KB/s Written 1124 KB 6498.24 KB/s Written 1125 KB 6502.89 KB/s Written 1126 KB 6507.54 KB/s Written 1127 KB 6512.19 KB/s Written 1128 KB 6516.84 KB/s Written 1129 KB 6521.49 KB/s Written 1130 KB 6526.13 KB/s Written 1131 KB 6530.40 KB/s Written 1132 KB 6535.04 KB/s Written 1133 KB 6539.68 KB/s Written 1134 KB 6544.32 KB/s Written 1135 KB 6548.58 KB/s Written 1136 KB 6553.22 KB/s Written 1137 KB 6557.85 KB/s Written 1138 KB 6562.48 KB/s Written 1139 KB 6567.11 KB/s Written 1140 KB 6571.36 KB/s Written 1141 KB 6575.99 KB/s Written 1142 KB 6580.62 KB/s Written 1143 KB 6585.24 KB/s Written 1144 KB 6589.48 KB/s Written 1145 KB 6594.10 KB/s Written 1146 KB 6598.72 KB/s Written 1147 KB 6602.96 KB/s Written 1148 KB 6607.57 KB/s Written 1149 KB 6612.19 KB/s Written 1150 KB 6616.80 KB/s Written 1151 KB 6621.03 KB/s Written 1152 KB 6625.64 KB/s Written 1153 KB 6630.25 KB/s Written 1154 KB 6634.85 KB/s Written 1155 KB 6639.46 KB/s Written 1156 KB 6643.68 KB/s Written 1157 KB 6648.28 KB/s Written 1158 KB 6652.88 KB/s Written 1159 KB 6657.48 KB/s Written 1160 KB 6662.07 KB/s Written 1161 KB 6666.28 KB/s Written 1162 KB 6670.88 KB/s Written 1163 KB 6675.47 KB/s Written 1164 KB 6679.67 KB/s Written 1165 KB 6684.26 KB/s Written 1166 KB 6688.85 KB/s Written 1167 KB 6693.43 KB/s Written 1168 KB 6697.63 KB/s Written 1169 KB 6702.21 KB/s Written 1170 KB 6706.79 KB/s Written 1171 KB 6711.37 KB/s Written 1172 KB 6715.56 KB/s Written 1173 KB 6720.14 KB/s Written 1174 KB 6724.71 KB/s Written 1175 KB 6728.90 KB/s Written 1176 KB 6733.47 KB/s Written 1177 KB 6738.04 KB/s Written 1178 KB 6742.60 KB/s Written 1179 KB 6746.78 KB/s Written 1180 KB 6751.34 KB/s Written 1181 KB 6755.91 KB/s Written 1182 KB 6760.47 KB/s Written 1183 KB 6764.64 KB/s Written 1184 KB 6769.20 KB/s Written 1185 KB 6773.36 KB/s Written 1186 KB 6777.92 KB/s Written 1187 KB 6782.47 KB/s Written 1188 KB 6786.63 KB/s Written 1189 KB 6791.18 KB/s Written 1190 KB 6795.73 KB/s Written 1191 KB 6800.27 KB/s Written 1192 KB 6804.43 KB/s Written 1193 KB 6808.97 KB/s Written 1194 KB 6813.51 KB/s Written 1195 KB 6817.66 KB/s Written 1196 KB 6822.20 KB/s Written 1197 KB 6826.74 KB/s Written 1198 KB 6830.88 KB/s Written 1199 KB 6835.41 KB/s Written 1200 KB 6839.56 KB/s Written 1201 KB 6844.08 KB/s Written 1202 KB 6848.61 KB/s Written 1203 KB 6852.75 KB/s Written 1204 KB 6857.27 KB/s Written 1205 KB 6861.80 KB/s Written 1206 KB 6865.93 KB/s Written 1207 KB 6870.45 KB/s Written 1208 KB 6874.57 KB/s Written 1209 KB 6879.09 KB/s Written 1210 KB 6883.60 KB/s Written 1211 KB 6617.85 KB/s Written 1212 KB 6617.89 KB/s Written 1213 KB 6621.54 KB/s Written 1214 KB 6625.91 KB/s Written 1215 KB 6628.84 KB/s Written 1216 KB 6632.49 KB/s Written 1217 KB 6636.85 KB/s Written 1218 KB 6641.22 KB/s Written 1219 KB 6645.22 KB/s Written 1220 KB 6649.59 KB/s Written 1221 KB 6653.95 KB/s Written 1222 KB 6658.31 KB/s Written 1223 KB 6662.67 KB/s Written 1224 KB 6667.03 KB/s Written 1225 KB 6671.02 KB/s Written 1226 KB 6675.38 KB/s Written 1227 KB 6679.73 KB/s Written 1228 KB 6677.54 KB/s Written 1229 KB 6677.17 KB/s Written 1230 KB 6678.97 KB/s Written 1231 KB 6682.59 KB/s Written 1232 KB 6686.57 KB/s Written 1233 KB 6690.91 KB/s Written 1234 KB 6694.88 KB/s Written 1235 KB 6699.21 KB/s Written 1236 KB 6703.55 KB/s Written 1237 KB 6707.88 KB/s Written 1238 KB 6712.21 KB/s Written 1239 KB 6716.54 KB/s Written 1240 KB 6720.50 KB/s Written 1241 KB 6724.83 KB/s Written 1242 KB 6729.15 KB/s Written 1243 KB 6733.48 KB/s Written 1244 KB 6737.80 KB/s Written 1245 KB 6742.12 KB/s Written 1246 KB 6740.60 KB/s Written 1247 KB 6740.18 KB/s Written 1248 KB 6741.94 KB/s Written 1249 KB 6745.15 KB/s Written 1250 KB 6749.46 KB/s Written 1251 KB 6753.77 KB/s Written 1252 KB 6758.07 KB/s Written 1253 KB 6762.37 KB/s Written 1254 KB 6766.67 KB/s Written 1255 KB 6770.97 KB/s Written 1256 KB 6774.91 KB/s Written 1257 KB 6779.20 KB/s Written 1258 KB 6783.50 KB/s Written 1259 KB 6787.79 KB/s Written 1260 KB 6792.09 KB/s Written 1261 KB 6796.38 KB/s Written 1262 KB 6800.67 KB/s Written 1263 KB 6804.96 KB/s Written 1264 KB 6803.75 KB/s Written 1265 KB 6803.27 KB/s Written 1266 KB 6805.35 KB/s Written 1267 KB 6808.53 KB/s Written 1268 KB 6812.81 KB/s Written 1269 KB 6817.08 KB/s Written 1270 KB 6821.36 KB/s Written 1271 KB 6825.63 KB/s Written 1272 KB 6829.53 KB/s Written 1273 KB 6833.80 KB/s Written 1274 KB 6838.07 KB/s Written 1275 KB 6842.33 KB/s Written 1276 KB 6846.60 KB/s Written 1277 KB 6850.86 KB/s Written 1278 KB 6855.12 KB/s Written 1279 KB 6859.38 KB/s Written 1280 KB 6863.64 KB/s Written 1281 KB 6867.90 KB/s Written 1282 KB 6866.26 KB/s Written 1283 KB 6865.74 KB/s Written 1284 KB 6867.41 KB/s Written 1285 KB 6870.92 KB/s Written 1286 KB 6874.80 KB/s Written 1287 KB 6879.04 KB/s Written 1288 KB 6883.28 KB/s Written 1289 KB 6887.52 KB/s Written 1290 KB 6891.76 KB/s Written 1291 KB 6896.00 KB/s Written 1292 KB 6900.23 KB/s Written 1293 KB 6904.47 KB/s Written 1294 KB 6908.33 KB/s Written 1295 KB 6912.57 KB/s Written 1296 KB 6916.80 KB/s Written 1297 KB 6921.02 KB/s Written 1298 KB 6925.25 KB/s Written 1299 KB 6929.48 KB/s Written 1300 KB 6928.16 KB/s Written 1301 KB 6927.58 KB/s Written 1302 KB 6929.59 KB/s Written 1303 KB 6932.69 KB/s Written 1304 KB 6936.91 KB/s Written 1305 KB 6941.12 KB/s Written 1306 KB 6945.33 KB/s Written 1307 KB 6949.54 KB/s Written 1308 KB 6953.75 KB/s Written 1309 KB 6957.58 KB/s Written 1310 KB 6961.79 KB/s Written 1311 KB 6965.99 KB/s Written 1312 KB 6970.20 KB/s Written 1313 KB 6974.40 KB/s Written 1314 KB 6978.60 KB/s Written 1315 KB 6982.80 KB/s Written 1316 KB 6986.99 KB/s Written 1317 KB 6991.19 KB/s Written 1318 KB 6989.45 KB/s Written 1319 KB 6988.82 KB/s Written 1320 KB 6990.41 KB/s Written 1321 KB 6993.86 KB/s Written 1322 KB 6997.67 KB/s Written 1323 KB 7001.85 KB/s Written 1324 KB 7006.03 KB/s Written 1325 KB 7010.21 KB/s Written 1326 KB 7012.90 KB/s Written 1327 KB 7016.71 KB/s Written 1328 KB 7020.51 KB/s Written 1329 KB 7024.68 KB/s Written 1330 KB 7028.86 KB/s Written 1331 KB 7033.03 KB/s Written 1332 KB 7036.82 KB/s Written 1333 KB 7040.99 KB/s Written 1334 KB 7045.15 KB/s Written 1335 KB 7049.32 KB/s Written 1336 KB 7047.16 KB/s Written 1337 KB 7046.11 KB/s Written 1338 KB 7048.04 KB/s Written 1339 KB 7051.08 KB/s Written 1340 KB 7055.23 KB/s Written 1341 KB 7059.38 KB/s Written 1342 KB 7063.16 KB/s Written 1343 KB 7067.31 KB/s Written 1344 KB 7071.45 KB/s Written 1345 KB 7075.60 KB/s Written 1346 KB 7079.37 KB/s Written 1347 KB 7083.51 KB/s Written 1348 KB 7087.65 KB/s Written 1349 KB 7091.79 KB/s Written 1350 KB 7095.93 KB/s Written 1351 KB 7100.06 KB/s Written 1352 KB 7104.20 KB/s Written 1353 KB 7108.33 KB/s Written 1354 KB 7106.12 KB/s Written 1355 KB 7105.40 KB/s Written 1356 KB 7095.02 KB/s Written 1357 KB 7098.02 KB/s Written 1358 KB 7101.77 KB/s Written 1359 KB 7105.88 KB/s Written 1360 KB 7110.00 KB/s Written 1361 KB 7114.11 KB/s Written 1362 KB 7117.85 KB/s Written 1363 KB 7121.96 KB/s Written 1364 KB 7126.06 KB/s Written 1365 KB 7130.17 KB/s Written 1366 KB 7133.90 KB/s Written 1367 KB 7138.01 KB/s Written 1368 KB 7142.11 KB/s Written 1369 KB 7146.21 KB/s Written 1370 KB 7150.31 KB/s Written 1371 KB 7154.41 KB/s Written 1372 KB 7152.17 KB/s Written 1373 KB 7151.41 KB/s Written 1374 KB 7152.90 KB/s Written 1375 KB 7156.24 KB/s Written 1376 KB 7159.95 KB/s Written 1377 KB 7164.04 KB/s Written 1378 KB 7168.12 KB/s Written 1379 KB 7172.21 KB/s Written 1380 KB 7175.91 KB/s Written 1381 KB 7179.99 KB/s Written 1382 KB 7184.07 KB/s Written 1383 KB 7188.15 KB/s Written 1384 KB 7192.23 KB/s Written 1385 KB 7196.30 KB/s Written 1386 KB 7200.37 KB/s Written 1387 KB 7204.45 KB/s Written 1388 KB 7208.14 KB/s Written 1389 KB 7212.21 KB/s Written 1390 KB 7210.29 KB/s Written 1391 KB 7209.50 KB/s Written 1392 KB 7210.94 KB/s Written 1393 KB 7213.88 KB/s Written 1394 KB 7217.94 KB/s Written 1395 KB 7221.99 KB/s Written 1396 KB 7226.05 KB/s Written 1397 KB 7230.10 KB/s Written 1398 KB 7233.78 KB/s Written 1399 KB 7237.83 KB/s Written 1400 KB 7241.88 KB/s Written 1401 KB 7245.93 KB/s Written 1402 KB 7249.97 KB/s Written 1403 KB 7253.64 KB/s Written 1404 KB 7257.69 KB/s Written 1405 KB 7261.73 KB/s Written 1406 KB 7265.77 KB/s Written 1407 KB 7269.82 KB/s Written 1408 KB 7268.22 KB/s Written 1409 KB 7267.38 KB/s Written 1410 KB 7268.79 KB/s Written 1411 KB 7272.07 KB/s Written 1412 KB 7275.73 KB/s Written 1413 KB 7279.75 KB/s Written 1414 KB 7283.78 KB/s Written 1415 KB 7287.80 KB/s Written 1416 KB 7291.83 KB/s Written 1417 KB 7295.47 KB/s Written 1418 KB 7299.50 KB/s Written 1419 KB 7303.52 KB/s Written 1420 KB 7307.53 KB/s Written 1421 KB 7311.55 KB/s Written 1422 KB 7315.57 KB/s Written 1423 KB 7319.58 KB/s Written 1424 KB 7323.60 KB/s Written 1425 KB 7327.61 KB/s Written 1426 KB 7325.22 KB/s Written 1427 KB 7324.71 KB/s Written 1428 KB 7325.71 KB/s Written 1429 KB 7328.96 KB/s Written 1430 KB 7332.96 KB/s Written 1431 KB 7336.96 KB/s Written 1432 KB 7340.95 KB/s Written 1433 KB 7344.57 KB/s Written 1434 KB 7348.57 KB/s Written 1435 KB 7352.56 KB/s Written 1436 KB 7355.43 KB/s Written 1437 KB 7359.04 KB/s Written 1438 KB 7363.03 KB/s Written 1439 KB 7366.64 KB/s Written 1440 KB 7370.63 KB/s Written 1441 KB 7374.62 KB/s Written 1442 KB 7378.60 KB/s Written 1443 KB 7382.58 KB/s Written 1444 KB 7380.15 KB/s Written 1445 KB 7379.23 KB/s Written 1446 KB 7380.56 KB/s Written 1447 KB 7383.78 KB/s Written 1448 KB 7387.38 KB/s Written 1449 KB 7391.35 KB/s Written 1450 KB 7395.32 KB/s Written 1451 KB 7399.29 KB/s Written 1452 KB 7403.25 KB/s Written 1453 KB 7406.84 KB/s Written 1454 KB 7410.81 KB/s Written 1455 KB 7414.77 KB/s Written 1456 KB 7418.73 KB/s Written 1457 KB 7422.69 KB/s Written 1458 KB 7426.65 KB/s Written 1459 KB 7430.61 KB/s Written 1460 KB 7434.57 KB/s Written 1461 KB 7438.52 KB/s Written 1462 KB 7436.04 KB/s Written 1463 KB 7435.08 KB/s Written 1464 KB 7436.38 KB/s Written 1465 KB 7439.57 KB/s Written 1466 KB 7443.51 KB/s Written 1467 KB 7447.08 KB/s Written 1468 KB 7451.02 KB/s Written 1469 KB 7454.96 KB/s Written 1470 KB 7458.90 KB/s Written 1471 KB 7462.84 KB/s Written 1472 KB 7466.77 KB/s Written 1473 KB 7470.33 KB/s Written 1474 KB 7474.27 KB/s Written 1475 KB 7478.20 KB/s Written 1476 KB 7482.13 KB/s Written 1477 KB 7486.06 KB/s Written 1478 KB 7489.99 KB/s Written 1479 KB 7493.92 KB/s Written 1480 KB 7491.77 KB/s Written 1481 KB 7490.77 KB/s Written 1482 KB 7492.04 KB/s Written 1483 KB 7495.20 KB/s Written 1484 KB 7499.12 KB/s Written 1485 KB 7502.65 KB/s Written 1486 KB 7506.57 KB/s Written 1487 KB 7510.48 KB/s Written 1488 KB 7514.39 KB/s Written 1489 KB 7518.30 KB/s Written 1490 KB 7522.21 KB/s Written 1491 KB 7525.74 KB/s Written 1492 KB 7529.65 KB/s Written 1493 KB 7533.56 KB/s Written 1494 KB 7537.46 KB/s Written 1495 KB 7541.36 KB/s Written 1496 KB 7545.27 KB/s Written 1497 KB 7549.17 KB/s Written 1498 KB 7546.98 KB/s Written 1499 KB 7545.94 KB/s Written 1500 KB 7547.17 KB/s Written 1501 KB 7550.30 KB/s Written 1502 KB 7553.81 KB/s Written 1503 KB 7557.70 KB/s Written 1504 KB 7561.59 KB/s Written 1505 KB 7565.48 KB/s Written 1506 KB 7569.36 KB/s Written 1507 KB 7573.24 KB/s Written 1508 KB 7576.75 KB/s Written 1509 KB 7580.63 KB/s Written 1510 KB 7584.51 KB/s Written 1511 KB 7588.39 KB/s Written 1512 KB 7592.27 KB/s Written 1513 KB 7596.14 KB/s Written 1514 KB 7600.02 KB/s Written 1515 KB 7603.89 KB/s Written 1516 KB 7601.66 KB/s Written 1517 KB 7600.58 KB/s Written 1518 KB 7601.78 KB/s Written 1519 KB 7604.89 KB/s Written 1520 KB 7608.75 KB/s Written 1521 KB 7612.61 KB/s Written 1522 KB 7616.47 KB/s Written 1523 KB 7620.33 KB/s Written 1524 KB 7623.81 KB/s Written 1525 KB 7627.67 KB/s Written 1526 KB 7631.53 KB/s Written 1527 KB 7635.38 KB/s Written 1528 KB 7639.24 KB/s Written 1529 KB 7643.09 KB/s Written 1530 KB 7646.94 KB/s Written 1531 KB 7650.41 KB/s Written 1532 KB 7654.26 KB/s Written 1533 KB 7658.11 KB/s Written 1534 KB 7656.22 KB/s Written 1535 KB 7655.10 KB/s Written 1536 KB 7656.27 KB/s Written 1537 KB 7658.96 KB/s Written 1538 KB 7662.80 KB/s Written 1539 KB 7495.25 KB/s Written 1540 KB 7497.93 KB/s Written 1541 KB 7501.34 KB/s Written 1542 KB 7505.11 KB/s Written 1543 KB 7508.88 KB/s Written 1544 KB 7512.29 KB/s Written 1545 KB 7516.05 KB/s Written 1546 KB 7519.82 KB/s Written 1547 KB 7522.12 KB/s Written 1548 KB 7525.52 KB/s Written 1549 KB 7529.29 KB/s Written 1550 KB 7533.05 KB/s Written 1551 KB 7536.81 KB/s Written 1552 KB 7531.79 KB/s Written 1553 KB 7530.43 KB/s Written 1554 KB 7531.62 KB/s Written 1555 KB 7534.64 KB/s Written 1556 KB 7538.03 KB/s Written 1557 KB 7541.78 KB/s Written 1558 KB 7545.52 KB/s Written 1559 KB 7548.91 KB/s Written 1560 KB 7552.65 KB/s Written 1561 KB 7556.39 KB/s Written 1562 KB 7560.14 KB/s Written 1563 KB 7563.88 KB/s Written 1564 KB 7567.62 KB/s Written 1565 KB 7570.99 KB/s Written 1566 KB 7574.73 KB/s Written 1567 KB 7578.47 KB/s Written 1568 KB 7582.21 KB/s Written 1569 KB 7585.94 KB/s Written 1570 KB 7583.44 KB/s Written 1571 KB 7582.05 KB/s Written 1572 KB 7583.21 KB/s Written 1573 KB 7586.21 KB/s Written 1574 KB 7589.93 KB/s Written 1575 KB 7593.66 KB/s Written 1576 KB 7597.38 KB/s Written 1577 KB 7600.73 KB/s Written 1578 KB 7604.45 KB/s Written 1579 KB 7608.17 KB/s Written 1580 KB 7611.89 KB/s Written 1581 KB 7615.61 KB/s Written 1582 KB 7619.32 KB/s Written 1583 KB 7623.04 KB/s Written 1584 KB 7626.38 KB/s Written 1585 KB 7630.10 KB/s Written 1586 KB 7633.81 KB/s Written 1587 KB 7637.52 KB/s Written 1588 KB 7635.35 KB/s Written 1589 KB 7634.28 KB/s Written 1590 KB 7635.42 KB/s Written 1591 KB 7638.39 KB/s Written 1592 KB 7642.09 KB/s Written 1593 KB 7645.79 KB/s Written 1594 KB 7649.49 KB/s Written 1595 KB 7653.18 KB/s Written 1596 KB 7656.88 KB/s Written 1597 KB 7660.21 KB/s Written 1598 KB 7663.90 KB/s Written 1599 KB 7667.59 KB/s Written 1600 KB 7671.29 KB/s Written 1601 KB 7674.98 KB/s Written 1602 KB 7678.67 KB/s Written 1603 KB 7682.35 KB/s Written 1604 KB 7686.04 KB/s Written 1605 KB 7689.36 KB/s Written 1606 KB 7687.15 KB/s Written 1607 KB 7685.69 KB/s Written 1608 KB 7687.16 KB/s Written 1609 KB 7689.73 KB/s Written 1610 KB 7693.41 KB/s Written 1611 KB 7697.09 KB/s Written 1612 KB 7700.76 KB/s Written 1613 KB 7704.43 KB/s Written 1614 KB 7707.74 KB/s Written 1615 KB 7711.41 KB/s Written 1616 KB 7715.08 KB/s Written 1617 KB 7718.75 KB/s Written 1618 KB 7722.41 KB/s Written 1619 KB 7726.08 KB/s Written 1620 KB 7729.75 KB/s Written 1621 KB 7733.04 KB/s Written 1622 KB 7736.70 KB/s Written 1623 KB 7740.37 KB/s Written 1624 KB 7738.12 KB/s Written 1625 KB 7736.99 KB/s Written 1626 KB 7738.07 KB/s Written 1627 KB 7740.98 KB/s Written 1628 KB 7739.11 KB/s Written 1629 KB 7742.40 KB/s Written 1630 KB 7746.04 KB/s Written 1631 KB 7749.32 KB/s Written 1632 KB 7752.97 KB/s Written 1633 KB 7756.61 KB/s Written 1634 KB 7759.89 KB/s Written 1635 KB 7763.53 KB/s Written 1636 KB 7767.17 KB/s Written 1637 KB 7770.82 KB/s Written 1638 KB 7774.46 KB/s Written 1639 KB 7778.09 KB/s Written 1640 KB 7770.67 KB/s Written 1641 KB 7773.94 KB/s Written 1642 KB 7769.47 KB/s Written 1643 KB 7768.32 KB/s Written 1644 KB 7769.01 KB/s Written 1645 KB 7771.90 KB/s Written 1646 KB 7775.15 KB/s Written 1647 KB 7778.77 KB/s Written 1648 KB 7782.40 KB/s Written 1649 KB 7786.01 KB/s Written 1650 KB 7789.26 KB/s Written 1651 KB 7792.88 KB/s Written 1652 KB 7796.50 KB/s Written 1653 KB 7800.11 KB/s Written 1654 KB 7803.73 KB/s Written 1655 KB 7807.34 KB/s Written 1656 KB 7810.95 KB/s Written 1657 KB 7814.56 KB/s Written 1658 KB 7816.70 KB/s Written 1659 KB 7819.94 KB/s Written 1660 KB 7817.28 KB/s Written 1661 KB 7816.10 KB/s Written 1662 KB 7817.13 KB/s Written 1663 KB 7819.63 KB/s Written 1664 KB 7823.23 KB/s Written 1665 KB 7826.82 KB/s Written 1666 KB 7830.42 KB/s Written 1667 KB 7833.65 KB/s Written 1668 KB 7837.24 KB/s Written 1669 KB 7840.83 KB/s Written 1670 KB 7844.43 KB/s Written 1671 KB 7848.02 KB/s Written 1672 KB 7851.61 KB/s Written 1673 KB 7854.83 KB/s Written 1674 KB 7858.42 KB/s Written 1675 KB 7862.00 KB/s Written 1676 KB 7865.59 KB/s Written 1677 KB 7869.18 KB/s Written 1678 KB 7866.49 KB/s Written 1679 KB 7865.27 KB/s Written 1680 KB 7866.27 KB/s Written 1681 KB 7869.11 KB/s Written 1682 KB 7872.69 KB/s Written 1683 KB 7875.89 KB/s Written 1684 KB 7879.47 KB/s Written 1685 KB 7883.04 KB/s Written 1686 KB 7886.61 KB/s Written 1687 KB 7890.18 KB/s Written 1688 KB 7893.38 KB/s Written 1689 KB 7896.95 KB/s Written 1690 KB 7900.52 KB/s Written 1691 KB 7904.09 KB/s Written 1692 KB 7907.65 KB/s Written 1693 KB 7911.21 KB/s Written 1694 KB 7914.78 KB/s Written 1695 KB 7918.34 KB/s Written 1696 KB 7915.99 KB/s Written 1697 KB 7914.74 KB/s Written 1698 KB 7915.71 KB/s Written 1699 KB 7918.53 KB/s Written 1700 KB 7922.08 KB/s Written 1701 KB 7925.64 KB/s Written 1702 KB 7929.19 KB/s Written 1703 KB 7932.37 KB/s Written 1704 KB 7935.92 KB/s Written 1705 KB 7939.46 KB/s Written 1706 KB 7943.01 KB/s Written 1707 KB 7946.56 KB/s Written 1708 KB 7950.10 KB/s Written 1709 KB 7953.65 KB/s Written 1710 KB 7957.19 KB/s Written 1711 KB 7960.36 KB/s Written 1712 KB 7963.90 KB/s Written 1713 KB 7967.44 KB/s Written 1714 KB 7965.05 KB/s Written 1715 KB 7963.41 KB/s Written 1716 KB 7964.36 KB/s Written 1717 KB 7967.15 KB/s Written 1718 KB 7970.68 KB/s Written 1719 KB 7974.21 KB/s Written 1720 KB 7977.74 KB/s Written 1721 KB 7980.89 KB/s Written 1722 KB 7984.42 KB/s Written 1723 KB 7987.95 KB/s Written 1724 KB 7991.47 KB/s Written 1725 KB 7994.99 KB/s Written 1726 KB 7998.52 KB/s Written 1727 KB 8002.04 KB/s Written 1728 KB 8005.56 KB/s Written 1729 KB 8008.71 KB/s Written 1730 KB 8012.23 KB/s Written 1731 KB 8015.74 KB/s Written 1732 KB 8013.70 KB/s Written 1733 KB 8012.39 KB/s Written 1734 KB 8013.31 KB/s Written 1735 KB 8016.08 KB/s Written 1736 KB 8019.59 KB/s Written 1737 KB 8023.09 KB/s Written 1738 KB 8026.23 KB/s Written 1739 KB 8029.74 KB/s Written 1740 KB 8033.24 KB/s Written 1741 KB 8036.74 KB/s Written 1742 KB 8040.25 KB/s Written 1743 KB 8043.75 KB/s Written 1744 KB 8047.25 KB/s Written 1745 KB 8050.75 KB/s Written 1746 KB 8053.88 KB/s Written 1747 KB 8057.37 KB/s Written 1748 KB 8060.87 KB/s Written 1749 KB 8064.37 KB/s Written 1750 KB 8061.54 KB/s Written 1751 KB 8060.21 KB/s Written 1752 KB 8061.10 KB/s Written 1753 KB 8063.85 KB/s Written 1754 KB 8067.34 KB/s Written 1755 KB 8070.82 KB/s Written 1756 KB 8073.93 KB/s Written 1757 KB 8077.42 KB/s Written 1758 KB 8080.90 KB/s Written 1759 KB 8084.38 KB/s Written 1760 KB 8087.49 KB/s Written 1761 KB 8090.97 KB/s Written 1762 KB 8094.45 KB/s Written 1763 KB 8097.93 KB/s Written 1764 KB 8101.41 KB/s Written 1765 KB 8104.51 KB/s Written 1766 KB 8107.98 KB/s Written 1767 KB 8111.46 KB/s Written 1768 KB 8107.49 KB/s Written 1769 KB 8106.13 KB/s Written 1770 KB 8106.99 KB/s Written 1771 KB 8109.35 KB/s Written 1772 KB 8112.81 KB/s Written 1773 KB 8116.27 KB/s Written 1774 KB 8119.74 KB/s Written 1775 KB 8123.20 KB/s Written 1776 KB 8126.29 KB/s Written 1777 KB 8129.75 KB/s Written 1778 KB 8133.21 KB/s Written 1779 KB 8136.66 KB/s Written 1780 KB 8140.12 KB/s Written 1781 KB 8143.58 KB/s Written 1782 KB 8147.03 KB/s Written 1783 KB 8150.11 KB/s Written 1784 KB 8153.56 KB/s Written 1785 KB 8157.02 KB/s Written 1786 KB 8154.51 KB/s Written 1787 KB 8153.12 KB/s Written 1788 KB 8153.96 KB/s Written 1789 KB 8156.29 KB/s Written 1790 KB 8159.73 KB/s Written 1791 KB 8163.17 KB/s Written 1792 KB 8166.61 KB/s Written 1793 KB 8170.05 KB/s Written 1794 KB 8173.12 KB/s Written 1795 KB 8176.56 KB/s Written 1796 KB 8180.00 KB/s Written 1797 KB 8183.43 KB/s Written 1798 KB 8186.87 KB/s Written 1799 KB 8189.93 KB/s Written 1800 KB 8193.36 KB/s Written 1801 KB 8196.80 KB/s Written 1802 KB 8200.23 KB/s Written 1803 KB 8203.66 KB/s Written 1804 KB 8201.12 KB/s Written 1805 KB 8199.70 KB/s Written 1806 KB 8200.89 KB/s Written 1807 KB 8203.57 KB/s Written 1808 KB 8206.62 KB/s Written 1809 KB 8210.04 KB/s Written 1810 KB 8204.15 KB/s Written 1811 KB 8206.82 KB/s Written 1812 KB 8210.24 KB/s Written 1813 KB 8193.24 KB/s Written 1814 KB 8194.80 KB/s Written 1815 KB 8197.83 KB/s Written 1816 KB 8201.24 KB/s Written 1817 KB 8204.64 KB/s Written 1818 KB 8208.05 KB/s Written 1819 KB 8211.45 KB/s Written 1820 KB 8214.85 KB/s Written 1821 KB 8217.88 KB/s Written 1822 KB 8213.50 KB/s Written 1823 KB 8212.08 KB/s Written 1824 KB 8212.52 KB/s Written 1825 KB 8215.17 KB/s Written 1826 KB 8218.56 KB/s Written 1827 KB 8221.58 KB/s Written 1828 KB 8224.97 KB/s Written 1829 KB 8228.36 KB/s Written 1830 KB 8231.75 KB/s Written 1831 KB 8234.77 KB/s Written 1832 KB 8238.15 KB/s Written 1833 KB 8241.54 KB/s Written 1834 KB 8244.92 KB/s Written 1835 KB 8248.30 KB/s Written 1836 KB 8251.69 KB/s Written 1837 KB 8254.70 KB/s Written 1838 KB 8258.08 KB/s Written 1839 KB 8261.46 KB/s Written 1840 KB 8259.27 KB/s Written 1841 KB 8257.46 KB/s Written 1842 KB 8258.24 KB/s Written 1843 KB 8260.87 KB/s Written 1844 KB 8264.24 KB/s Written 1845 KB 8267.61 KB/s Written 1846 KB 8270.98 KB/s Written 1847 KB 8273.98 KB/s Written 1848 KB 8277.34 KB/s Written 1849 KB 8280.71 KB/s Written 1850 KB 8284.08 KB/s Written 1851 KB 8287.44 KB/s Written 1852 KB 8290.80 KB/s Written 1853 KB 8293.80 KB/s Written 1854 KB 8297.16 KB/s Written 1855 KB 8300.52 KB/s Written 1856 KB 8303.88 KB/s Written 1857 KB 8307.24 KB/s Written 1858 KB 8304.65 KB/s Written 1859 KB 8302.81 KB/s Written 1860 KB 8303.57 KB/s Written 1861 KB 8306.18 KB/s Written 1862 KB 8309.16 KB/s Written 1863 KB 8312.51 KB/s Written 1864 KB 8315.86 KB/s Written 1865 KB 8319.21 KB/s Written 1866 KB 8322.55 KB/s Written 1867 KB 8325.53 KB/s Written 1868 KB 8328.87 KB/s Written 1869 KB 8332.22 KB/s Written 1870 KB 8335.56 KB/s Written 1871 KB 8338.90 KB/s Written 1872 KB 8342.25 KB/s Written 1873 KB 8345.59 KB/s Written 1874 KB 8348.55 KB/s Written 1875 KB 8351.89 KB/s Written 1876 KB 8349.65 KB/s Written 1877 KB 8348.16 KB/s Written 1878 KB 8348.89 KB/s Written 1879 KB 8350.00 KB/s Written 1880 KB 8352.96 KB/s Written 1881 KB 8356.29 KB/s Written 1882 KB 8359.61 KB/s Written 1883 KB 8362.94 KB/s Written 1884 KB 8366.27 KB/s Written 1885 KB 8369.22 KB/s Written 1886 KB 8372.55 KB/s Written 1887 KB 8375.87 KB/s Written 1888 KB 8379.19 KB/s Written 1889 KB 8382.52 KB/s Written 1890 KB 8385.47 KB/s Written 1891 KB 8388.79 KB/s Written 1892 KB 8392.10 KB/s Written 1893 KB 8395.42 KB/s Written 1894 KB 8392.41 KB/s Written 1895 KB 8390.52 KB/s Written 1896 KB 8391.24 KB/s Written 1897 KB 8393.81 KB/s Written 1898 KB 8396.74 KB/s Written 1899 KB 8400.05 KB/s Written 1900 KB 8403.36 KB/s Written 1901 KB 8406.67 KB/s Written 1902 KB 8409.60 KB/s Written 1903 KB 8412.91 KB/s Written 1904 KB 8416.21 KB/s Written 1905 KB 8419.52 KB/s Written 1906 KB 8422.82 KB/s Written 1907 KB 8426.12 KB/s Written 1908 KB 8429.42 KB/s Written 1909 KB 8432.35 KB/s Written 1910 KB 8435.65 KB/s Written 1911 KB 8438.95 KB/s Written 1912 KB 8435.91 KB/s Written 1913 KB 8434.37 KB/s Written 1914 KB 8435.06 KB/s Written 1915 KB 8437.61 KB/s Written 1916 KB 8440.90 KB/s Written 1917 KB 8444.19 KB/s Written 1918 KB 8447.48 KB/s Written 1919 KB 8450.77 KB/s Written 1920 KB 8453.68 KB/s Written 1921 KB 8456.97 KB/s Written 1922 KB 8460.25 KB/s Written 1923 KB 8463.54 KB/s Written 1924 KB 8466.45 KB/s Written 1925 KB 8469.73 KB/s Written 1926 KB 8473.01 KB/s Written 1927 KB 8476.29 KB/s Written 1928 KB 8479.57 KB/s Written 1929 KB 8482.85 KB/s Written 1930 KB 8480.16 KB/s Written 1931 KB 8478.22 KB/s Written 1932 KB 8478.89 KB/s Written 1933 KB 8481.42 KB/s Written 1934 KB 8484.69 KB/s Written 1935 KB 8487.96 KB/s Written 1936 KB 8491.23 KB/s Written 1937 KB 8494.12 KB/s Written 1938 KB 8497.39 KB/s Written 1939 KB 8500.66 KB/s Written 1940 KB 8503.92 KB/s Written 1941 KB 8507.19 KB/s Written 1942 KB 8510.08 KB/s Written 1943 KB 8513.34 KB/s Written 1944 KB 8516.60 KB/s Written 1945 KB 8519.87 KB/s Written 1946 KB 8523.13 KB/s Written 1947 KB 8526.01 KB/s Written 1948 KB 8523.30 KB/s Written 1949 KB 8521.71 KB/s Written 1950 KB 8522.35 KB/s Written 1951 KB 8524.86 KB/s Written 1952 KB 8527.74 KB/s Written 1953 KB 8530.99 KB/s Written 1954 KB 8534.24 KB/s Written 1955 KB 8537.49 KB/s Written 1956 KB 8540.37 KB/s Written 1957 KB 8543.61 KB/s Written 1958 KB 8546.86 KB/s Written 1959 KB 8550.10 KB/s Written 1960 KB 8553.35 KB/s Written 1961 KB 8556.59 KB/s Written 1962 KB 8559.84 KB/s Written 1963 KB 8562.70 KB/s Written 1964 KB 8565.95 KB/s Written 1965 KB 8569.19 KB/s Written 1966 KB 8566.82 KB/s Written 1967 KB 8564.83 KB/s Written 1968 KB 8565.46 KB/s Written 1969 KB 8567.95 KB/s Written 1970 KB 8571.18 KB/s Written 1971 KB 8574.41 KB/s Written 1972 KB 8577.27 KB/s Written 1973 KB 8580.50 KB/s Written 1974 KB 8583.73 KB/s Written 1975 KB 8586.96 KB/s Written 1976 KB 8590.18 KB/s Written 1977 KB 8593.04 KB/s Written 1978 KB 8596.26 KB/s Written 1979 KB 8599.49 KB/s Written 1980 KB 8602.71 KB/s Written 1981 KB 8605.93 KB/s Written 1982 KB 8609.16 KB/s Written 1983 KB 8612.00 KB/s Written 1984 KB 8609.24 KB/s Written 1985 KB 8607.61 KB/s Written 1986 KB 8608.21 KB/s Written 1987 KB 8570.57 KB/s Written 1988 KB 8573.03 KB/s Written 1989 KB 8576.23 KB/s Written 1990 KB 8577.59 KB/s Written 1991 KB 8580.42 KB/s Written 1992 KB 8582.88 KB/s Written 1993 KB 8586.08 KB/s Written 1994 KB 8581.88 KB/s Written 1995 KB 8584.34 KB/s Written 1996 KB 8572.41 KB/s Written 1997 KB 8575.23 KB/s Written 1998 KB 8578.42 KB/s Written 1999 KB 8581.61 KB/s Written 2000 KB 8584.80 KB/s Written 2001 KB 8587.61 KB/s Written 2002 KB 8582.70 KB/s Written 2003 KB 8581.10 KB/s Written 2004 KB 8581.71 KB/s Written 2005 KB 8584.15 KB/s Written 2006 KB 8586.96 KB/s Written 2007 KB 8590.14 KB/s Written 2008 KB 8593.32 KB/s Written 2009 KB 8596.12 KB/s Written 2010 KB 8599.30 KB/s Written 2011 KB 8602.47 KB/s Written 2012 KB 8605.65 KB/s Written 2013 KB 8608.82 KB/s Written 2014 KB 8611.99 KB/s Written 2015 KB 8615.16 KB/s Written 2016 KB 8617.96 KB/s Written 2017 KB 8621.13 KB/s Written 2018 KB 8624.30 KB/s Written 2019 KB 8627.47 KB/s Written 2020 KB 8624.74 KB/s Written 2021 KB 8623.12 KB/s Written 2022 KB 8623.70 KB/s Written 2023 KB 8626.13 KB/s Written 2024 KB 8629.29 KB/s Written 2025 KB 8632.45 KB/s Written 2026 KB 8635.24 KB/s Written 2027 KB 8638.40 KB/s Written 2028 KB 8641.55 KB/s Written 2029 KB 8644.71 KB/s Written 2030 KB 8647.50 KB/s Written 2031 KB 8650.65 KB/s Written 2032 KB 8653.81 KB/s Written 2033 KB 8656.96 KB/s Written 2034 KB 8660.11 KB/s Written 2035 KB 8663.26 KB/s Written 2036 KB 8666.41 KB/s Written 2037 KB 8669.19 KB/s Written 2038 KB 8666.44 KB/s Written 2039 KB 8664.80 KB/s Written 2040 KB 8665.36 KB/s Written 2041 KB 8667.77 KB/s Written 2042 KB 8670.91 KB/s Written 2043 KB 8674.05 KB/s Written 2044 KB 8676.83 KB/s Written 2045 KB 8679.97 KB/s Written 2046 KB 8683.10 KB/s Written 2047 KB 8686.24 KB/s Written 2048 KB 8689.38 KB/s Written 2049 KB 8692.52 KB/s Written 2050 KB 8695.28 KB/s Written 2051 KB 8698.42 KB/s Written 2052 KB 8701.55 KB/s Written 2053 KB 8704.69 KB/s Written 2054 KB 8707.82 KB/s Written 2055 KB 8710.95 KB/s Written 2056 KB 8708.17 KB/s Written 2057 KB 8706.51 KB/s Written 2058 KB 8707.06 KB/s Written 2059 KB 8709.45 KB/s Written 2060 KB 8712.20 KB/s Written 2061 KB 8715.32 KB/s Written 2062 KB 8718.45 KB/s Written 2063 KB 8721.57 KB/s Written 2064 KB 8724.69 KB/s Written 2065 KB 8727.44 KB/s Written 2066 KB 8730.56 KB/s Written 2067 KB 8733.68 KB/s Written 2068 KB 8736.80 KB/s Written 2069 KB 8739.91 KB/s Written 2070 KB 8742.66 KB/s Written 2071 KB 8745.78 KB/s Written 2072 KB 8748.89 KB/s Written 2073 KB 8752.01 KB/s Written 2074 KB 8749.21 KB/s Written 2075 KB 8747.52 KB/s Written 2076 KB 8748.05 KB/s Written 2077 KB 8750.05 KB/s Written 2078 KB 8753.16 KB/s Written 2079 KB 8756.27 KB/s Written 2080 KB 8759.37 KB/s Written 2081 KB 8762.47 KB/s Written 2082 KB 8765.21 KB/s Written 2083 KB 8768.31 KB/s Written 2084 KB 8771.41 KB/s Written 2085 KB 8774.51 KB/s Written 2086 KB 8777.61 KB/s Written 2087 KB 8780.71 KB/s Written 2088 KB 8783.44 KB/s Written 2089 KB 8786.54 KB/s Written 2090 KB 8789.64 KB/s Written 2091 KB 8792.73 KB/s Written 2092 KB 8789.92 KB/s Written 2093 KB 8788.21 KB/s Written 2094 KB 8788.72 KB/s Written 2095 KB 8791.07 KB/s Written 2096 KB 8793.79 KB/s Written 2097 KB 8796.88 KB/s Written 2098 KB 8799.97 KB/s Written 2099 KB 8803.05 KB/s Written 2100 KB 8805.77 KB/s Written 2101 KB 8807.75 KB/s Written 2102 KB 8810.46 KB/s Written 2103 KB 8813.55 KB/s Written 2104 KB 8816.26 KB/s Written 2105 KB 8819.34 KB/s Written 2106 KB 8822.42 KB/s Written 2107 KB 8825.50 KB/s Written 2108 KB 8828.58 KB/s Written 2109 KB 8831.66 KB/s Written 2110 KB 8828.08 KB/s Written 2111 KB 8825.99 KB/s Written 2112 KB 8826.48 KB/s Written 2113 KB 8828.81 KB/s Written 2114 KB 8831.89 KB/s Written 2115 KB 8834.96 KB/s Written 2116 KB 8837.66 KB/s Written 2117 KB 8840.72 KB/s Written 2118 KB 8843.79 KB/s Written 2119 KB 8846.86 KB/s Written 2120 KB 8849.93 KB/s Written 2121 KB 8852.99 KB/s Written 2122 KB 8855.69 KB/s Written 2123 KB 8858.75 KB/s Written 2124 KB 8861.82 KB/s Written 2125 KB 8864.88 KB/s Written 2126 KB 8867.94 KB/s Written 2127 KB 8871.00 KB/s Written 2128 KB 8867.78 KB/s Written 2129 KB 8866.40 KB/s Written 2130 KB 8866.87 KB/s Written 2131 KB 8868.82 KB/s Written 2132 KB 8871.87 KB/s Written 2133 KB 8874.93 KB/s Written 2134 KB 8877.98 KB/s Written 2135 KB 8880.66 KB/s Written 2136 KB 8883.71 KB/s Written 2137 KB 8886.76 KB/s Written 2138 KB 8889.81 KB/s Written 2139 KB 8892.86 KB/s Written 2140 KB 8895.54 KB/s Written 2141 KB 8898.59 KB/s Written 2142 KB 8901.63 KB/s Written 2143 KB 8904.68 KB/s Written 2144 KB 8907.72 KB/s Written 2145 KB 8910.77 KB/s Written 2146 KB 8882.45 KB/s Written 2147 KB 8880.34 KB/s Written 2148 KB 8881.17 KB/s Written 2149 KB 8883.10 KB/s Written 2150 KB 8886.13 KB/s Written 2151 KB 8889.16 KB/s Written 2152 KB 8891.83 KB/s Written 2153 KB 8894.86 KB/s Written 2154 KB 8897.88 KB/s Written 2155 KB 8900.55 KB/s Written 2156 KB 8903.57 KB/s Written 2157 KB 8906.60 KB/s Written 2158 KB 8909.62 KB/s Written 2159 KB 8912.65 KB/s Written 2160 KB 8915.67 KB/s Written 2161 KB 8918.70 KB/s Written 2162 KB 8921.35 KB/s Written 2163 KB 8924.37 KB/s Written 2164 KB 8921.50 KB/s Written 2165 KB 8919.74 KB/s Written 2166 KB 8920.19 KB/s Written 2167 KB 8922.47 KB/s Written 2168 KB 8925.12 KB/s Written 2169 KB 8928.13 KB/s Written 2170 KB 8931.14 KB/s Written 2171 KB 8934.16 KB/s Written 2172 KB 8936.80 KB/s Written 2173 KB 8939.81 KB/s Written 2174 KB 8942.82 KB/s Written 2175 KB 8945.83 KB/s Written 2176 KB 8948.84 KB/s Written 2177 KB 8951.85 KB/s Written 2178 KB 8954.86 KB/s Written 2179 KB 8957.49 KB/s Written 2180 KB 8960.50 KB/s Written 2181 KB 8963.50 KB/s Written 2182 KB 8960.25 KB/s Written 2183 KB 8958.47 KB/s Written 2184 KB 8958.90 KB/s Written 2185 KB 8961.16 KB/s Written 2186 KB 8964.16 KB/s Written 2187 KB 8967.16 KB/s Written 2188 KB 8969.79 KB/s Written 2189 KB 8972.78 KB/s Written 2190 KB 8975.78 KB/s Written 2191 KB 8978.77 KB/s Written 2192 KB 8981.77 KB/s Written 2193 KB 8984.39 KB/s Written 2194 KB 8987.38 KB/s Written 2195 KB 8990.37 KB/s Written 2196 KB 8993.37 KB/s Written 2197 KB 8996.36 KB/s Written 2198 KB 8999.34 KB/s Written 2199 KB 9002.33 KB/s Written 2200 KB 8999.06 KB/s Written 2201 KB 8997.26 KB/s Written 2202 KB 8997.67 KB/s Written 2203 KB 8999.92 KB/s Written 2204 KB 9002.90 KB/s Written 2205 KB 9005.88 KB/s Written 2206 KB 9008.86 KB/s Written 2207 KB 9011.47 KB/s Written 2208 KB 9014.45 KB/s Written 2209 KB 9017.43 KB/s Written 2210 KB 9020.41 KB/s Written 2211 KB 9021.91 KB/s Written 2212 KB 9024.52 KB/s Written 2213 KB 9027.49 KB/s Written 2214 KB 9030.47 KB/s Written 2215 KB 9033.44 KB/s Written 2216 KB 9036.41 KB/s Written 2217 KB 9039.02 KB/s Written 2218 KB 9035.73 KB/s Written 2219 KB 9033.55 KB/s Written 2220 KB 9033.94 KB/s Written 2221 KB 9036.17 KB/s Written 2222 KB 9039.13 KB/s Written 2223 KB 9042.10 KB/s Written 2224 KB 9044.69 KB/s Written 2225 KB 9047.66 KB/s Written 2226 KB 9050.62 KB/s Written 2227 KB 9053.58 KB/s Written 2228 KB 9056.54 KB/s Written 2229 KB 9059.13 KB/s Written 2230 KB 9062.09 KB/s Written 2231 KB 9065.05 KB/s Written 2232 KB 9068.01 KB/s Written 2233 KB 9070.97 KB/s Written 2234 KB 9073.92 KB/s Written 2235 KB 9076.88 KB/s Written 2236 KB 9073.57 KB/s Written 2237 KB 9071.74 KB/s Written 2238 KB 9072.11 KB/s Written 2239 KB 9074.33 KB/s Written 2240 KB 9077.28 KB/s Written 2241 KB 9080.23 KB/s Written 2242 KB 9082.81 KB/s Written 2243 KB 9085.75 KB/s Written 2244 KB 9088.70 KB/s Written 2245 KB 9091.65 KB/s Written 2246 KB 9094.59 KB/s Written 2247 KB 9097.17 KB/s Written 2248 KB 9100.11 KB/s Written 2249 KB 9103.05 KB/s Written 2250 KB 9105.99 KB/s Written 2251 KB 9108.93 KB/s Written 2252 KB 9111.88 KB/s Written 2253 KB 9114.82 KB/s Written 2254 KB 9111.49 KB/s Written 2255 KB 9109.64 KB/s Written 2256 KB 9110.00 KB/s Written 2257 KB 9112.20 KB/s Written 2258 KB 9114.76 KB/s Written 2259 KB 9117.69 KB/s Written 2260 KB 9120.63 KB/s Written 2261 KB 9123.19 KB/s Written 2262 KB 9126.12 KB/s Written 2263 KB 9129.05 KB/s Written 2264 KB 9131.98 KB/s Written 2265 KB 9134.91 KB/s Written 2266 KB 9137.83 KB/s Written 2267 KB 9140.76 KB/s Written 2268 KB 9143.32 KB/s Written 2269 KB 9146.24 KB/s Written 2270 KB 9149.17 KB/s Written 2271 KB 9152.09 KB/s Written 2272 KB 9149.12 KB/s Written 2273 KB 9147.25 KB/s Written 2274 KB 9147.59 KB/s Written 2275 KB 9149.77 KB/s Written 2276 KB 9152.69 KB/s Written 2277 KB 9155.61 KB/s Written 2278 KB 9158.16 KB/s Written 2279 KB 9161.07 KB/s Written 2280 KB 9163.99 KB/s Written 2281 KB 9166.90 KB/s Written 2282 KB 9169.45 KB/s Written 2283 KB 9172.36 KB/s Written 2284 KB 9175.27 KB/s Written 2285 KB 9178.18 KB/s Written 2286 KB 9181.09 KB/s Written 2287 KB 9184.00 KB/s Written 2288 KB 9186.91 KB/s Written 2289 KB 9189.82 KB/s Written 2290 KB 9186.46 KB/s Written 2291 KB 9184.57 KB/s Written 2292 KB 9184.90 KB/s Written 2293 KB 9186.70 KB/s Written 2294 KB 9189.60 KB/s Written 2295 KB 9192.50 KB/s Written 2296 KB 9195.40 KB/s Written 2297 KB 9198.30 KB/s Written 2298 KB 9201.20 KB/s Written 2299 KB 9204.10 KB/s Written 2300 KB 9206.63 KB/s Written 2301 KB 9209.53 KB/s Written 2302 KB 9212.42 KB/s Written 2303 KB 9215.32 KB/s Written 2304 KB 9218.21 KB/s Written 2305 KB 9221.11 KB/s Written 2306 KB 9224.00 KB/s Written 2307 KB 9226.89 KB/s Written 2308 KB 9223.51 KB/s Written 2309 KB 9221.61 KB/s Written 2310 KB 9221.93 KB/s Written 2311 KB 9224.08 KB/s Written 2312 KB 9226.96 KB/s Written 2313 KB 9229.85 KB/s Written 2314 KB 9232.37 KB/s Written 2315 KB 9235.25 KB/s Written 2316 KB 9238.13 KB/s Written 2317 KB 9231.81 KB/s Written 2318 KB 9233.22 KB/s Written 2319 KB 9236.10 KB/s Written 2320 KB 9238.98 KB/s Written 2321 KB 9241.49 KB/s Written 2322 KB 9243.26 KB/s Written 2323 KB 9245.77 KB/s Written 2324 KB 9248.28 KB/s Written 2325 KB 9251.15 KB/s Written 2326 KB 9246.67 KB/s Written 2327 KB 9244.77 KB/s Written 2328 KB 9244.70 KB/s Written 2329 KB 9246.83 KB/s Written 2330 KB 9249.70 KB/s Written 2331 KB 9252.57 KB/s Written 2332 KB 9255.07 KB/s Written 2333 KB 9257.94 KB/s Written 2334 KB 9260.80 KB/s Written 2335 KB 9263.67 KB/s Written 2336 KB 9266.16 KB/s Written 2337 KB 9269.03 KB/s Written 2338 KB 9271.89 KB/s Written 2339 KB 9274.75 KB/s Written 2340 KB 9277.61 KB/s Written 2341 KB 9280.48 KB/s Written 2342 KB 9283.34 KB/s Written 2343 KB 9285.83 KB/s Written 2344 KB 9282.80 KB/s Written 2345 KB 9280.88 KB/s Written 2346 KB 9281.16 KB/s Written 2347 KB 9283.28 KB/s Written 2348 KB 9286.14 KB/s Written 2349 KB 9288.99 KB/s Written 2350 KB 9291.48 KB/s Written 2351 KB 9294.33 KB/s Written 2352 KB 9297.18 KB/s Written 2353 KB 9300.03 KB/s Written 2354 KB 9302.51 KB/s Written 2355 KB 9305.36 KB/s Written 2356 KB 9308.21 KB/s Written 2357 KB 9311.05 KB/s Written 2358 KB 9313.90 KB/s Written 2359 KB 9316.75 KB/s Written 2360 KB 9319.59 KB/s Written 2361 KB 9322.44 KB/s Written 2362 KB 9319.39 KB/s Written 2363 KB 9317.09 KB/s Written 2364 KB 9317.36 KB/s Written 2365 KB 9319.46 KB/s Written 2366 KB 9322.30 KB/s Written 2367 KB 9324.77 KB/s Written 2368 KB 9327.61 KB/s Written 2369 KB 9330.45 KB/s Written 2370 KB 9333.28 KB/s Written 2371 KB 9336.12 KB/s Written 2372 KB 9338.58 KB/s Written 2373 KB 9341.42 KB/s Written 2374 KB 9344.25 KB/s Written 2375 KB 9347.08 KB/s Written 2376 KB 9349.91 KB/s Written 2377 KB 9352.74 KB/s Written 2378 KB 9355.57 KB/s Written 2379 KB 9358.40 KB/s Written 2380 KB 9354.98 KB/s Written 2381 KB 9353.39 KB/s Written 2382 KB 9353.65 KB/s Written 2383 KB 9355.37 KB/s Written 2384 KB 9358.19 KB/s Written 2385 KB 9361.02 KB/s Written 2386 KB 9363.84 KB/s Written 2387 KB 9366.66 KB/s Written 2388 KB 9369.11 KB/s Written 2389 KB 9371.94 KB/s Written 2390 KB 9374.75 KB/s Written 2391 KB 9377.57 KB/s Written 2392 KB 9380.02 KB/s Written 2393 KB 9382.84 KB/s Written 2394 KB 9385.66 KB/s Written 2395 KB 9388.48 KB/s Written 2396 KB 9391.29 KB/s Written 2397 KB 9394.11 KB/s Written 2398 KB 9391.03 KB/s Written 2399 KB 9389.07 KB/s Written 2400 KB 9389.30 KB/s Written 2401 KB 9391.01 KB/s Written 2402 KB 9393.82 KB/s Written 2403 KB 9396.63 KB/s Written 2404 KB 9399.44 KB/s Written 2405 KB 9402.24 KB/s Written 2406 KB 9404.68 KB/s Written 2407 KB 9407.49 KB/s Written 2408 KB 9410.29 KB/s Written 2409 KB 9413.10 KB/s Written 2410 KB 9415.90 KB/s Written 2411 KB 9418.70 KB/s Written 2412 KB 9421.51 KB/s Written 2413 KB 9423.94 KB/s Written 2414 KB 9426.74 KB/s Written 2415 KB 9429.54 KB/s Written 2416 KB 9426.45 KB/s Written 2417 KB 9424.47 KB/s Written 2418 KB 9424.70 KB/s Written 2419 KB 9426.39 KB/s Written 2420 KB 9429.18 KB/s Written 2421 KB 9431.98 KB/s Written 2422 KB 9434.77 KB/s Written 2423 KB 9437.20 KB/s Written 2424 KB 9439.99 KB/s Written 2425 KB 9442.78 KB/s Written 2426 KB 9445.57 KB/s Written 2427 KB 9448.36 KB/s Written 2428 KB 9450.78 KB/s Written 2429 KB 9453.57 KB/s Written 2430 KB 9456.36 KB/s Written 2431 KB 9459.14 KB/s Written 2432 KB 9461.93 KB/s Written 2433 KB 9463.24 KB/s Written 2434 KB 9459.41 KB/s Written 2435 KB 9457.41 KB/s Written 2436 KB 9457.62 KB/s Written 2437 KB 9459.67 KB/s Written 2438 KB 9462.08 KB/s Written 2439 KB 9464.86 KB/s Written 2440 KB 9467.64 KB/s Written 2441 KB 9470.42 KB/s Written 2442 KB 9472.83 KB/s Written 2443 KB 9475.60 KB/s Written 2444 KB 9478.38 KB/s Written 2445 KB 9481.15 KB/s Written 2446 KB 9483.93 KB/s Written 2447 KB 9486.70 KB/s Written 2448 KB 9489.48 KB/s Written 2449 KB 9491.88 KB/s Written 2450 KB 9494.65 KB/s Written 2451 KB 9497.42 KB/s Written 2452 KB 9494.31 KB/s Written 2453 KB 9492.30 KB/s Written 2454 KB 9492.50 KB/s Written 2455 KB 9494.16 KB/s Written 2456 KB 9496.93 KB/s Written 2457 KB 9499.69 KB/s Written 2458 KB 9502.45 KB/s Written 2459 KB 9504.85 KB/s Written 2460 KB 9507.61 KB/s Written 2461 KB 9510.38 KB/s Written 2462 KB 9513.14 KB/s Written 2463 KB 9515.90 KB/s Written 2464 KB 9518.29 KB/s Written 2465 KB 9521.05 KB/s Written 2466 KB 9523.81 KB/s Written 2467 KB 9526.57 KB/s Written 2468 KB 9529.33 KB/s Written 2469 KB 9532.08 KB/s Written 2470 KB 9528.95 KB/s Written 2471 KB 9526.93 KB/s Written 2472 KB 9527.11 KB/s Written 2473 KB 9528.76 KB/s Written 2474 KB 9531.51 KB/s Written 2475 KB 9534.27 KB/s Written 2476 KB 9537.02 KB/s Written 2477 KB 9539.40 KB/s Written 2478 KB 9542.15 KB/s Written 2479 KB 9544.89 KB/s Written 2480 KB 9547.64 KB/s Written 2481 KB 9550.39 KB/s Written 2482 KB 9553.13 KB/s Written 2483 KB 9555.88 KB/s Written 2484 KB 9558.63 KB/s Written 2485 KB 9561.00 KB/s Written 2486 KB 9563.75 KB/s Written 2487 KB 9566.49 KB/s Written 2488 KB 9562.98 KB/s Written 2489 KB 9560.94 KB/s Written 2490 KB 9561.11 KB/s Written 2491 KB 9563.11 KB/s Written 2492 KB 9565.85 KB/s Written 2493 KB 9568.59 KB/s Written 2494 KB 9570.96 KB/s Written 2495 KB 9573.69 KB/s Written 2496 KB 9576.43 KB/s Written 2497 KB 9579.16 KB/s Written 2498 KB 9581.89 KB/s Written 2499 KB 9512.75 KB/s Written 2500 KB 9513.30 KB/s Written 2501 KB 9516.02 KB/s Written 2502 KB 9518.37 KB/s Written 2503 KB 9521.09 KB/s Written 2504 KB 9523.81 KB/s Written 2505 KB 9526.53 KB/s Written 2506 KB 9520.91 KB/s Written 2507 KB 9518.93 KB/s Written 2508 KB 9519.11 KB/s Written 2509 KB 9520.74 KB/s Written 2510 KB 9523.45 KB/s Written 2511 KB 9526.16 KB/s Written 2512 KB 9528.51 KB/s Written 2513 KB 9531.21 KB/s Written 2514 KB 9533.92 KB/s Written 2515 KB 9536.27 KB/s Written 2516 KB 9538.97 KB/s Written 2517 KB 9541.68 KB/s Written 2518 KB 9544.39 KB/s Written 2519 KB 9547.09 KB/s Written 2520 KB 9549.80 KB/s Written 2521 KB 9552.14 KB/s Written 2522 KB 9554.84 KB/s Written 2523 KB 9557.54 KB/s Written 2524 KB 9554.09 KB/s Written 2525 KB 9552.09 KB/s Written 2526 KB 9552.26 KB/s Written 2527 KB 9554.24 KB/s Written 2528 KB 9556.93 KB/s Written 2529 KB 9559.63 KB/s Written 2530 KB 9561.96 KB/s Written 2531 KB 9564.66 KB/s Written 2532 KB 9567.35 KB/s Written 2533 KB 9570.05 KB/s Written 2534 KB 9572.38 KB/s Written 2535 KB 9575.07 KB/s Written 2536 KB 9577.76 KB/s Written 2537 KB 9580.45 KB/s Written 2538 KB 9583.14 KB/s Written 2539 KB 9585.47 KB/s Written 2540 KB 9588.16 KB/s Written 2541 KB 9590.85 KB/s Written 2542 KB 9587.39 KB/s Written 2543 KB 9583.57 KB/s Written 2544 KB 9583.73 KB/s Written 2545 KB 9585.33 KB/s Written 2546 KB 9588.01 KB/s Written 2547 KB 9590.69 KB/s Written 2548 KB 9593.37 KB/s Written 2549 KB 9596.05 KB/s Written 2550 KB 9598.74 KB/s Written 2551 KB 9601.42 KB/s Written 2552 KB 9603.73 KB/s Written 2553 KB 9606.41 KB/s Written 2554 KB 9609.09 KB/s Written 2555 KB 9611.77 KB/s Written 2556 KB 9614.08 KB/s Written 2557 KB 9616.76 KB/s Written 2558 KB 9619.43 KB/s Written 2559 KB 9622.11 KB/s Written 2560 KB 9619.00 KB/s Written 2561 KB 9616.97 KB/s Written 2562 KB 9617.12 KB/s Written 2563 KB 9619.07 KB/s Written 2564 KB 9621.74 KB/s Written 2565 KB 9624.04 KB/s Written 2566 KB 9626.71 KB/s Written 2567 KB 9629.38 KB/s Written 2568 KB 9632.05 KB/s Written 2569 KB 9634.35 KB/s Written 2570 KB 9637.02 KB/s Written 2571 KB 9639.68 KB/s Written 2572 KB 9642.35 KB/s Written 2573 KB 9645.01 KB/s Written 2574 KB 9647.68 KB/s Written 2575 KB 9649.98 KB/s Written 2576 KB 9652.64 KB/s Written 2577 KB 9655.30 KB/s Written 2578 KB 9651.82 KB/s Written 2579 KB 9649.78 KB/s Written 2580 KB 9649.91 KB/s Written 2581 KB 9651.85 KB/s Written 2582 KB 9654.14 KB/s Written 2583 KB 9656.80 KB/s Written 2584 KB 9659.45 KB/s Written 2585 KB 9662.11 KB/s Written 2586 KB 9664.76 KB/s Written 2587 KB 9667.05 KB/s Written 2588 KB 9669.71 KB/s Written 2589 KB 9672.36 KB/s Written 2590 KB 9675.01 KB/s Written 2591 KB 9677.66 KB/s Written 2592 KB 9680.31 KB/s Written 2593 KB 9682.60 KB/s Written 2594 KB 9685.25 KB/s Written 2595 KB 9687.90 KB/s Written 2596 KB 9685.12 KB/s Written 2597 KB 9683.07 KB/s Written 2598 KB 9683.19 KB/s Written 2599 KB 9685.11 KB/s Written 2600 KB 9687.40 KB/s Written 2601 KB 9690.04 KB/s Written 2602 KB 9692.68 KB/s Written 2603 KB 9695.32 KB/s Written 2604 KB 9697.60 KB/s Written 2605 KB 9700.24 KB/s Written 2606 KB 9702.88 KB/s Written 2607 KB 9705.52 KB/s Written 2608 KB 9708.16 KB/s Written 2609 KB 9710.80 KB/s Written 2610 KB 9713.07 KB/s Written 2611 KB 9715.71 KB/s Written 2612 KB 9718.35 KB/s Written 2613 KB 9720.98 KB/s Written 2614 KB 9717.11 KB/s Written 2615 KB 9715.05 KB/s Written 2616 KB 9715.16 KB/s Written 2617 KB 9717.07 KB/s Written 2618 KB 9719.70 KB/s Written 2619 KB 9721.96 KB/s Written 2620 KB 9724.59 KB/s Written 2621 KB 9727.22 KB/s Written 2622 KB 9729.85 KB/s Written 2623 KB 9732.48 KB/s Written 2624 KB 9734.74 KB/s Written 2625 KB 9737.37 KB/s Written 2626 KB 9739.99 KB/s Written 2627 KB 9742.62 KB/s Written 2628 KB 9745.24 KB/s Written 2629 KB 9747.87 KB/s Written 2630 KB 9750.49 KB/s Written 2631 KB 9752.75 KB/s Written 2632 KB 9749.95 KB/s Written 2633 KB 9747.88 KB/s Written 2634 KB 9747.97 KB/s Written 2635 KB 9749.87 KB/s Written 2636 KB 9752.13 KB/s Written 2637 KB 9754.74 KB/s Written 2638 KB 9757.36 KB/s Written 2639 KB 9759.62 KB/s Written 2640 KB 9762.23 KB/s Written 2641 KB 9764.85 KB/s Written 2642 KB 9767.46 KB/s Written 2643 KB 9770.07 KB/s Written 2644 KB 9772.69 KB/s Written 2645 KB 9774.94 KB/s Written 2646 KB 9777.55 KB/s Written 2647 KB 9780.16 KB/s Written 2648 KB 9782.77 KB/s Written 2649 KB 9785.02 KB/s Written 2650 KB 9770.31 KB/s Written 2651 KB 9767.87 KB/s Written 2652 KB 9767.96 KB/s Written 2653 KB 9769.84 KB/s Written 2654 KB 9771.00 KB/s Written 2655 KB 9773.25 KB/s Written 2656 KB 9775.85 KB/s Written 2657 KB 9778.45 KB/s Written 2658 KB 9780.69 KB/s Written 2659 KB 9783.29 KB/s Written 2660 KB 9785.89 KB/s Written 2661 KB 9788.49 KB/s Written 2662 KB 9791.08 KB/s Written 2663 KB 9793.68 KB/s Written 2664 KB 9795.92 KB/s Written 2665 KB 9798.51 KB/s Written 2666 KB 9801.11 KB/s Written 2667 KB 9803.71 KB/s Written 2668 KB 9800.18 KB/s Written 2669 KB 9797.73 KB/s Written 2670 KB 9797.81 KB/s Written 2671 KB 9799.68 KB/s Written 2672 KB 9801.91 KB/s Written 2673 KB 9804.50 KB/s Written 2674 KB 9807.09 KB/s Written 2675 KB 9809.67 KB/s Written 2676 KB 9811.90 KB/s Written 2677 KB 9814.49 KB/s Written 2678 KB 9817.08 KB/s Written 2679 KB 9819.66 KB/s Written 2680 KB 9822.25 KB/s Written 2681 KB 9824.83 KB/s Written 2682 KB 9827.42 KB/s Written 2683 KB 9829.64 KB/s Written 2684 KB 9832.22 KB/s Written 2685 KB 9834.80 KB/s Written 2686 KB 9831.27 KB/s Written 2687 KB 9829.17 KB/s Written 2688 KB 9829.23 KB/s Written 2689 KB 9831.09 KB/s Written 2690 KB 9833.67 KB/s Written 2691 KB 9836.25 KB/s Written 2692 KB 9838.82 KB/s Written 2693 KB 9841.04 KB/s Written 2694 KB 9843.61 KB/s Written 2695 KB 9846.19 KB/s Written 2696 KB 9848.76 KB/s Written 2697 KB 9851.34 KB/s Written 2698 KB 9853.91 KB/s Written 2699 KB 9856.12 KB/s Written 2700 KB 9858.69 KB/s Written 2701 KB 9861.26 KB/s Written 2702 KB 9863.83 KB/s Written 2703 KB 9866.40 KB/s Written 2704 KB 9863.21 KB/s Written 2705 KB 9861.11 KB/s Written 2706 KB 9861.16 KB/s Written 2707 KB 9863.00 KB/s Written 2708 KB 9865.21 KB/s Written 2709 KB 9867.77 KB/s Written 2710 KB 9870.34 KB/s Written 2711 KB 9872.54 KB/s Written 2712 KB 9875.10 KB/s Written 2713 KB 9877.67 KB/s Written 2714 KB 9880.23 KB/s Written 2715 KB 9882.79 KB/s Written 2716 KB 9885.35 KB/s Written 2717 KB 9887.91 KB/s Written 2718 KB 9890.47 KB/s Written 2719 KB 9892.67 KB/s Written 2720 KB 9895.23 KB/s Written 2721 KB 9897.78 KB/s Written 2722 KB 9894.58 KB/s Written 2723 KB 9892.47 KB/s Written 2724 KB 9892.50 KB/s Written 2725 KB 9893.98 KB/s Written 2726 KB 9896.53 KB/s Written 2727 KB 9899.09 KB/s Written 2728 KB 9901.64 KB/s Written 2729 KB 9903.83 KB/s Written 2730 KB 9906.38 KB/s Written 2731 KB 9908.93 KB/s Written 2732 KB 9911.48 KB/s Written 2733 KB 9914.03 KB/s Written 2734 KB 9916.58 KB/s Written 2735 KB 9919.12 KB/s Written 2736 KB 9921.67 KB/s Written 2737 KB 9924.22 KB/s Written 2738 KB 9926.40 KB/s Written 2739 KB 9928.95 KB/s Written 2740 KB 9925.74 KB/s Written 2741 KB 9923.97 KB/s Written 2742 KB 9924.00 KB/s Written 2743 KB 9925.46 KB/s Written 2744 KB 9928.00 KB/s Written 2745 KB 9930.54 KB/s Written 2746 KB 9932.72 KB/s Written 2747 KB 9935.26 KB/s Written 2748 KB 9937.80 KB/s Written 2749 KB 9940.34 KB/s Written 2750 KB 9942.87 KB/s Written 2751 KB 9945.05 KB/s Written 2752 KB 9947.59 KB/s Written 2753 KB 9950.12 KB/s Written 2754 KB 9952.66 KB/s Written 2755 KB 9955.19 KB/s Written 2756 KB 9957.73 KB/s Written 2757 KB 9960.26 KB/s Written 2758 KB 9957.04 KB/s Written 2759 KB 9954.54 KB/s Written 2760 KB 9954.56 KB/s Written 2761 KB 9956.37 KB/s Written 2762 KB 9958.90 KB/s Written 2763 KB 9961.42 KB/s Written 2764 KB 9963.59 KB/s Written 2765 KB 9965.04 KB/s Written 2766 KB 9967.21 KB/s Written 2767 KB 9969.73 KB/s Written 2768 KB 9972.26 KB/s Written 2769 KB 9974.78 KB/s Written 2770 KB 9976.95 KB/s Written 2771 KB 9979.47 KB/s Written 2772 KB 9981.99 KB/s Written 2773 KB 9984.52 KB/s Written 2774 KB 9986.68 KB/s Written 2775 KB 9989.20 KB/s Written 2776 KB 9985.61 KB/s Written 2777 KB 9983.46 KB/s Written 2778 KB 9983.47 KB/s Written 2779 KB 9985.27 KB/s Written 2780 KB 9987.43 KB/s Written 2781 KB 9989.94 KB/s Written 2782 KB 9992.46 KB/s Written 2783 KB 9994.97 KB/s Written 2784 KB 9997.13 KB/s Written 2785 KB 9999.64 KB/s Written 2786 KB 10002.15 KB/s Written 2787 KB 10004.67 KB/s Written 2788 KB 10007.18 KB/s Written 2789 KB 10009.69 KB/s Written 2790 KB 10012.20 KB/s Written 2791 KB 10014.71 KB/s Written 2792 KB 10017.22 KB/s Written 2793 KB 10019.73 KB/s Written 2794 KB 10016.49 KB/s Written 2795 KB 10013.97 KB/s Written 2796 KB 10013.97 KB/s Written 2797 KB 10015.76 KB/s Written 2798 KB 10018.26 KB/s Written 2799 KB 10020.76 KB/s Written 2800 KB 10023.27 KB/s Written 2801 KB 10025.77 KB/s Written 2802 KB 10028.27 KB/s Written 2803 KB 10030.42 KB/s Written 2804 KB 10032.92 KB/s Written 2805 KB 10035.42 KB/s Written 2806 KB 10037.92 KB/s Written 2807 KB 10040.42 KB/s Written 2808 KB 10042.92 KB/s Written 2809 KB 10045.42 KB/s Written 2810 KB 10047.92 KB/s Written 2811 KB 10050.41 KB/s Written 2812 KB 10047.16 KB/s Written 2813 KB 10044.99 KB/s Written 2814 KB 10044.98 KB/s Written 2815 KB 10046.75 KB/s Written 2816 KB 10049.25 KB/s Written 2817 KB 10051.74 KB/s Written 2818 KB 10053.87 KB/s Written 2819 KB 10056.36 KB/s Written 2820 KB 10058.86 KB/s Written 2821 KB 10061.35 KB/s Written 2822 KB 10063.84 KB/s Written 2823 KB 10066.32 KB/s Written 2824 KB 10068.81 KB/s Written 2825 KB 10071.30 KB/s Written 2826 KB 10073.79 KB/s Written 2827 KB 10076.28 KB/s Written 2828 KB 10078.76 KB/s Written 2829 KB 10081.25 KB/s Written 2830 KB 9970.41 KB/s Written 2831 KB 9967.26 KB/s Written 2832 KB 9967.27 KB/s Written 2833 KB 9968.68 KB/s Written 2834 KB 9971.15 KB/s Written 2835 KB 9973.61 KB/s Written 2836 KB 9976.08 KB/s Written 2837 KB 9978.19 KB/s Written 2838 KB 9980.66 KB/s Written 2839 KB 9983.12 KB/s Written 2840 KB 9985.23 KB/s Written 2841 KB 9987.70 KB/s Written 2842 KB 9990.16 KB/s Written 2843 KB 9992.62 KB/s Written 2844 KB 9995.08 KB/s Written 2845 KB 9997.54 KB/s Written 2846 KB 9999.65 KB/s Written 2847 KB 10002.11 KB/s Written 2848 KB 9998.95 KB/s Written 2849 KB 9996.84 KB/s Written 2850 KB 9996.84 KB/s Written 2851 KB 9998.60 KB/s Written 2852 KB 10000.70 KB/s Written 2853 KB 10003.16 KB/s Written 2854 KB 10005.61 KB/s Written 2855 KB 10008.06 KB/s Written 2856 KB 10010.52 KB/s Written 2857 KB 10012.62 KB/s Written 2858 KB 10015.07 KB/s Written 2859 KB 10017.52 KB/s Written 2860 KB 10019.97 KB/s Written 2861 KB 10022.42 KB/s Written 2862 KB 10024.87 KB/s Written 2863 KB 10027.32 KB/s Written 2864 KB 10029.77 KB/s Written 2865 KB 10032.22 KB/s Written 2866 KB 10028.69 KB/s Written 2867 KB 10026.58 KB/s Written 2868 KB 10026.57 KB/s Written 2869 KB 10028.31 KB/s Written 2870 KB 10030.76 KB/s Written 2871 KB 10033.20 KB/s Written 2872 KB 10035.64 KB/s Written 2873 KB 10038.08 KB/s Written 2874 KB 10038.77 KB/s Written 2875 KB 10040.86 KB/s Written 2876 KB 10043.30 KB/s Written 2877 KB 10045.74 KB/s Written 2878 KB 10048.18 KB/s Written 2879 KB 10050.62 KB/s Written 2880 KB 10053.06 KB/s Written 2881 KB 10055.50 KB/s Written 2882 KB 10057.93 KB/s Written 2883 KB 10060.02 KB/s Written 2884 KB 10056.49 KB/s Written 2885 KB 10054.37 KB/s Written 2886 KB 10054.35 KB/s Written 2887 KB 10056.08 KB/s Written 2888 KB 10058.16 KB/s Written 2889 KB 10060.59 KB/s Written 2890 KB 10063.02 KB/s Written 2891 KB 10065.46 KB/s Written 2892 KB 10067.89 KB/s Written 2893 KB 10069.96 KB/s Written 2894 KB 10072.39 KB/s Written 2895 KB 10074.82 KB/s Written 2896 KB 10077.25 KB/s Written 2897 KB 10079.68 KB/s Written 2898 KB 10082.10 KB/s Written 2899 KB 10084.53 KB/s Written 2900 KB 10086.96 KB/s Written 2901 KB 10089.38 KB/s Written 2902 KB 10086.19 KB/s Written 2903 KB 10084.06 KB/s Written 2904 KB 10084.03 KB/s Written 2905 KB 10085.75 KB/s Written 2906 KB 10087.83 KB/s Written 2907 KB 10090.25 KB/s Written 2908 KB 10092.67 KB/s Written 2909 KB 10095.09 KB/s Written 2910 KB 10097.51 KB/s Written 2911 KB 10099.92 KB/s Written 2912 KB 10102.34 KB/s Written 2913 KB 10104.76 KB/s Written 2914 KB 10107.18 KB/s Written 2915 KB 10109.59 KB/s Written 2916 KB 10112.01 KB/s Written 2917 KB 10114.42 KB/s Written 2918 KB 10116.49 KB/s Written 2919 KB 10118.90 KB/s Written 2920 KB 10116.06 KB/s Written 2921 KB 10113.92 KB/s Written 2922 KB 10113.88 KB/s Written 2923 KB 10115.59 KB/s Written 2924 KB 10118.00 KB/s Written 2925 KB 10120.06 KB/s Written 2926 KB 10122.47 KB/s Written 2927 KB 10124.87 KB/s Written 2928 KB 10127.28 KB/s Written 2929 KB 10129.69 KB/s Written 2930 KB 10132.10 KB/s Written 2931 KB 10134.50 KB/s Written 2932 KB 10136.56 KB/s Written 2933 KB 10138.97 KB/s Written 2934 KB 10141.37 KB/s Written 2935 KB 10143.78 KB/s Written 2936 KB 10146.18 KB/s Written 2937 KB 10148.58 KB/s Written 2938 KB 10145.38 KB/s Written 2939 KB 10143.23 KB/s Written 2940 KB 10143.18 KB/s Written 2941 KB 10144.88 KB/s Written 2942 KB 10147.28 KB/s Written 2943 KB 10149.68 KB/s Written 2944 KB 10151.72 KB/s Written 2945 KB 10154.12 KB/s Written 2946 KB 10156.52 KB/s Written 2947 KB 10158.92 KB/s Written 2948 KB 10161.31 KB/s Written 2949 KB 10163.71 KB/s Written 2950 KB 10166.10 KB/s Written 2951 KB 10168.50 KB/s Written 2952 KB 10170.89 KB/s Written 2953 KB 10173.29 KB/s Written 2954 KB 10175.33 KB/s Written 2955 KB 10177.72 KB/s Written 2956 KB 10174.51 KB/s Written 2957 KB 10172.70 KB/s Written 2958 KB 10155.18 KB/s Written 2959 KB 10155.82 KB/s Written 2960 KB 10158.21 KB/s Written 2961 KB 10160.24 KB/s Written 2962 KB 10162.63 KB/s Written 2963 KB 10165.01 KB/s Written 2964 KB 10167.40 KB/s Written 2965 KB 10169.43 KB/s Written 2966 KB 10171.82 KB/s Written 2967 KB 10174.20 KB/s Written 2968 KB 10176.58 KB/s Written 2969 KB 10178.96 KB/s Written 2970 KB 10181.34 KB/s Written 2971 KB 10183.73 KB/s Written 2972 KB 10186.11 KB/s Written 2973 KB 10188.49 KB/s Written 2974 KB 10184.58 KB/s Written 2975 KB 10182.43 KB/s Written 2976 KB 10182.37 KB/s Written 2977 KB 10184.04 KB/s Written 2978 KB 10186.42 KB/s Written 2979 KB 10188.80 KB/s Written 2980 KB 10190.82 KB/s Written 2981 KB 10193.20 KB/s Written 2982 KB 10194.17 KB/s Written 2983 KB 10196.55 KB/s Written 2984 KB 10198.92 KB/s Written 2985 KB 10200.94 KB/s Written 2986 KB 10203.31 KB/s Written 2987 KB 10205.69 KB/s Written 2988 KB 10208.06 KB/s Written 2989 KB 10210.43 KB/s Written 2990 KB 10212.80 KB/s Written 2991 KB 10215.16 KB/s Written 2992 KB 10211.60 KB/s Written 2993 KB 10209.79 KB/s Written 2994 KB 10209.72 KB/s Written 2995 KB 10211.39 KB/s Written 2996 KB 10213.40 KB/s Written 2997 KB 10215.77 KB/s Written 2998 KB 10218.13 KB/s Written 2999 KB 10220.50 KB/s Written 3000 KB 10222.86 KB/s Written 3000 KB 10222.86 KB/s .---------------. |ccmalloc report| ======================================================= | total # of| allocated | deallocated | garbage | +-----------+-------------+-------------+-------------+ | bytes| 8909 | 4314 | 4595 | +-----------+-------------+-------------+-------------+ |allocations| 115 | 36 | 79 | +-----------------------------------------------------+ | number of checks: 1 | | number of counts: 151 | | retrieving function names for addresses ... done. | | reading file info from gdb ... done. | | sorting by number of not reclaimed bytes ... done. | | number of call chains: 63 | | number of ignored call chains: 0 | | number of reported call chains: 63 | | number of internal call chains: 63 | | number of library call chains: 0 | ======================================================= * 23.9% = 1100 Bytes of garbage allocated in 2 allocations | | 2 allocated (1100 Bytes = 12.3% of total allocated) | @ [ +0x080902f0,+0x0808c0b0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x40009e29 <_dl_new_object> eval.c:41 | | 0x0804c4bb src/wrapper.c:380 | `-----> 0x0804c3cd src/wrapper.c:284 * 21.9% = 1008 Bytes of garbage allocated in 26 allocations | | 26 allocated (1008 Bytes = 11.3% of total allocated) | @ [ +0x080893d8,+0x08089380,+0x080892e8,+0x08089290,+0x080891f8, | | +0x08089160,+0x08089108,+0x08089070,+0x08089018,+0x08088f80, | | +0x08088ef0,+0x08088e98,+0x08088e00,+0x08088d68,+0x08088cd0, | | +0x08088c38,+0x08088be0,+0x08088b50,+0x08088af8,+0x08088aa0, | | +0x08088a08,+0x080889b0,+0x08088918,+0x080888c0,+0x08088828, | | +0x08088608 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e76 <__nss_hosts_lookup> XXX-lookup.c:71 | | 0x40130a0f <__nss_database_lookup> nsswitch.c:104 | | 0x401315d9 nsswitch.c:464 | | 0x40131ae1 nsswitch.c:664 | | 0x401316b2 nsswitch.c:514 | `-----> 0x0804c3cd src/wrapper.c:284 * 11.10% = 550 Bytes of garbage allocated in 1 allocation | | 1 allocated (550 Bytes = 6.2% of total allocated) | @ [ +0x0808a0e8 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x40009e29 <_dl_new_object> eval.c:41 | | 0x0804c4bb src/wrapper.c:380 | `-----> 0x0804c3cd src/wrapper.c:284 * 11.9% = 547 Bytes of garbage allocated in 1 allocation | | 1 allocated (547 Bytes = 6.1% of total allocated) | @ [ +0x08090880 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000b963 <_dl_map_object_deps> eval.c:41 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4000c94a eval.c:41 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x40009e29 <_dl_new_object> eval.c:41 | | 0x0804c4bb src/wrapper.c:380 | `-----> 0x0804c3cd src/wrapper.c:284 | 9.1% = 416 Bytes of garbage allocated in 3 allocations | | 3 allocated (416 Bytes = 4.7% of total allocated) | @ [ +0x08091430,+0x08091370,+0x0808c718 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ef0d dl-open.c:257 | | 0x4000e192 <_dl_check_map_versions> eval.c:41 | | 0x0804c4bb src/wrapper.c:380 | `-----> 0x0804c3cd src/wrapper.c:284 | 5.3% = 242 Bytes of garbage allocated in 15 allocations | | 15 allocated (242 Bytes = 2.7% of total allocated) | @ [ +0x08089340,+0x08089250,+0x080891b8,+0x080890c8,+0x08088fd8, | | +0x08088f48,+0x08088e58,+0x08088dc0,+0x08088d28,+0x08088c90, | | +0x08088ba0,+0x08088a60,+0x08088970,+0x08088880,+0x08088428 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e76 <__nss_hosts_lookup> XXX-lookup.c:71 | | 0x40130a0f <__nss_database_lookup> nsswitch.c:104 | | 0x401315d9 nsswitch.c:464 | | 0x40131abe nsswitch.c:656 | `-----> 0x0804c3cd src/wrapper.c:284 | 2.8% = 128 Bytes of garbage allocated in 1 allocation | | 1 allocated (128 Bytes = 1.4% of total allocated) | @ [ +0x0808ac48 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ef0d dl-open.c:257 | | 0x4000e192 <_dl_check_map_versions> eval.c:41 | | 0x0804c4bb src/wrapper.c:380 | `-----> 0x0804c3cd src/wrapper.c:284 | 1.8% = 84 Bytes of garbage allocated in 3 allocations | | 3 allocated (84 Bytes = 0.9% of total allocated) | @ [ +0x08091748,+0x08091700,+0x080914f0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x4013446e <__gethostbyname2_r> ../nss/getXXbyYY_r.c:200 | | 0x40019304 eval.c:41 | | 0x40198eb9 | | 0x40199238 | | 0x40198b73 | | 0x40199ca6 | `-----> 0x0804c3cd src/wrapper.c:284 | 1.8% = 84 Bytes of garbage allocated in 3 allocations | | 3 allocated (84 Bytes = 0.9% of total allocated) | @ [ +0x08093a30,+0x080939e8,+0x080938c8 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010ced1 ../sysdeps/posix/getaddrinfo.c:516 | | 0x4013446e <__gethostbyname2_r> ../nss/getXXbyYY_r.c:200 | | 0x40019304 eval.c:41 | | 0x40198eb9 | | 0x40199238 | | 0x40198b73 | | 0x40199ca6 | `-----> 0x0804c3cd src/wrapper.c:284 | 1.6% = 72 Bytes of garbage allocated in 2 allocations | | 2 allocated (72 Bytes = 0.8% of total allocated) | @ [ +0x08091320,+0x0808c5a0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000ba72 <_dl_map_object_deps> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 1.0% = 46 Bytes of garbage allocated in 2 allocations | | 2 allocated (46 Bytes = 0.5% of total allocated) | @ [ +0x08090540,+0x0808c430 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x4000a079 <_dl_new_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 1.0% = 46 Bytes of garbage allocated in 2 allocations | | 2 allocated (46 Bytes = 0.5% of total allocated) | @ [ +0x080902a8,+0x0808bf40 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x400073a2 <_dl_map_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.7% = 32 Bytes of garbage allocated in 2 allocations | | 2 allocated (32 Bytes = 0.4% of total allocated) | @ [ +0x080901f8,+0x08089d08 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x40130a6b <__nss_lookup_function> nsswitch.c:280 | | 0x40120826 <__tsearch> tsearch.c:281 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.6% = 28 Bytes of garbage allocated in 1 allocation | | 1 allocated (28 Bytes = 0.3% of total allocated) | @ [ +0x0808a970 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000ba72 <_dl_map_object_deps> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.5% = 24 Bytes of garbage allocated in 2 allocations | | 2 allocated (24 Bytes = 0.3% of total allocated) | @ [ +0x08090270,+0x0808bde0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401314bd <__nss_lookup_function> nsswitch.c:314 | | 0x40131dac nsswitch.c:685 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.5% = 23 Bytes of garbage allocated in 1 allocation | | 1 allocated (23 Bytes = 0.3% of total allocated) | @ [ +0x0808a648 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x4000a079 <_dl_new_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.5% = 23 Bytes of garbage allocated in 1 allocation | | 1 allocated (23 Bytes = 0.3% of total allocated) | @ [ +0x080877f0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014eb72 dl-open.c:217 | | 0x400073a2 <_dl_map_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.5% = 22 Bytes of garbage allocated in 1 allocation | | 1 allocated (22 Bytes = 0.2% of total allocated) | @ [ +0x0808c8f0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x4013446e <__gethostbyname2_r> ../nss/getXXbyYY_r.c:200 | | 0x4018a563 | | 0x4018a223 | | 0x40189d4f | | 0x400be28f <__strdup> strdup.c:43 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.4% = 20 Bytes of garbage allocated in 1 allocation | | 1 allocated (20 Bytes = 0.2% of total allocated) | @ [ +0x08090d88 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000b963 <_dl_map_object_deps> eval.c:41 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4000c94a eval.c:41 | | 0x4000706b <_dl_map_object> eval.c:41 | | 0x40005a98 <_dl_map_object_from_fd> eval.c:41 | | 0x4000a079 <_dl_new_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.4% = 20 Bytes of garbage allocated in 1 allocation | | 1 allocated (20 Bytes = 0.2% of total allocated) | @ [ +0x08090588 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000b963 <_dl_map_object_deps> eval.c:41 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4000c94a eval.c:41 | | 0x400073a2 <_dl_map_object> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.3% = 16 Bytes of garbage allocated in 1 allocation | | 1 allocated (16 Bytes = 0.2% of total allocated) | @ [ +0x080896b0 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x40130a6b <__nss_lookup_function> nsswitch.c:280 | | 0x40120826 <__tsearch> tsearch.c:281 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.3% = 16 Bytes of garbage allocated in 2 allocations | | 2 allocated (16 Bytes = 0.2% of total allocated) | @ [ +0x08090238,+0x08089e70 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x40130aaa <__nss_lookup_function> nsswitch.c:291 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.3% = 12 Bytes of garbage allocated in 1 allocation | | 1 allocated (12 Bytes = 0.1% of total allocated) | @ [ +0x08089a40 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x401314bd <__nss_lookup_function> nsswitch.c:314 | | 0x40131dac nsswitch.c:685 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.3% = 12 Bytes of garbage allocated in 1 allocation | | 1 allocated (12 Bytes = 0.1% of total allocated) | @ [ +0x08091080 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x40134497 <__gethostbyname2_r> ../nss/getXXbyYY_r.c:215 | | 0x40131ce4 <__nss_next> nsswitch.c:194 | | 0x401311a7 <__nss_lookup_function> nsswitch.c:340 | | 0x4014fe16 <__libc_dlopen> dl-libc.c:42 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ff66 dl-libc.c:78 | | 0x4014f03e <_dl_open> dl-open.c:407 | | 0x4000ce25 <_dl_catch_error> eval.c:41 | | 0x4014ec0d dl-open.c:252 | | 0x4000b9dd <_dl_map_object_deps> eval.c:41 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.2% = 8 Bytes of garbage allocated in 1 allocation | | 1 allocated (8 Bytes = 0.1% of total allocated) | @ [ +0x08089890 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e55 <__nss_hosts_lookup> XXX-lookup.c:70 | | 0x40131c34 <__nss_lookup> nsswitch.c:147 | | 0x40130aaa <__nss_lookup_function> nsswitch.c:291 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.2% = 8 Bytes of garbage allocated in 1 allocation | | 1 allocated (8 Bytes = 0.1% of total allocated) | @ [ +0x08088008 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804b8dc
tcpblast.c:641 | | 0x4010dbcc ../sysdeps/posix/getaddrinfo.c:759 | | 0x4010d1cd ../sysdeps/posix/getaddrinfo.c:509 | | 0x401344cd <__gethostbyname2_r> ../nss/getXXbyYY_r.c:168 | | 0x40132e76 <__nss_hosts_lookup> XXX-lookup.c:71 | | 0x40130a0f <__nss_database_lookup> nsswitch.c:104 | | 0x40131554 nsswitch.c:434 | `-----> 0x0804c3cd src/wrapper.c:284 | 0.2% = 8 Bytes of garbage allocated in 1 allocation | | 1 allocated (8 Bytes = 0.1% of total allocated) | @ [ +0x08093c28 ] | | 0x40058306 <__libc_start_main> ../sysdeps/generic/libc-start.c:129 | | 0x0804be3d
tcpblast.c:765 | | 0x08049eef tcpblast.c:237 | `-----> 0x0804c3cd src/wrapper.c:284 `------------------------------------------------------ netdiag-1.2/tcpblast-20011111/docs/connect000066400000000000000000000036101323731111400177670ustar00rootroot0000000000000015:18:44.553640 lo > 127.0.0.1.1067 > 127.0.0.1.60001: S 3438290692:3438290692(0) win 31072 (DF) 15:18:44.553693 lo > 127.0.0.1.60001 > 127.0.0.1.1067: S 3435929232:3435929232(0) ack 3438290693 win 31072 (DF) 15:18:44.553719 lo > 127.0.0.1.1067 > 127.0.0.1.60001: . 1:1(0) ack 1 win 31072 (DF) 15:18:44.562141 lo > 127.0.0.1.60001 > 127.0.0.1.1067: F 1:1(0) ack 1 win 31072 (DF) 15:18:44.562165 lo > 127.0.0.1.1067 > 127.0.0.1.60001: . 1:1(0) ack 2 win 31072 (DF) Connected to 0. Escape character is '^]'. 15:18:44.566179 lo > 127.0.0.1.1067 > 127.0.0.1.60001: F 1:1(0) ack 2 win 31072 (DF) 15:18:44.566230 lo > 127.0.0.1.60001 > 127.0.0.1.1067: . 2:2(0) ack 2 win 31072 (DF) Connection closed by foreign host. 15:22:40.501384 lo > 127.0.0.1.1069 > 127.0.0.1.60001: S 3674654187:3674654187(0) win 31072 (DF) 15:22:40.501434 lo > 127.0.0.1.60001 > 127.0.0.1.1069: S 3674245212:3674245212(0) ack 3674654188 win 31072 (DF) 15:22:40.501459 lo > 127.0.0.1.1069 > 127.0.0.1.60001: . 1:1(0) ack 1 win 31072 (DF) 15:22:40.570243 lo > 127.0.0.1.60001 > 127.0.0.1.1069: F 1:1(0) ack 1 win 31072 (DF) 15:22:40.570268 lo > 127.0.0.1.1069 > 127.0.0.1.60001: . 1:1(0) ack 2 win 31072 (DF) 15:23:00.158350 lo > 127.0.0.1.1069 > 127.0.0.1.60001: F 1:1(0) ack 2 win 31072 (DF) 15:23:00.158466 lo > 127.0.0.1.60001 > 127.0.0.1.1069: . 2:2(0) ack 2 win 31072 (DF) netdiag-1.2/tcpblast-20011111/docs/gpsum000077500000000000000000000002231323731111400174710ustar00rootroot00000000000000#!/bin/sh for i in `seq 1 100`; do ./tcpblast -c 1m -q 0 mv gmon.out gmon.out.$i done gprof -s ./tcpblast gmon.out.* gprof ./tcpblast gmon.sum netdiag-1.2/tcpblast-20011111/docs/orig/000077500000000000000000000000001323731111400173535ustar00rootroot00000000000000netdiag-1.2/tcpblast-20011111/docs/orig/pieters/000077500000000000000000000000001323731111400210265ustar00rootroot00000000000000netdiag-1.2/tcpblast-20011111/docs/orig/pieters/discard.c000066400000000000000000000054541323731111400226130ustar00rootroot00000000000000/* Simple discard service This program can be used as an inetd replacement for performance testing. License 'discard', Simple Discard Service Copyright (C) 1999 Menno Pieters, M&I/STELVIO bv, the Netherlands This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Instructions: To make the executable, simply make do: gcc -o dicard discard.c To use it, just run it as root. Telnet to port 9 to test it. I should connect and NOT respond to anything typed. */ #include #include #include #include #include #include #include #include void discard(int sock) { int max_fd; unsigned long bytes; unsigned long bytes_in; char buf[4096]; for(;;) { if ((bytes = read(sock, buf, sizeof(buf))) <= 0) break; } setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 1, sizeof(SO_REUSEADDR)); setsockopt(sock, SOL_SOCKET, SO_LINGER, 0, sizeof(SO_LINGER)); shutdown(sock, 2); close(sock); return; } void main() { int sock = 0, newsock = 0; struct sockaddr_in sin; struct in_addr listenaddr; int on = 1, aux; if (fork()) exit(0); /* Deamon mode */ sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { fprintf(stderr, "ERR: cannot create socket\n"); exit(1); } memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(inet_addr("0.0.0.0")); sin.sin_port = htons(9); if (bind(sock, (struct sockaddr*) &sin, sizeof(sin)) < 0) { /* helaas */ fprintf(stderr, "ERR: could not bind to socket\n"); shutdown(sock, 2); close(sock); exit(0); } setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 1, sizeof(SO_REUSEADDR)); setsockopt(sock, SOL_SOCKET, SO_LINGER, 0, sizeof(SO_LINGER)); if (listen(sock, 1) < 0) exit(2); for(;;) { aux = sizeof(sin); newsock = accept(sock, (struct sockaddr*)&sin, &aux); if (newsock < 0) { continue; } if (!fork()) { close(stdin); close(stdout); discard(newsock); shutdown(sock, 2); exit(0); } else { int status; (void) wait(&status); close(newsock); } } } netdiag-1.2/tcpblast-20011111/docs/orig/pieters/tcpblast.c000066400000000000000000000157571323731111400230250ustar00rootroot00000000000000/* From FreeBSD: */ /* * tcpblast - test and estimate TCP thruput * * Daniel Karrenberg */ /* * Changes: Rafal Maszkowski * * ftp://ftp.torun.pdi.net/pub/blast/README */ /* * Added time-out: Menno Pieters */ char *verstr="FreeBSD + rzm 961003 + timout/mp"; #include #include #include #include #include #include #include #include #include #include #include #include #include #define DEFBLKSIZE (1024) #define MAXBLKSIZE (32*1024) struct sockaddr_in sock_in; struct servent *sp; struct hostent *host; unsigned long starts, startms, stops, stopms, expms; struct timeval ti; struct timezone tiz; char greet[MAXBLKSIZE], *ind; int nblocks, f; int tcp=0, udp=0, randomb=0, blksize=DEFBLKSIZE, setbufsize=-1, port=9, dots=1; int timeout=0; /* Long options. */ static const struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } }; void usage(name) char *name; { fprintf(stderr, "\n"); fprintf(stderr, "usage: %s [options] destination nblocks\n\n", name); fprintf(stderr, "tcpblast/udpblast is a simple tool for probing network and estimating its\n"); fprintf(stderr, "throughoutput. It sends nblocks of %d B blocks of data to specified\n", blksize); fprintf(stderr, "destination host\n\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, "-t use TCP (%s)\n", ind[0]=='t' ? "default" : "default if named tcpblast" ); fprintf(stderr, "-u use UDP (%s)\n", ind[0]=='u' ? "default" : "default if named udpblast" ); fprintf(stderr, "-p nnn use port # nnn instead of default %d\n", port); fprintf(stderr, "-r send random data\n"); fprintf(stderr, "-s nnn block size (default %d bytes)\n", blksize); fprintf(stderr, "-b nnn socket buf size (default: %d, %s)\n", setbufsize, setbufsize==-1 ? "don't change" : "change"); fprintf(stderr, "-d nnn print dot every nnn blocks, 0 disables (default %d)\n", dots); fprintf(stderr, "-T nnn timeout (sec.) (default: none)\n"); fprintf(stderr, "-V, --version version\n"); fprintf(stderr, "-h, --help this help\n"); fprintf(stderr, "destination host name or address\n"); fprintf(stderr, "nblocks number of blocks (1..9999)\n"); fprintf(stderr, "%s version: %s\n", name, verstr); exit(1); } void usage_small(name) char *name; { fprintf(stderr, "type %s --help for help\n", name); } /* randomize the buffer */ void randbuff(blksize) int blksize; { int i; for (i=0; i=10000) { fprintf(stderr, "%s: 1 < nblocks <= 9999 \n", argv[0]); exit(5); } bzero((char *)&sock_in, sizeof (sock_in)); sock_in.sin_family = AF_INET; if (tcp) f = socket(AF_INET, SOCK_STREAM, 0); else f = socket(AF_INET, SOCK_DGRAM, 0); if (f < 0) { perror("tcp/udpblast: socket"); exit(6); } signal(SIGALRM, &alarmHandler); if (timeout > 0) alarm(timeout); { unsigned int bufsize, size; /* get/setsockopt doesn't return any error really for SO_SNDBUF, at least on Linux, it limits the buffer only [256..65536] */ if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); printf("read SO_SNDBUF = %d\n", bufsize); if (setbufsize!=-1) { if (setsockopt(f, SOL_SOCKET, SO_SNDBUF, &setbufsize, sizeof(setbufsize))==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); printf("set SO_SNDBUF = %d\n", bufsize); } } if (bind(f, (struct sockaddr*)&sock_in, sizeof (sock_in)) < 0) { perror("tcp/udpblast: bind"); exit(7); } host = gethostbyname(argv[optind]); if (host) { sock_in.sin_family = host->h_addrtype; bcopy(host->h_addr, &sock_in.sin_addr, host->h_length); } else { sock_in.sin_family = AF_INET; sock_in.sin_addr.s_addr = inet_addr(argv[optind]); if (sock_in.sin_addr.s_addr == -1) { fprintf(stderr, "%s: %s unknown host\n", argv[0], argv[optind]); exit(8); } } sock_in.sin_port = htons(port); if (connect(f, (struct sockaddr*)&sock_in, sizeof(sock_in)) <0) { perror("tcp/udpblast connect:"); exit(9); } printf("Sending %s %s data using %d B blocks.\n", randomb ? "random":"non-random", tcp ? "TCP":"UDP", blksize); if (gettimeofday(&ti, &tiz) < 0) { perror("tcp/udpblast time:"); exit(10); } starts = ti.tv_sec; startms = ti.tv_usec / 1000L; for (i=0; i */ /* * Changes: Rafal Maszkowski * * ftp://ftp.torun.pdi.net/pub/blast/README */ char *verstr="FreeBSD + rzm 961003"; #include #include #include #include #include #include #include #include #include #include #include #include #define DEFBLKSIZE (1024) #define MAXBLKSIZE (32*1024) struct sockaddr_in sock_in; struct servent *sp; struct hostent *host; unsigned long starts, startms, stops, stopms, expms; struct timeval ti; struct timezone tiz; char greet[MAXBLKSIZE], *ind; int nblocks, f; int tcp=0, udp=0, randomb=0, blksize=DEFBLKSIZE, setbufsize=-1, port=9, dots=1; /* Long options. */ static const struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } }; void usage(name) char *name; { fprintf(stderr, "\n"); fprintf(stderr, "usage: %s [options] destination nblocks\n\n", name); fprintf(stderr, "tcpblast/udpblast is a simple tool for probing network and estimating its\n"); fprintf(stderr, "throughoutput. It sends nblocks of %d B blocks of data to specified\n", blksize); fprintf(stderr, "destination host\n\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, "-t use TCP (%s)\n", ind[0]=='t' ? "default" : "default if named tcpblast" ); fprintf(stderr, "-u use UDP (%s)\n", ind[0]=='u' ? "default" : "default if named udpblast" ); fprintf(stderr, "-p nnn use port # nnn instead of default %d\n", port); fprintf(stderr, "-r send random data\n"); fprintf(stderr, "-s nnn block size (default %d bytes)\n", blksize); fprintf(stderr, "-b nnn socket buf size (default: %d, %s)\n", setbufsize, setbufsize==-1 ? "don't change" : "change"); fprintf(stderr, "-d nnn print dot every nnn blocks, 0 disables (default %d)\n", dots); fprintf(stderr, "-V, --version version\n"); fprintf(stderr, "-h, --help this help\n"); fprintf(stderr, "destination host name or address\n"); fprintf(stderr, "nblocks number of blocks (1..9999)\n"); fprintf(stderr, "%s version: %s\n", name, verstr); exit(1); } void usage_small(name) char *name; { fprintf(stderr, "type %s --help for help\n", name); } /* randomize the buffer */ void randbuff(blksize) int blksize; { int i; for (i=0; i=10000) { fprintf(stderr, "%s: 1 < nblocks <= 9999 \n", argv[0]); exit(5); } bzero((char *)&sock_in, sizeof (sock_in)); sock_in.sin_family = AF_INET; if (tcp) f = socket(AF_INET, SOCK_STREAM, 0); else f = socket(AF_INET, SOCK_DGRAM, 0); if (f < 0) { perror("tcp/udpblast: socket"); exit(6); } { unsigned int bufsize, size; /* get/setsockopt doesn't return any error really for SO_SNDBUF, at least on Linux, it limits the buffer only [256..65536] */ if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); printf("read SO_SNDBUF = %d\n", bufsize); if (setbufsize!=-1) { if (setsockopt(f, SOL_SOCKET, SO_SNDBUF, &setbufsize, sizeof(setbufsize))==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size)==-1) printf("tcp/udpblast getsockopt: %s", strerror(errno)); printf("set SO_SNDBUF = %d\n", bufsize); } } if (bind(f, (struct sockaddr*)&sock_in, sizeof (sock_in)) < 0) { perror("tcp/udpblast: bind"); exit(7); } host = gethostbyname(argv[optind]); if (host) { sock_in.sin_family = host->h_addrtype; bcopy(host->h_addr, &sock_in.sin_addr, host->h_length); } else { sock_in.sin_family = AF_INET; sock_in.sin_addr.s_addr = inet_addr(argv[optind]); if (sock_in.sin_addr.s_addr == -1) { fprintf(stderr, "%s: %s unknown host\n", argv[0], argv[optind]); exit(8); } } sock_in.sin_port = htons(port); if (connect(f, (struct sockaddr*)&sock_in, sizeof(sock_in)) <0) { perror("tcp/udpblast connect:"); exit(9); } printf("Sending %s %s data using %d B blocks.\n", randomb ? "random":"non-random", tcp ? "TCP":"UDP", blksize); if (gettimeofday(&ti, &tiz) < 0) { perror("tcp/udpblast time:"); exit(10); } starts = ti.tv_sec; startms = ti.tv_usec / 1000L; for (i=0; i±-íÎÎÎûŽV£„‹À¸-ßû¤ ê•““#¸ǵÿ­ÖëüW¶ ŽTª•ããj¥rˆ£•ÚÉÉ=8º÷ZFFp/í÷ÀÙAxïO×BÖ?ÿ.™Ÿh Tê±Ô÷ú¯ÖŽ+u¡ÿZí°†P­žÔ*÷ ’éÿ“·ò¾ûÐö·3»Ž o úí·‡ðÌñ<Ç›FdÏ;,‚æ™%o¹.0xr¹±-ê§¡m9a8“8r| Ï”8„~˜6÷LÏnaêsÄúʉ®Áø¯G„eî[ÎÔ1 ÂQ#°aas'Šl ãXx]þ²ëú¯ˆXÓ÷,‡&…„…æÍí¨A×ÕÒi!øÓ„&Ó·-Ù‰ ¤•°ÿ††¤d 6ÏÓ."„‚‹øÍjYfo&\Ôt gn,»Ú6!¸`J" !ȧ#qŸ†\JL–oÆsÛ‹ŒDieÔ‡ãÌQûc¸áJð¬0Bœfƒ™;,±mÖDNHK®æÓHSÛˆb4R;™ÒÍL„þ4z…j“d±$p‘…kÜnpb˜/=ÿ•k[3›ð6ä €!᲋IÓ-{…,ûÆvýr1¹}§×KˆÊϘKòP 1(Iä–D›hGû`{–-=÷#;!!L$ŒB@7)¯óšØ=„ Û$«Ç©¹C@öî ËC”œt±á…¦ƒÞ?>k TÀë«Aÿ©ÖQ;ðä9ªÐ /úøùç–ŽÃß|­^žƒúÃÕ@ÕuèvyÕÕp¢´zCMÕ‘û^»;êh½ó"< ¡×BW»Ô†6ìûö4BÖ?ƒKuоÀžÖ­« ŸóªgÚ°G+ž!=-¸j †Z{Ôm àj4¸êëH+²ÐÑôv·¥]ª–¼ÖÃuA}ªö† _´ºÝ4SOT$¨õ¤« ”ÈTG¨í!‘.¯Ž6JiéA¿RÛ]¨?¨H{k𼈀v¿§«!B§uÙ:WuȯK€pm ÅÝ ÔK¢ÙÖGOô¡6 U8ï÷;$]ÐÕÁS­­êMèöIÞg0ÒU&¬Ó¶xyÄ‚ÂAbj¤k,&­7TƒÑÕPë÷ pцR@J[8»Ãòì÷ˆgajðœP“hía —öÌÜŠ_è©ç]í\íµUè¢gš®PGšN/ŽŠÇeGÌ;)iÃË-Ã,²A;ƒVç©FôKxT»®Iañµ/¤ôå’ûZ³ S’â †îCÚ’êåj­\ÃËãF½Ö¨Ÿ€9³@}½€¯qNYQ¾’Îß…‘åø¥ëÇë]®3Yï‹= _õ¥:ƒ…YÆŸuHìoL™% ø©gÙS4­Aëyut¡¶:ÊWØåxözoîѱòÆgª(7¾CÛ¡1³!_hŠ[tv/¿žbvá7䥼/ø‡I<ÅâϼÆ4…;Ç¢óG^æ²õà 1apÕ†C;†’&`h¦H]7†‹V<î¨g­Qw§ðªEü·ÍM¸~O“† ¨RÄÌ|dˆ®J@ µ# £ Ê7ϼÌLÚ´g7%‡½ti6•s°¿OMåMrqrFA˜;܈b7wí‡Ñ˜’ôA zñ¸ÅÞ6F!ôÀ}ÓmŠeLù×IîýŸBEÞ[6m#«{×öf¸‘‰Ë'® ¯1ÉŸÍ\.‡B¥K ðmÚ¿Á2"ƒ­-—Ðó%K¹W×¢ÈçMì›Ù‘¿ˆR²(žٰnc¯P€¿œ¢ð €BÈ…þÍkλèÖ4pùÆü¦×¹„#ò<¢C‰lóök'ÊW Z<Ã0ô1À ì · œÒã[½TAZ#¡ÍD×2úA(ñ:W‚L.1ÅÄ_pe¸n¾ÀI†ûʸÅç™ç£ ”€,Mi•tçc/yR°­\£í𠤃ªxl-È(Ï—Î`º©öŸ,\;±A…ïEï¢ÈŠÐîêêp,w—"ŠÑ°¬`¬ö.ÚE4pmÚ…ºh=ÜË3\ãŠEœè¬=nwÕÖ ¯1m¿EÖÒö½$‚#5Ê{ŒY ¦szZB‘„ýÝÊí[’ÊV–8Ëû?¼R’€B¾o-ÇQz¸Ô5u¡KÞ¡T*í…+¥+ÅöC N§nâV‚Y êœD•ÃJÈ;¼ÇƒaާâåÇ)Vî_ ±$ÞT„+Û–˜ÌxUÖïFb ð®m/dW3Ù-’¸îº×SJ䇤”+¾K¡çêðnu®²‰„rÎ'v¦ÛÜ2W@ñ®ð—L×7_–BÛ„‡Äz~k(¦±² •R…E¶4ƒŸ¼Ÿp§„û¥ÚE@Oó!n7Æ‚Ÿ4q±Ÿ<´€åÒKlÚÀ ü=ܦ-Œ¤—&‚L‹Ü§6%DrÒ8A"0ØnOg5 ¢‘æ(e´y"ýþýBB L‚ØÀÎ}UâÃÄæÊe¹ra}·]­çùËõVË$ŠIÀt:àÞ$;¿áAkâ\N˜7ÖÝÓ·Åq7®œÂ&yÒ1Ù;Ù¨²‰M2R”!"Ä2¥D¢¤5ÓLß!\*o•ðœXs²‹‰êÄb69_Iä¶ ÀÉÆV"Á& oï@%Тi,-l\%5VNÑ•›ðP‚ =¤¤ ©TY&%e\wÖ"Ñ^HRGBó˜‹Z½K›@ǹ_ªN¿'h‚( \–Œg PBCÉÚÌ0-),i©®äy$;•ÀamŠˆ{<(VáÇSØí ¼t¥Eе%ž=^°IC]Æ’·Ê—?ÿ¿ÄloŠ/_âü Fï|Äùåð¤B¯*•Ãìüÿs´¯ÄiKb|ÜRå7t܂ЩÔÕJÕöÏÈ”Ç-J»}Z_•g^\ž8^yfš %ħâI]éõ/[½S¥Ûiu:§¹WŸ(Jiy 2 ­í¬¥ùËÇʽ¬}aÿ·>í àßôþ·vDïëõìýïçÔÿ'ÝÞÿ«GIü¯Wèýo­zt’Åÿ/ÿù¸ý¨\¡w¨TõGJ5ÿ)ØÃiŽÎÉ…ý(ú ­ƒŒÿVÉTpX(=R.»Zï{}½–£JçŠw‹¯ßtµ'øT¦?m¿ÝÜAàÀ#ÇýÕ$ÛI~·ÿ§•ò¹ý¿^;^æ‡ÇÇ'äÿ'‡Yþ÷YZé§=Pè×V HÚ×F~ÿðc×ìÎÒàÁšTšeùÝ||ýaùèB²“ P“”€HT;©!\;+‘„ý–*œ’û- &.ØYéG"ÙÔ~¬œl'å„hwõ„mW LÙÇV€$;*!d»«!l»)ÆðñU „gge [ú»ê@¤­‹Ü4›p~Z»#?=Lå§<»cÁßbφZ­È»öDtÜ_âWx¤”ú!<Ñ;èî‡JI¿†^ëRUJ½¹LJ¡È7«ÕqŸìYò¨O¼œàiúó^ÿJ×t†.ÇaPv‰ýÚ6SIvT½=ÐX­˜~Kœ¼!ºvÌk*8ð+\¥†ôþlr+ö²ªŠéÏçäé‡Þ ¢(0¦Kä; RÂ|Ü8p‰ü`ý5½!!]§È2ì9nH˜‡;’ặJoü—6™dz# jëj±9£#m>âÅxàG¾é» Êcø $Î1„°d€.¯Õؼ&¬$[ݾ«÷S,?ʲüOÿ'n_âùÿäøxõü_©sþ_«eùÿ¬ÿÞNþ³²ï¬ìûYöýqùþ³Ò»”•zg¥Þÿ_¥Þ–¬õ®‰ZïÊq¹V‡Ê£Fõ¤Q¯‘S†­×{‹l— ¹xÈ.)Ìб~|§°÷»Ðï5eÁ6”÷Ùýi…(1wfžánŽoW“‡·a™ ¶z]öžºsÉ&Ž‹²FÚ†q7€ñø*Ÿ—uÚ8gØ¿À>ÄÓ6‚!쨀BN'v(:E  UKŠ×“âîj­²¶žbº¶áÅ Q‘§®,æÆb{¡åï*‹\Ö9$õ/X#Ný?¾àZ–%T.dLè›/S•Üü„!ï —â†G¼JHº•*Ë:KÝæR`! J)ÛˆÃTaë ’mùJòK pÞ"<è ðTD]Õšœ‰¾œ¤*ÏÐÅô~ûû&×§´+”á°?u®¸š)'kkWx^ñ|Fäˆú±×È VXl^×Î1A*˜+ݶ 0X]¾äbtµA¥X¸ïzhÖù½Õ³á^#åù˜bò¿éâJ눞NK½ÄXȺÚ¦âÝ3¶I .É.)²M@Ò…¶Â‰ò„ ƒ+•Üy°¬öEL ¦ÄE89LüâÀ# Y³¤…÷Ì0M°¹È¯ý®¹`Q˜aáNJ°‡rƒ½Ø3¨ÊŠ¿(K@þnÜ÷ÃBi/™'¬ã¯¢Ê°—¦pJÎp`žOªÉ%ˆ£Øãû- ÉAHl‹Q®0’צ£ÀËùà—0Bé)VΗ oÞáÅo–±®Ê4!Ä?ÍÕÀúG'dX\u˜|0Á¸¿ŒQ:âë þ¼a£Ö—¾] Ä˺Gé†Ò|Ñ·¹Fzj·ù¼ˆp)*‚;ÃŒdx1èÎ/¸úñ“µú†¬seƒ¡£ÌÝÝۥŬJRó"¨ØLeA,αƒ`ŒÚˆ0‘ C_WléhbX°¶Ê^RD+5ÕT¶˜ç«Mæ>l¾kι:lüŠhòêÀ˜'SIk"1ǪWº~'4WŠnÆtŸð¿‚Â΃ƒæF'O}˜|?PI¸]ŸFŸM,‘ã}SÙÆ‘‰%Œü¼EIÞ"âùdLim$Âb×z¾Ó%Ç«êu")‰ ïPûjýín 7ÎJþËÏþsT¯.ßÿÖ+5þ/²ïÿ³óŸìü';ÿÉβóŸìüçÿèüçD¾Ü=,׎¡vØ8(Z}á·Ûê:4Fµu´ñ»Ï˜²#¦9búóœ(é˜ãv¬$ü¦s¥æg< z€w 7Ô„ñDv&¬Ò]¡¹}bÃÿ1Ê;Žk–ãÙYMÖ²–µ¬e-kYËZÖ²–µ¬e-kYËZÖ²–µ¬e-kYËZÖ²–µ¬e-kYËZÖ²–µ¬½»ýš3ñ„xnetdiag-1.2/tcpblast-20011111/docs/orig/tcpblast-dfk.tar.gz000066400000000000000000000070471323731111400230700ustar00rootroot00000000000000‹´‰w2íZ{oÛFÏ¿â§+—Tr$Z²e»µ-·y8­‘Ä1b‡»$øXZŒ)R%))J›ï~¿™]R´¥¤w@›Ãá8h*rwvÞ3;»tîMÜÈÉò­;Р·¿»Kwˆ¡§ûÛæÝ ÒÞöÎî~o0ØÅs¿ßÛÞ½C»¡L%L³ÜI‰î¤I’ o>R*ú}[È ÿvÿOçÑïõöƒ/ú°¿»G´ÛÛßÞÝÝßìbr§7عC½?]’5ðîûòº||þèùËKêSó‡þVïû­Þ^ÓzÛ¤eLÐ6þs–ýú1 ,ûâ:{øâÄ*Ðèm—r…ßÔ™S6Qʧ$ $Vݹ³`.ä%q¬¼rB9’Æ2<äIs„¢âz%bx# FìÏC?ÙÖyŠ£g’N}ðAR>d e\Y¸ÒŠô¤$%ŸtÕÍHÅåDI\Î$m#WYy’ âãó×ÝQru¥nŒ±y•I×Arì^6)D$‰ÅuötØJøC@õ1gS€0v …ZEs®ú™Š¸Ž#LŒ`ê"Ú—+UÚì1ªÓë'¯J«½ÎXÄê4ÒÎËÜZv—Š‘@÷j4áò0 ½\äE0Uf§x“z_F{YûeÜWi´`ùNÏ lHjý:u¢0_0&3 ǰ»Z¶¹¬ŒÄrï—ˆà- ÖI§qÌeYÒ8M®R…W¨àŽÙxØ'©vÄyÇCezT¨;guÉ´ÐÖëÑëŸ/¬N¼0ÞõYè+ˆJ))véõîæþÅÛá9ÒßqCÑ‹7¨MT¶M%ÜÌp2Ú“©’`™J͆À2?Si¬"S82D Ìê `1Ye8Þ’Z‹²•ìÇããlþáëË_^¾²ždž9iªbµ+:ÒCörè'oÚqtl­öeÿÿ• à_ÐcþAÿOƒÝÁ­þOƒºÿÿp— Çßlñ­'§—OOŸŸ\Ð61S¢mÚže¡è,«[Ñ–'ƒFÙxVÃó¨ûrÙ0à-YöÉÅ`¹¤a5¢˜ºÙúHÈü€èo­Rº¶Õ@®_4݄籠nÞ¼4$š7×Xªp|`5Ò1¡Í¿Í:BÂñ„›»O¡ÚÙ\“=ÿû°zþ÷þt_Ïÿ~¿ÏçÿÞîþöÞ΀Ïÿýí:ÿ¿lmZ´Ù¨F$€9ëv „L‡0ÅŽ5¼luï!:òƒëŸâгÕÔF p ¼-Ë6Úß•:p£âÞÝ0@P„žÕʸ=ðÈÁAž—úoÞѰùSën{I¤"oóï·ö¶~è7­»|ê2ëAM÷/t”-²­|1Q™=:¾5œ¡'Vùê8»ÕQîÒx´2 -Ѧä[a¼:á»·Hä~˜h4¨ÉÝÍ““§ž?»8ý'õÙLĤp²E·ÀÉpœóòËèø~ú½CƇÅ8·-ÜNoòᬗ6²\?³ð*FO%ð*‡zžuôïX’‰ùáWõ?q¡4sС„‡TûÄ-k~Òüt_C“„¯ С€iÈ…˜èÐf‚ˆ&5™TTC‹H{w3hc‹A¦€¡0öRÜã‰ŸŠ Óñin Ã"ˆœ+ÝLf8Ÿx8âpPó,6³Þa¨8þJlâ½8˜–;A±Hø‘UÕeÜŠê)s=P,˜-¹0>dt´ú2jP¼›(æ%¸‰Â‡Ù{«8î*NŒ^:÷+Ǽ_ŒÃ‡å<ñ…Ü¥Œ¡rÄhÈÅ×®&ôì_&±ù£ä&Wc`WÆë!±÷—wÑ@†éÈqT‹Í`‡Ž[ð±×¯fmAæ÷C›<|hý†MY]aÇ…w%ì|è#º—ã&¦e×7ñ-D¨7ž0‹Ù›Þ»5o›mÂJhE0O?,sJò¸ížÂ;7œcp— çpŸ“Ø+[÷ó4rü[Neœå¢w:¯%ÝO›øB>ñLQÝì÷¶mÙˆÎ^?^¥‚&_¡é6jI®Ôu¡.Iÿ”Ãø6aÝÿÚ7;Ÿ½Ï”whFÇ=ša´mIÉz^ȳQ§Lß¡·Xš¶Y{¿÷1”ÒÏ d“ÛÍ ó1D’_ŠØ²Iá1):¨³±hJ$fÅ$bÝ~ TÅ–Ö¿Û¯j¯'šÕÝ<Ä~ÆD¼óAäÆÞÊE¼äpÿ¾¦ÞÖ (Õ@4Ò{¿c7ñ±wuÈ"J¤ß­:ñR}• 馮e]Ï”$!Wü"|ß×ú0ìÒ‡£Êò­<0›13{ó‡!óaEïqŸ¬ó4ÌUk)ÛÑ6†+²™¶É]ßA³ÌãÒ• M¶ } gõƒÍÈ)Z˜³µƆºï‘oÂAlìêƒA£ñaX‘„¹o}8–l+-ÞB8³C™I‡>”‰¼”Ý|ý0â7&ÓºwÞ°ÌËç¯(wd”3(fw¦jü‘“tëÂËCã©¥«´È«ûžlëÅi@2ûž–÷ó-s³:åÞûùVŽ,·pƒ.ºaÞÒQÇ'z;’ÊQ¡òÀ†#WË *¿XU¬†œ69"dyW§ö&#Ð=:6Ãã¬ØgKí´ý¨Õ,ÌT›{>1|Í~/òi ¶Ëê"§²¨C›rùñÛª|%ö:ÙW…úoß&ÖPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC 5ÔPC ßþªœPnetdiag-1.2/tcpblast-20011111/docs/orig/tcpblast.bsd.c000066400000000000000000000046551323731111400221140ustar00rootroot00000000000000/* * tcpblast - test and estimate TCP thruput * * Daniel Karrenberg */ #include #ifdef __linux__ #include #else #include #endif #include #include #include #include #include #include #include #include #include #define BLKSIZE 1024 struct sockaddr_in sock_in; struct servent *sp; struct hostent *host; long starts, startms, stops, stopms, expms; struct timeval ti; struct timezone tiz; char greet[BLKSIZE] = "Hi!"; int nblocks; int f; int main(argc, argv) int argc; char **argv; { register int i; if (argc!=3) { fprintf(stderr, "usage: tcpblast destination nblkocks\n"); fprintf(stderr, "blocksize: %d bytes\n", BLKSIZE); exit(1); } nblocks = atoi(argv[2]); if (nblocks<=1 || nblocks>=10000) { fprintf(stderr, "tcpblast: 1 < nblocks <= 10000 \n"); exit(1); } bzero((char *)&sock_in, sizeof (sock_in)); sock_in.sin_family = AF_INET; f = socket(AF_INET, SOCK_STREAM, 0); if (f < 0) { perror("tcpblast: socket"); exit(3); } if (bind(f, (struct sockaddr*) &sock_in, sizeof (sock_in)) < 0) { perror("tcpblast: bind"); exit(1); } host = gethostbyname(argv[1]); if (host) { sock_in.sin_family = host->h_addrtype; bcopy(host->h_addr, &sock_in.sin_addr, host->h_length); } else { sock_in.sin_family = AF_INET; sock_in.sin_addr.s_addr = inet_addr(argv[1]); if (sock_in.sin_addr.s_addr == -1) { fprintf(stderr, "tcpblast: %s unknown host\n", argv[1]); exit(1); } } sock_in.sin_port = htons(9); if (connect(f, (struct sockaddr*) &sock_in, sizeof(sock_in)) <0) { perror("tcpblast connect:"); exit(1); } if (gettimeofday(&ti, &tiz) < 0) { perror("tcpblast time:"); exit(1); } starts = ti.tv_sec; startms = ti.tv_usec / 1000L; for (i=0; i #include #include #include #include #include #include #define BLKSIZE 1024 struct sockaddr_in sin; struct servent *sp; struct hostent *host; unsigned long starts, startms, stops, stopms, expms; struct timeval ti; struct timezone tiz; char greet[BLKSIZE] = "Hi!"; int nblocks; int f; int main(argc, argv) int argc; char **argv; { register int i; if (argc!=3) { fprintf(stderr, "usage: tcpblast destination nblkocks\n"); fprintf(stderr, "blocksize: %d bytes\n", BLKSIZE); exit(1); } nblocks = atoi(argv[2]); if (nblocks<=1 || nblocks>=10000) { fprintf(stderr, "tcpblast: 1 < nblocks <= 10000 \n"); exit(1); } bzero((char *)&sin, sizeof (sin)); sin.sin_family = AF_INET; f = socket(AF_INET, SOCK_STREAM, 0); if (f < 0) { perror("tcpblast: socket"); exit(3); } { int bufsize, size; getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size); printf("SO_SNDBUF = %d\n", bufsize); #if 0 bufsize = 16*1024; setsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize)); getsockopt(f, SOL_SOCKET, SO_SNDBUF, &bufsize, &size); printf("SO_SNDBUF = %d\n", bufsize); #endif } if (bind(f, &sin, sizeof (sin)) < 0) { perror("tcpblast: bind"); exit(1); } host = gethostbyname(argv[1]); if (host) { sin.sin_family = host->h_addrtype; bcopy(host->h_addr, &sin.sin_addr, host->h_length); } else { sin.sin_family = AF_INET; sin.sin_addr.s_addr = inet_addr(argv[1]); if (sin.sin_addr.s_addr == -1) { fprintf(stderr, "tcpblast: %s unknown host\n", argv[1]); exit(1); } } sin.sin_port = htons(9); if (connect(f, &sin, sizeof(sin)) <0) { perror("tcpblast connect:"); exit(1); } if (gettimeofday(&ti, &tiz) < 0) { perror("tcpblast time:"); exit(1); } starts = ti.tv_sec; startms = ti.tv_usec / 1000L; for (i=0; iÊÃQÒ½Q©…ŠŠ˜©n<´¡oŒñi¢˜²á(©•••e̱j«¯&ë©®Q·Šêª¦±êGÛª¡2:,©‘Šøë "";Ÿ΂@DFÁÄS$¡E8Á  $à™—f„ñq ˆjŠs¤¡‡nÓᤢ ˆN[†Õ^k„Úr. åžû§ºlçFmˆÑ¥qí¾»Æ ÔkKø&úž•r$yd*¼1fRgìP°hé‘IQlT܉࿊L 3`—qÊWìq6‹HF6)ljz~agê½u×[ ¬Fqö"±5hè&GÀ¶ˆgˆÂ$¢‘ñ‚PЃÎZ롬ö¹Ý¾ |ñER1E¨~òí÷T1„ߊR‹_ß> x`7|#|9Gï[­ß€ N¹å*¡‚¢el×'ꪛ‘ècú¡fÇipgT4_ºä( ð±R*lÇ]¤‚ɿЍwXçeI5dhˆæ}\ŽÃŒÂmn`g‚ `ï9~d ðw¡)$÷oP¬wa¤ºÕÂQûtô˜q¹ü¼õƒaÒ¨§¤ÑêO>#ŽýÈ€?¤e®uÖÛÛq¨ …*¡süz-(žœîÒ9Žg6X„ŒN‚ 0B˜0… ê+ƒºQ! Á…|0u!gdØBV 4rŠŸP@²1äIg°Ãéê7²‘/ÙAâö»ÐxHÛC¢.R¥ò˜LêA WØB“F‡¢yYyγ5QEJÅ9Žt¨ã¼åuç;áYO{Þ“1.þl5_ÄÄÈÃ"˜ñŒç*’ÄÐ>å¡PÜ9Æ"ï\ùÒà˜¥-u‰m`ó‘{¨Ä.Ö L# .)š*]©“\RÊ)Ã$"¼l ƒäñ'·ÚQr•'ë%w –›1”! ФÒÀî@²‹°3 òÔ—:à&IѤÄÎÃLgVï"G‘CÆ`¶•Á&zŒòWží˜ì\/ã¶vAéFÄy_;åiÎ8‚ /x)Oˆ@î1œã,'mÐc•Á7txg7Ç;:¢>[ß—òCŸS‘„}B#÷Lx¯ÕÁ]º9%R¦y®zæ†b*…Äðù6îà0£›CÍ@/r.šágl¨©9FÊ‹È@]êâ~†´RþqŠÁŒ§Ö„ô«kЉLp“…@@³yŽ g:ûæú ”ÐõõJOrøB-ã剚5Eh펠Þê+â@¡äDNû¬ôG‡•z¥Ê툞 ­Œ6 @ÕÖÀž\" œdÍëæäP¤¾NÖ€½lŒÙN!ÈŽpqËX8ìмJKE“Úºz‰:cÓ\Ÿ9X2lA]Xík¡–ÙI®J±­NËÄxá‰]t×Ää¥1ú+`ÝúÖб^­¹TÑÁÖV ׉0ƒ¢”K1çb `Ûš‚[Ö°‡Ç]½¢ .†.„Ñ!üîqÃÛÅñæÁJs,{¦ˆÉ ÀS…væË¢Rõ HUŠ~‘ûÇ×ê î1CDÕç«2˜VÁ)ò§…)–a³mmü£fmÈð‚;ŒÍJâQ©¢”*ª “€‘pò¹â gÇíÒRƒQ`*ð¤ fÝ5j Lce‚¬“pl{PTô4³K¡u%ðÄj„$0\*¿Ü£[©ÎSn¹A'…Ü%’®m™£ìjÄØU›QŠGLbDP$4ˆAnÐt@ˆÀxác <-¦d ð]Ò/…)Ýó\7Âgî@½”‰ 8×tƒŸðž9]¾²åÜãaÓ­­mu9½n¸Á>-à^¹‰Ç‚;%Ž è`‡/ÜòÚIg7RÜ S«$îÀ¢ûrúKâ0¤ž©XÍýmYo7až&öpW†c+ÑïŒß5æAÀó‹ð¼”Ì96jT´í`'bô ú¦Þ®_59EÊN`ÄBò"Å®¼ðt®$.†¾µ”lí¯P#|! N(z4…' a _@œŠ„&ôȆ W4£-kZÉ¡7r@„O‡CoÞæ7ó ß?ŸëyõFÎÉž÷ØÚ£xÍË8Û‘ñüÎV°õ éÒÌ”J P|Ç—|TÐl'B³=½Ò#&@×uÌÁVˆæp3Âh–vÞ~âÇ€Ûa~²†~óõn쇦Eg¿RXt 3‡¥{H4<¥GÅ£€Ì•vF)q.ževµ§ü$võXÑÿ€HIÁÑ>€_€VT›'õy€KØ„O8%rF("[H]ˆ‚Lè„îág6&nš£{Ð?¢a*yà0C'à>fÇ0F²YÙÁ…µB1?p{×%!GX{I(Fˆ|Ê·y²pùGˆ`ˆVþ†J!FÎB”hy[0ƒÅ“}h9{Ð{*q.gG+õ'(r€ ¬‡*™&ˆaqcó3Ç)Ç5,hv"WLTh àq*ÇrQ”D›8&BSƒÊF‚ê'kç@´Œe$v@I]uY.øƒ(@k‚4@"'o 6 ×5ÓQr@À(aa~ÔÕUr#Zö…nð¡µNÁL8ð(Z68iöc×Z^("õÇ\øgž¸h—((âW÷‘"˜ȸ†@ä_&FÔfm¢qnó²^ C`"ö_µ2U›³/PLÇ{ø¢$ '¡F§ƒ±H'SpxhØ‹1’Jn_ð‚]%“ö‹,ÐkA‘µÒ#YÇ#Š+â{âDIAddcÐ;K™ @06€Ä•^  ·”øp7q܇F£"Pdïdfð³†7—Œžnbà~o •Z¢”ÕfL X5RI‚Q`£°Ôfbpú6s‡h¦IkæIJÁ“&ç`±TÄ!Ff0$åÓII(P_ð;)˜Ë5/="pîÁ{Ç™Zi–Ê‹§quò}{vI1"h)4pC1s—]6ÚQ]?9/)·r¹’×(jé'\•ç'©ê5µcÖ \TeM=ãŠrÓ–á'ÖI—i—éÇ{Ëø”Ôz DI˳¦“9x.õGÇ&‰LŒ©l yžõi:êY—wéžÍØ( ß#L‰6™ÁÄzI¡‰IUÆ [ök¬¨(à'[Æhn:‰aûÒ™fG^²±”Í•(ÐUå'¸wìq‡Ÿk©*~2jNÆAq ‘›÷žÃ-‰;Ó™3FT]ôEFá„¢FI…¤š_ÀH»˜Š”4b(ªa31«)…oçwg ¦%Fq àˆ²)F é€)¢”Ù.'Ú¦<Ê} Àæ)~ÿY$†FsGÊž8GsŸ—lš¢3"Fœ‰4 Ðki*œRYm[êÛá¥>€§¦÷ŧ¯¸cs ~\  PªÀÈ)E¨Ýá*s`¥µFjý©¹f©\š©Òb䢽ÆsoÊTúªè’ ÚÁЏ¹ª´ÚªU:¬ûVIeԫʦ¤0¤´1¤5j8Ô#:ª–h|ú£"`­E£y ‚5g¨x©ÔŠf·)¨Ê{¯x¬É: ‘lioLgGM* ä9©q¶¨榽§$§+F§k`§f ”yš¢gù‰¡E}Zžßç–Zƒº¬$˜sê«KºJLe”Néí p䊭W¨­ÛÁ­iÉ£+®-k®èúH:­Ê(kŽ÷%HAI(`R(…׸sWw„§ø”´ƒgرâA´¯©l½CµL)8ä´wÇ´8ʵ9…/000P¶0à6´y'‹â'æq’ᔜ’µTÇ‘SöAòUg;DZ#ösD‰²+ª“=S=2´¾Q´â”3¶1%¶61.ïÖˆÌÑ<7w£Mc4+uñCvÄMÍ”XµB¬‡bå‚Hiä6òª  €!™’ú§" ¹å'¯å¡® ©)pÙô¤ù¶¶2‰›µ(¤ËÕtMáuvnÐ|9VK1AI”ÔkMƒ›¤²ÖS¿â% Ÿ¹U 7HD57Æ4n¼¡§T%%!j[/·¸6æ=Š;å:´@ÆC³·›±ç š½D+FÚ» ʽ0ù®T`æK"VÂr;be·Åz+|ë~[5;¸…{±‡ `‰Û¿‹‹µF ¹:¾H!¶áb¹Óå³yy¤ùꆒi¡¹±êÀÅ Áй,)=ê¾âq³Dú²ø$³;:HÚç¦6ëzBг4·³£¡¤Ê&° z‘sÐ-à¦ð»J½e_ª%:²_˜Ì©^S¬«¢.F"•çr Û©zÊÄ[¬~*À€ú¶Ú±†‹À7²(뫹¦%¦µŽz²kÆ%û¨Öótn€²7Kyp:"¬u\ü‹JÉ–95,RL´?0jɘüh5v0 ÄLÀÊ®¬#×j¯†×:¢ì&”}ðf”:²4·c¿ƒ'à'@s’T¥õz_›7Ã)[­P|­æj£Û Ý À ðÄèÅGŒ®TÌ®=‹¯ú*™ý H“Dž,ÛÌåzÄ6šÄÒ<³x ®5‹»F\¤Sì»ÉÌyÊvÅjú¸äÅÅ^œ°Zƈ<ÆfPÆ+¦»ŠÆÙkkl±0ê;þüÆV°KÇskwü­ÛÇÐ!® È™ü±¬jÈs Šl²…²Ž¼È'M8’LÉÌaÊl›ÜÉñÉmXˤ¼¤Skt—È›#v7³Êë,q¯Ü­=x6Mˉ7ÊՃ˺<°Ì<ûoÌÏ/ÍÓÜÎØkÖ<£Ù<Ï Ì³;÷³á+´(¬µH+xKK½ëä´aKÒSÛ¸U;W+×Y{´d¶æ1¦M+x·äÂc¶g›¶g*u/–Rý»ÊQº5ßéf0Ú ÄÛÐð Ñ×i[$j¿ñøkÂú‹“;±îÌÕ¸kÙ\ÚLÏb­$HØcíÍœ3“3©r ¼`çÁ8YÑ|·æ‘·{Û·ûÁ„»rE™É#œ”,'l×)LÁ’Û¿€-.4Д ± ðÙÚÉöy ;|8;µã]“gl»§6vE¹¥–f›lK‹ºÉ5¹r[ÐvÐôÝe€ßõü%d*˜ÿ$Zü߀2pøÍ‚Ø{E/÷nì}¼î=†j£ö½FÂH›ó‹n¼³¸qï=á)¡ßZ§ܨQ”µY@8WÞÑÁî1?åË`F¢á~÷àž›>-à6Æ»õBìKy4D6޼®ã¦ê“ešQÌ¿é²./\ÝCª´mä9NáÞ‘î¥œÖæäö50ÅM—Eá{¦ã>Jg–Ij3l¦(0½‹©2S_Ü5åÝÁáV^æN%?óJmN<,€ì;=–œQ·$_G6dç;Ësœñèé’>é”^é–~éQhñM ožã˜žo(ñ¤nuqF2! à01.Q;q3¡žë`{NÁ•a%—¡ëÄ^ìº>FÀA 8Šö ÈGI bôF!/ð.Êñ¿2 €|ˆ³BL`‰pƒ,ÞÞ®§rš~‰Òîy  ïjÑk$°C0¹|ïȮ삓Ëô>z_#gáî àFæÎìNð¦aï{îT îÏðh÷íN íRÀs…©ž–r@5-pð.pb~# õ‘‰ÒÝa@`?›ãU£µI $jC(ÐïË>˜<kNõnìHŸôJÿð^EŸ1°ônq!‘ê¦nõ%aõ)14`ë~6ë6P300@¸.õÎëÁ’ìS!ìW¡öt_÷[‘rjc* c"p@y«Ñ·ôM¢&ømQO¯.@H@jCSRY€\ ðäô91 ˆ?‹ïÕwA%ϪÑãa H~6½ñÁ1à óÁüˆU¡¿øSNðŽŸƒãB@ôb °ˆ?ü¨o ÀßɪúÝüôýü¨ÒüÂýb€øIàÌuýÔß“ìݯÅÍø!•$s—$]“ŒýÊ?òÜor/xþä?{õï¢o-E0C I P$ðœâcP`þÁ»î†C`JÓ }[ã˜$&¥¡æˆ8&J¡ÄQÆgâœg);Š ˜‡>‘`†¸EúÄxQŒ µúŒDëã ¾8ìû.Ÿ$€N øQ(€j@òë~ËO@˜„‡¼†èš+µAÒ(9ò3\¸Ì$<(^á®þt(bbô=ÎbG’ õ[‚‹Ï­‘81'ê„”f‚cé°P¨JƒøáÅ¢,mBŒÊÛêÎ“ä• åúb`ì#ÀÐÀÄ—…Œ~U Ód¨ ÈKœfá,oÅø èØhB#uüEËøR(Ê<ä…¨;¨ K&"ì'µDAöñÛ¶ƒ:Ô]­‡LáxÆÀúбç!šÂé€ á†F\‹ï8Ô‹³¾Œž+L€\@è¿ÅW°@õ_fpÄÇù˜B¼Lÿ«-\g'ü¤@/¹I(¤¦äg ‚H§ƒ?* øž€PbÉ ˆqä‚h"BLˆ6p:잉<‘(2EªÈÉ"[¤‹|‘02FÊÈI#k¤¼‘82GêÈÉ#{¤ü‘@2H É!I$‹¤‘<’H2I*É%É$›¤“|’P2JJÉ)I%«¤•¼’X2KjÉ-É%»¤—ü’`2LŠÉ1I&ˤ™ä netdiag-1.2/tcpblast-20011111/docs/orig/tcpspray.1.1a.tar.z000066400000000000000000000101061323731111400226350ustar00rootroot00000000000000‹ÍÏ,í[érÛFö_â):tƒŠxé\K‘³Š,'ªU$—¨Ô¶‹%@pHf\Þgß>f𒳇²§Ê"0˜îéùº§»çpî&Y’:Óî“Ç+°¿¿ ô ЛûÕ/°»ÓÛÙßÙßïoôû[ý½'°ûä7(E–;)À“4Žó‡ÚeÓ,W“'ÿk%7ú7÷1ô¿··³Jÿ[[}Òùn{wgk»¿·úßÞîï>ÞZÿ^ºlˆ"* hÃ]¿ÓÇOå׉r²"UÓ¸¸'E±c'ôÁ¾ ð‚ÌuR¯Nä_„¡T+w·À+’P}¨÷nEÊ̓8ª÷ò}ªnàdœY>…on&îï.â<£ŽO^ÖZö·ºýÝî‹JDA8!ÊâÞ”¬àwÝýî‹>6pCåDí"<˜¨Mðƒ4Ë!UHr§Ò %¨ˆúÌu ‰ÏCιJÛ£Â÷U ž )ĉ¹l¿'í¹ÀNhÄ0‰=…Cô°;bô4ð=僧p|ö'¤îZÖÓ rÛ}©ÜuÆ/kUYî1UÕê&NÆî\%še7Ÿ&*›£Çê,voU¾XO(ÌqA ü× "ù€Ââ;¼:}ýÝùg9…~ok§Ñèn ¾S„9À…¹Í‚_ôoiL5º "DªÞ QTLF%ŽP3i¯Çx¨vî§ãÂì¤7‡L,H[NšA‘)FS¸Q96²·[D¬iQ_¬ ÈÛ¤_•¦‡–%)'‡‰ã¦1øi<[çÅÏÇÐôb4iip3Îñ)ˆnšpäc´ã,€$ó˜ñ5Jó#Òäpx|õýÀÒzׯN†ÃùlhiSü`=Ua¦V~·[Ø òßüXè•òÀ…»8ðpÈÎCd BÏÝÛ÷­–`„–u³vC'uÈFY^’¾^=;+¢|õUU1Dkl=~‰3žºNð´”Ià óMâÓ BzŒ!F´Òì[¬‹€¡ñîÜø°”ßu}õÓi9lz»o Ý ª©ãúúø|Pµç7°{5®" ìÓB¯ä‘P¸8Ï–U Önph,}8´êxZ-$£Ê8’NZ8H´0™ÄA„.ßñÈ\µwãÌÎM< "Ìî–2#nèbFqäÓ²­?Û–pMRÆØ“v5l~*(‰ÄûAO–x¦ "ÉÝLhXô·¢¡Jª\ T8ӂЫz ‹+²CQtªò'”ÔUÙ[gyZ¸9{Ó;œ–@ÑLPC‡ Ï£™•å1† þȆ…ß™„¸u/g¦šß"_ú‹¼bJàëJm¦B à¢[dçcL™‰œ^\ŒC„'wô¸X¨LªHYñ˜)F?!Çæ7*R)NC7.p C†'|#ÔÜ^#è ΡDŒLÜΌת†L®ãD:$ ‚ˆ‡lêxØâË¥M3ŽQìucœH¿¦‚ÚÓ3D¢Æñm‘d3¤™J„˜ž ?ÊÓ)³HbDF¨µ°l%(ˆÁRdòTæ¦A‚ÀV¶ä{o·ÞëfÕ÷Lø‰Ò g&ë(”hrT ;‡¤ÀßlŒ3:–´¤·ñÇ…˜cSÄ1\–1™æ*Tj´TIZÍS þ‚-Ì…Cå‹ñÞ*•Ž¢äD‰]͹bFâuïÓ Wì\kÌŃál7“Ÿ²/2Zœ ô¨ý€-‚òZs•ôÚR’ÐqÕ8=EjŒi#Éë³óSØ"r>ZÆœç|”´¿“—˜„¨kÛ®¼ñ&4ïÔxtøÞA³Õ‚/Ž ÝoÁG‹œc†nÎƒíš ×AÏûüîù%ÞÓ8U ‡ºn„(ÝòŒ3íUÙ^­nC©‘ŒK­6‡ŽÕ=Desc`N¶ä(ÐJºÊ¶¥_RúKÆ„^ζEGøÅi–ˆxJ8ÁÅOççlÃORÔ°ocJ‰ ¶x–À‰=§\IEgžewQSÔö¶÷žÓ'±¡>¹½U ûi¥Ð^)´ V³ƒ­;{´«{…I™˜–ïÜ*TEˆóÄnIôçŽo˜ÈDqÔF"Jß0?S™¶=^IH8èäwC ~s}Âáb3iÕ;\/懥}ÄçmÅàò‰½$i‡&. $e»ïsž…ƒ©œæÛعSàÔ5OÙ%½–änQrñºöñëáÙÅéõ& .Oþ€éçÕéñ›ÐÝÓÓs*Aǩݲ¦æÉ:íó Ë<úE¥±É,1EÄ´É7F» ¢·Ä‡þúÎ$I½Z†C3ꎕÅÜœáÂÂ6+Ѭ’jœˆW!ŒFS‰qy+¨¾o•d[í&QР(ưÊjOƒ»0„qÒ~9R˜¥\VĹq2µ«/2¦“Wùªè&WÒR‚ÅgNœé×EùsÌ©)ˆpAÄ*ËàÛU”xjµÅ×:ïdüƒi½ÆÏ³˜ÔôV‰F„3Õ§ˆÊ=åYioèbæ„ØdL™Dyè*ßPa¯}n¥3ã,y ‹Á¤BTHOZ…⥿…&åØM8À%˜$רE3w´I½rIA$qÑpÍ3n¿Ìøµ´½£°Ä2@MµÊ%À.ÅõoW~¸"=ÈЫtuŠÍa\ DZ¬%= ÜÍ9 èžyšœ_µ¬6õ¾Õ#˦qšq˜QN$_uÌùvz/öZˆ8ý"Þ†|&LÔ!èöØ & ¾ì‚P‚N‹ê™TdähÖ2³äáUPnMñò"éKk³’£j•}o‚C-,Û’~SʶÊÐÿè¤jà xM½d4t%ã(JMPh4c×Qz e‡”ÕÚ¾W£¢çJ2^J}õŠ œypjÐüÌ”ÒJ–2»µk ²@ù¥§\â-ô$„ôõ©>@Ú+ 1|õJ­¡ÿpxP-ôã²cAÞö‡¨Rá%sÈ*Ç…³c´ï9Sû+½¢Ûœ™µÕHêbW;’ÇÌ Î‹l<¬¯ÉÙ°†#r~)ùåÚÚs²—pÕ†“.Ö•Ø/›¯ø$™0UËz°nTCÓ°аzL”€5ÐþuaŽdùÙ°FŠšÜ/aN&šEžÙÍw#x7Bo‹ógªt2ƒ‚$› ˜Á{+ÇŽ’ð+*Óר+9ËžÑÏf“‹6 hoΫ”ߘÑ{ÅÖ¸Znùm^Ī}=‚Sø“õG9‡–kúñt½TÕÿbä†K¡«¹Ù+9[¶SZè"ÏdÒmÙAѯ-øºl¦ÙÙ dÅ]Á„]Ú¦ÒéiQŒî®!¯Š“AÏ|Ú©‰#—óÏzmnù[7k-„KÀfM~Ó»òû¦Ímîµt÷‚ò•lU0’÷ÃìËeC,T˜*Ý+³Œ¯m"F ³1üOF/Y`Χ•Ž«QJbdø¸*ˆ‰ Z%Z,Qt6{wÏöŒ \—r=¦€˜ԓغK¨¾:Pfí¸$ÎüÚÈöwúµYÄAµÝf>¢ \Ü6h³‡BWáÎ8’º÷bñE5ÝòöSåÁ’‡\ØJ'VwclÌÀ¼àëʉ-qmæ0…¶´P¼Ð–z{@ªå<¥\¼/i¯7zöì_½ÐZÜh|ZâæQb œdéöóÎsz]CÊUϣų_¥ÉæÖV÷Û[ÁÿñmêßãM ’o‘àÎ Å›ÍÕ!Á’×ãá5ÇßJœ¤‹VY?W÷ÒÅÙ¹Q¦›Ñ?±þ±˜Uíº”¢ÒrµvŽlÍl..‹.I-¸9íÿÀÛöÝ{ü£èϘþŒÌŒ¦—HVvôèó þ=ïkÖw”¹…¶ö>%Uf¡½ª¡ªgÍÕ܉ly>ó9VcÑùg0ÁL‡ú9šQýÒC¤µj›Ë ¬ŠÏ±ˆ–œGU zŸ¥|—œÇØœôé—Ñ´<àúù[.:³ÉøZÌÜÁr)h%f9[>YOÖå¿ùþßέ"ÓzœûŸÜÿØÙÙ+ïîíîÓå®ýí­õý¿ß¢œ¼>?þ~€Añr Ú´_Q"ôÝÙÅ«³«#èYÚE'å„]•»ÖÙÅàúøüüˆ/ÆÐ­‹¶kœÁëZ¾”W-Ë<4ªk…VãË''Ÿÿr¯ŸêWÛqZwPcˆ¤ºûŠ ‰¤Ÿ,Þw>°é„\dÙ`£ÃÆ_áé¸qª(:è{±ÝÓŒ«<(ïMeð¥-Ra&÷”kMðÿƒù_޶ÿ(ógõüßÞÙß–û¿ý^¿ßߣû¿[ýþzþÿ¥ó® '*œºex‡I)¼Õ×`ßË•+3;×?ÀõÉ›Á›«ã?Cš[Ûpéæ1e3ý/úM«3ø.Ž<-g?¼kë4ËÁ ø×®ogþ.0±üùâòÍàl`u¾«:KoïÚwf™ò¨ªÇqõ8²:g&7­j#ªå$ÕzoupõA'àëÝÈ0ö©@:¤¤FgœÃò õêtpruöæúìòÂꜿ¡ï¥ltè—çà 3ÐIÞ'2×q¤œ´"zeâŠù5Éå~ <‹]éV#–ñ×EØ:,Í% ‚]¿þ.ŽàŒ±y#”x±à«wl.P©(ïÀôÛN˜ÅF/0r0 MJ%©ÙxŰ¼Ôܸˆs\tt/U?AjnçQ2-Þà{²L*]9 ¬i>u0qîðZreý”ÉÎ!4“ß/¹„i3´æX‰˜5ß‹4ŠóñlVK46³.ÅXðCL䯭¹¹6×l„¹³6°¦5PZS¼(ˆéôMÐc!9µ¦«Ë’]·ÊUÂøJÀ§Æ´t¨wal­µÖ µËh ìzun>r3–Ý´NâdÊ qÖÑ}A¾Þ9c‰²Ä@ÙåjôÜ ,›†JkZƒ‡%o¡×Õ©/Z-Iä¶¶Ö¶8“Î|}ââúP¸ZÕ‘ñ&ÎŽpª¦Y^ŸÓæ¬íxÄëAo‘ëÌ9n->[©¢[Ãtò.¬hSW$í€e]×L8àëæ¸º$½y a˜¡~†|Ï:‰\€e”’Êå¦ÚÔ8íÜt6i÷‚…OºRõåèÔÒ û‰ò:GƒÕÎDAfÄ  SùÏM³,ÄÏ5<õvÈÕ‡\@bü’4ö œc7|NÖ§(#GT–£Wœc'‡±ƒp…´y?EðUTޱ«œ‡ÇkÇšùòÕ_„q¸ilö@>P©üžØe…K‡twB[}æfÚÀÌ2!‹béHz×$ßxú§ãßœŸô+]iH\9=…ãóÁ%Jy hÿ®µÉo­ð•ÿtýÃå•5óŸQì¹ÿŒÒZ/x×e]Öe]Öe]Öe]Öe]Öe]Öe]Öe]Öe]Öe]Öe]Öå?³ü ((g$Pnetdiag-1.2/tcpblast-20011111/docs/orig/tcpspray.tar.gz000066400000000000000000000070201323731111400223460ustar00rootroot00000000000000‹¸q)íZySÜF÷¿£Oñ2Žc ™“ÃÄœ%'T0P ®lÖvQ©…Th$EÇà‰‹ýìûŽÖ1˜líâ¤uŒ¤î÷úõïýúÈì8k>xôp677€~WŸ­óïh]~ulŒ†£µÕÍÍÖŽÖ†ÃG°ñè3”<ͬàÑÅÔþd»tžfjš>ú‹•¬ÐñзBÿÏ´ÞoÑÿhs¸ùLô?¢?|­­7Á°Ñÿƒ—ÁŠ+¢ˆÊz0õ‡XUÖN••扂ÌK¢ü‹ó "<+pÁœù8~j[‰Ó+tÀ̓@>+Û‹:àäq >Ô{; Ceg~Ö{ù!Q°ç%~šÍá[ÔÉ?~Í£,‰Â¾M_Ô[ŽV£Áó!Šê‡~æ[ c_”-à›ÁæàùزÂ^CæOU\?I3H’ÌT’¢D40ŒÇ~h¹£àÛPeΤィ}J3ÇèSíÛÔ ‚È^úˆ–2Èæ±J—èñsÙ—*»ùäZâ‚øø7ðC©p”‹ïðrÿÕ÷‡?þµ£áêz«5X¬²ò ˜ 0—©ÿ›?…Ñ%©FwD„H5\ óéD%¤K¡fÒáñP2•„`{è!+QŒŽr±ÍÄRAøYI yª˜ÌáBeØÈ\뱦õC´“‡âtéW%ɶaˆÑ…ÊÊ`jÙInMáÒzþ+d´­LAâ_x>ùáE®üÌCÓJ}ˆ“(‹ßBinˆƒóóÝÓÆô*oã³—{çç%Rm~èhãø`D)ˆ)ľsžuAˆ…$ýލh¼DCprƒíR¬‚ÝÙé›ýr4ôæ¨ VèK®W»‡ãª=¿9¬ð'¢À> ôËM¡ÝgÇÈQ!jžd¢Šm£öñÑ@2ªTn`]ÀŽt²ÝÒãÀÑp8@`+ ®–CV¨ãÁ'aDb "Ìf·2#nèË“(õ³yÙÖ]lKXlj "ìi’».š=›•ëŠU‚-ýGª¡¦ðY®DÙÊÇ.ÐüÀ²²Š<ÝM&*ËÑèåQ•±uš%¹q š¡ëмƒzF¸·[‚…CÖŸfFY®äPŠõLBÜÇÒ±å”ÙQAfé®™.•OÔv‘ƒB)Œë" 6¿P¡JКí(Ñ+«ñØ!Ú>³.mͼN: SqÛ¯¯†I¡ÎrœäœºöCcñ•+±P:Ö4^„f€2¬x±`_| öô ¡…HQt™Çéiª’“ÒƒÓ“o£……Y2gq„µGÜ"A E&G¥vâLj¨n¶`ë“@bìN-o¦@ëLŒ¾:ÂvDÎ!ñ•‘ؤ8\p¹Éþ»ÖÔæ(Š–a»õÇÊbv8€°([”‹hî’Ê‹Åù£Éœ@b\Þ ªï;eÇ^Œl«e?MŠÍ «dåÜCðâÞ ïœ&J…DŒ‰Ås³ª‘Ñ0¼JU Â‹Ì«¤¥´>Jh™Zó fËÙÓUŒA”çD"Vi ßÝ%L‰§V{¡øZçý”°1eñü¼ˆIMÿ`”h„討(AT®h¦KK{C_\ö$±ÉˆæÇ•óÔ’F]ʤ/­³üœÂQ§ì» 27haYãHúm)Û]æü³•„ˆóðŠzÅuhJCGQ2GQâM3E5vb¯ô8*W” s¾K³fO Ë2Js\ô÷2¥/=¬€\Ûw;OÙ5vTˆkñ‰ºÁšš¢£P"¹Ž57¿Òé¿(|Áà+1ê•0ç·¸r- Íê`”ù{E¯Ç3²(rˆs+%døHé¾”Y!}ÒÞc´p!ú‘¬šqR6ñ^âЭ%” óZ«> É ¤U‚º*o×ô¥ùzG– ô^ Ô«¾­ëbPµn±ªp×wx7á^оóÔ#C¸‘AÜÔ‰¢]Š%´îRFkQßRް½ £ú¼CA[ÒËÒö~¯‰ü÷ýÝ,ás¨ùºšûeɽ¦¬Ê;B§ŸÍÎiÅÝ“…¸~íÀ×e3ÍμA–/ÑåL8 ]9*ý¡¥°³SÓ©æ'\r?qiÁ….#Ÿ ûk.\rÝ íܘ¦xÝšüz.H öM[ºWc¨ð¢U× ¯>§~–-ÆÀ¥àô¿Ûü­Êy@ƒç¥ðdñ÷F¾þ=Qïÿ䶸÷ùÃÞi÷ǽ‡TóõŸ"ä•Ñå!£ÔÂ^Á$á«A|e!L_É–o…+EC¬àmGÙ.Ö0Bæ!&å©¿EÓ‰¯x³Ô‘ÜŽ}«ÖãEg·í®Hg²Q‹è„QØ£ÕA±'ýÄá%¢æ°¬Û–Q ¡µ@o\/ »7¶ýoIí¹9-Pámoöÿ)úçÑ¿IájôÊò]^|¼ç—úÞ t£Go¦OT„îj¨ªÃ‡bŸxéÄ¡Ü@½•'fI'U)LUJC½fR?« µ›Å™ÛÝ},Â[6Œ+Ã{éß[öUM¶ý2™—;ÐÃÒ6¯GMù«Üÿxm]*2ˆ‡¹ÿó‰ûë«ëÅýgÏ6èþÏêææZsÿãs”½W‡»?ŒqÒ:6¾?8zypºƒzÏIQé–ý³álïd|rºû Œ ½ºÇvQ2zþ|Ô6úãáh÷õ~à]OgG&fÔAíþñ¶–/ƒ‹ñ/GÇ'ヱÑÿ¾êü-½½ëÍ LåQU^õ81úEJY} é+ç–Æ{£Ytý̇¯7‚±K-h¤ÃjtÀ©'¿‘P/÷Ç{§'gÇGFÿð„êKÙè0!ÇÂEæSʧ‹;¼ RÜfÁ‘r®‰è•ùfr“4V¶ïúÊ1ø8‡ÎÒ±”koÂÖgiŽYDèìF8‚ÆæD(-p"ÁWY¶W\LPaÖ‡Ÿ} áVF…^`baî[:&C’bc 3T–~9ªpe˜Ë“tt!%Q¿æ~¢äÆçÀr=®°'ÃÂ,Җ㇚æ óÝ> ¯%WÆ›T6Ž¡…´ü–»A&C[\¯(3–{`‘&QæÛQ)_ö#‹Y—Âü¹ßUÜYj6ÁZXÛ+­)Îå#:WôXH¾Ù@å$î”É>ÂøRÀ§Q”ñ×»± ¶ÖZ7ÒýÚ%ì†un.r+,»mìEñœ¢×Ñí¾¨´`‰²2@Ùå"ÞÒ “†J«îC4ÞA)Ϊs&´ZIÈÝ@­-lq ¹úŒ'Àe>â1ªCª.zG0× “4«ûtq‡v<áeœs“ëÂÉQ->‰¢Ëlt¢'¬hÏR$íƒaœÕLØç˸($½9 a˜ ¡œñ|«/õü¸€B€Q(%‘k+5רï_ô»´Šç`aGÓ˜Žš«¾`š!c?UŽö ¢Ú™ÈO 1ÈaªøÙ-VsX]ÃSߟ„L}È$Æ/N"'G»H”•1\¥1rDeXz¡èYxÂЮÿÁWa9ÄŽ î]›¢Óþ?w_Ÿîõ+ÝéKdß߇ÝÃñ1ZÎ)Ä4ó›N—ßd¾ÀWn¸ûæìÇãScá>°¹t¸Ó¬?›Ò”¦4¥)MiJSšÒ”¦4¥)MiJSšÒ”¦4¥)MiJSšÒ”¦4¥)Máòä˜÷:Pnetdiag-1.2/tcpblast-20011111/docs/orig/ttcp-1.13.tar.Z000066400000000000000000000316141323731111400216320ustar00rootroot00000000000000tèŒÓ"†‹3^4 ³¦Œ™4lʘH±¢Å‹3jÜȱcÅ0`Ø A6FÚ¸aÄ )m´A³&2jм²L0n”CÆ 2NÂðÈ´©Ó§P1Ö™C'Œš¬º)£&jÆ4mÌxK¶¬Ù³hÓš2¤Ç™1c 1Â$È‘)=Z<‘¡@)OŽô8PÁ!Jð’@ñ7p oú†aÃFˆÅ¤è;“$Bð¶`ãf£ç¼ÓN_Ì€5[^|8ñæ$ö°íƒúÍe —QÔž’"øçз[P•“Îï¾iJW¥¬CA‚èT'Ÿn1u7jè„íÄ ªoä”y!&ú òš­cŸ¾½{‹ï#KÂÃÐéˆx°*ôF.a‚íV±+ÕhNRUwÈmn›q ô†ã§e&j¸›~ŠÜ“¿ðèàûÞ\Ô®‚@†ƒ!s ûÓe–co·Éâ±¢ó{£Ó :ðɽ4³÷¹!.a‡ûÓ9ß è@ño[ÜÞøj ‘ªÔBvqL Q€"@…é^5a…åv©€t(] @Vù¶é7H‹T'ŠÕßXTÁ_qϲœ[!BM½êWGuXæôó†7s>;ÓžÆZ/Z¡bì’4¥w €4T¨«æ»;ÛÜPiÌuV!Cq²=ÖQ]¾q®,¼L3ôç _uƒxsÅ'3„½ £»ÈkU„í½*c×g±è U ðÖÅ&VØ×‰©R€¯n÷õv±_ý4¼œåZVK0aMËŸ,5hå‡9ÍŽwÈéÙ0Ä 2x^´¥¨ÑÓË“©ÃÇPÁ;O0¬|šç¦­e5‹c¬éS†û­Öï|ëéìçmºVZßWø×}-S.¥B/ÿçzˆ1ï¥Ææ@ ö`Seaºäy d2Å—t¹K•J 0ÅãKÁ¦ù—0Ô÷'fS*’RzÛ—0èÇsXßÑjX£fcƒ5ûG/ƒ/}b`aÐW"€2€wF~‹bc¨| ¨zåm¿Â[-V/ïÃ6¶Æƒ)5/f„­2„WQ4ªqY=¸V €š6mmPme€;R#]ó0æzò-Ÿ1E£ˆ3؈!ñÁCFòC@!DLr§[bDS’r°JtL©šº©jñ* ’6eSCcR.CªŸj!ƒ"G×3&'¶"c8f³ ñh± jÝV4 •05Ī×bˆÕ÷Wϸè’UæWz‘‚z-y(8(|䢪ªŠ(sð,ñX4q3[[%51€&¯˜l/Yz"f¸i<×Ú58,I3-î:®›Áª qr[ÁV¶ SÐ `óÕ2ðêN*Ø)¶^,†®[á¯Y0V0*r­Màu,)6šz¥†dËF¢7!]ƒ;1€Auqy­>Â8CP.SÐaˆ(j¸SSFzö"0—•2¸ÓiÐ Ðu0ǵU& ײ~÷'´I6 "Ó8P«Ak±!6Úò}8g’0SÅR4@BV,•lRµ €‹Í2HGIXÊ.¶¸…ì‚{9Ê£¯Æ º{Wá7fr0b£ª  i¢&s #oPišfdwd@1‚2+dP–gÒ›ƒC]ÚAUåU}†Ër³¢,‡"ƒŒHˆ'™eì‚K€;n A<(K˜ÓeeNÛ ªœÆ{ z˜½Êƒ¿ 1€;j’ i4ÚõR@_ ³E )b¥R`E`Œ¼Ë®ku ºˆ‡©&—é/®G/…¥Y¥e& ª @ 38Á54ºåŒ{’Œw=c1†{WB“0ˆ‡·v/pÌ!/å:g”¡¹Ê²¢t„Áf¸ @•‚2­9y[ò-'£< .À ¨¶d°]="0;$€,–U–a"›B"@x# fÀ]°òªž íÇÔ›¢&ýÔQý [¯hbÕNmµY=Õm!/O­Lé”bS4ó\ÏH£4ýŒYs£&Ž")M3¯^}Ò,Ç.')<€Eß".€> ×lÂ×|bO´÷ƒ]Ø(}Ø}­ØÒ%'mØ-—Ø< 4ÃB•ýØ—í×lSM“ÑÙ{Ù< 2yÀ(¤ Ù˜ý'•ÊØ„mÙˆ ÚžòtÚɲڟ­Øµ­Éº=Ûö¤ZG/@.±íÙÀÍ­Z¶=¿mÚVÁ1Å­ZÏÙªE‚}Ü¥Ù­fÛQÕØ:óÔËaZ"UèwyÒRÐdðÉk›Ü¦ÝÝrœÛÚÍÚ´]`Ø•=Þ"ÃUSÑ1’² Zþ]Þ—uÞþ}Y¸4_^—Ex}`ÔK-2kEÊEÀFÀ$']l ,²=ßµ]dû[Ô}qàP'_ -‹7á.-]äýâ1>ã¬.Ó„çâ ãd ãÚ‚ƒÃMx…—£º5.¢{m0K„—{f@;€>fmµUl¾XišLÖБ£19M²V 2@Wžå è@;}œìÕ1­´æl~7QLygclÂæÕ¹»É„Ó€sæH¡æámµ<†c‰Ã Ü\"ºxÝëu’’×¹§Aw™09 kþÔZéçQ,˜€.æÉôé9í–*€æˆÎæi)^æKž0.ç›nçOJ9¸ ¸7dà£ÎÃHf&µžèPZ<ðl;`ž{ëzê;à#Ðí4ñÔš&5óZÆT‘ñØ)ÎÅáÕ*æPX(î9=¼1ÐéVKW™¸è`>çdëV‹ç<Èç¹@ï“0Áº¥ïLÒù†»ƒQwPGé˾·Ü뽄ÎéÆ.ð ó(§‘/ð¸Ãë= éúûo]—Øù®64ê/ÅÎæ?Äi+ày"²=@ò!I¬â'¸sÎZ£3¬ŠâàªyðLéö+!/ÞÅóáØá1|ìÂÞmù._`6'!ÏæjŒ¹(ðí&{«A(øóVû媋‚ìlrî7Wam é ð 'Àï™Çœ¯i•–ÓÞÙÄU»pßù],0ó Àª›Fè癞ÆÕ³~/ŸŠ÷“‚å|ïôtCM€YOšÓJŸs“ïubZhà¬Z&p‘,ƒËwE`˜+(yíâT\Bär@x¹öwøäÄH»0ª¿s1Ì^8û¬?çRjg ä1}vnÓ„.\`vÙê1–Ñ? ³-ì¥qÓ4L÷¤-]À´Tà>Ò?WÁüÎo&<•yÕýŽLX`ÕÃ:`ýÅÿ¾§1#P(}®L ãPÎk|^gµ[ªFi¬ó»Ý÷}áýY‡H’€MÚ‘! ƒ ø¾œûKÁ‹Ýu"Hc®‚(B_«ÿ/_¬R¼þÃH¥8½Ã1^àÑ«e 0À÷%Œ÷beÑÈɳ¹(ß™V]î­á•ø’+òKp®Ëh.ÁÔêÖê:Ln .É¥ø@XuÇEóЋLWÿ¦J4†)aÀxýÞ—H¯FY’w¾~ ·ñQˤ ¶2à‹(cRNÊè£-`âzœ ¡ÃÃ)„G¯2\0ý%,p¸¶Ç­Ð4/ÏF­@÷º“ÝÛMŒH¾ ·iX@|èéÙðøz€O ‡q Ùôº»Ð <@vˆF ÖË žýÇZ²`#¢èÐ6Y5 #÷û°0¡÷ˆž óHÈ.ôBà ç)§°~@!Píd¹H‡Œ"í‹ –&¤k8.)溤_‘@úÑ\ R`¾/*¦HåkSÄ2Øt†k¾ÍõñÙb±˜ Ì%‹Z`b¾ÐŠ9°Šè„gøl¡ØžøäSCµ€9¡ڶ¡NbÆ{ í0ÐT 6ï ì#6âÀœBŒG-<¸eÁ}<¢Ü`_óï4Ô·hab@Ó z}Á¼4p(\ÛÔ#<:‘'Ƨ9ðc]ß1E1( TáU¾@}“Eñ$J Ìå£ TLS.G9©‡¢†eª+*E‰ÓóŠbîi\‘ðè¾xAöðFWTJÑ¥Q“.Å(¦ž p} /89ÀûÆ à}v`3äž¾¨¢ P€‘ð¸Xö’ØÀˆsõ9Å6Dx®CŽJî:T¾(Þ‚=ÑÅá 0 ߀óÊ@fœ-ñ €îùú„8닱¥3ÚÜ!ŠU¨v@* t€Ð•Á è8 ‚€x:@¤€ârZA(‹Ñ R±f±¡c_ЈÆ_œ!p „ÎPzL¯cºs7óöɲX•±m…³·X¼c0Dã1=N°YµFv”'@tÇ™k]y¤éñ>ž=2°ÑG÷s89í &uä£ydr=ž"°Õ[éiaCoͼ…Á'z^| q#n 30ÄÌÀ £$ &Z‡&:‡;q~d¢š¤ƒaˆ! ;†æFZ¡àþ °~ÊѨ±8ôñ ë#v”öË= º ‘ÓhÅND»¯3vE" í£„dò;&“YBèœd€’wƒ÷MÉïX%¤vœYÒ &<ƒ—ÓB€¤ó^²LªGíÒdðj’uâKFÉ30&çãyŒÚ±¤ÉY÷!©äŸ´’ÚѤÉ0òˆBœ<”f?4©ALÝ×z’{²OI@‰Ÿ¥L&TObÊ0)%%„D”øQ TH>ÈÞ>™’e«ÌḛVyÊRÙ*›yWo¡¤.™'Á¤”à“B2DÎ<‰£è€‰Ä"® $±È€8 ŒÜK3’ XP+«@)«•ªÌZÊÁ¹#ý )1@²+5Œaxþ#¤œ“øÑ ¤É¶HèTÀž4•F]ž=*&ßáåã;ÎÎ\žJ­qé€{_ïø™F­‘@Á4<(ÀŸx:WÁ«é >è+£Ã¡èM²3ŽÛ 3&i˜éñ²„Š>¡ç\ 0‹çÇá€;|ÉÊXa>,,Çôý2æ°[ža „¨5(¦—D¤8ð”P²0£#›óC—Y9ô‘2Á‚ X yïúdÓäoPõuɲIA$‰cš1nFµãž&ß,rhSµüM¨4…$¹Lj:ƒ7ˆ8a4)&_Œqn¡OùCïØ&UXŽ8-§9*Àª…Þó‰"l Bï‚$®Ì›Osošž«‚‘æf‘k> ÎÛÆ(ä£Èy dŠ=p2%£Ù„êìuÆÎÁ<åì”ïO\vM­f0Àf›§Ó ü¸Ôé§ë”q¿3XÞÍô:ãfߜֳIÒM8`8ùŠy°Z²ây.Mƒ <ºçÞ¼“¤N”ЫÆdSqPsuNMB¬&ÖÔšÏÎ&<5ž±¾è…@Ë\¯NbªI7pY¨ç€Ÿ ÍqL!XÜG±¨t&Í`âšÉ0µÆYv bfÐÚ@¡&üŒŸ¶ƒ~š’)™¯#Å$”& ‹¹ÏX¬ãÞ« 3´ÜyDO¤£~†¼d'cru²¥ÙB5c´ˆ²+§­FØDo(`Ì­€JÙ1'ÆŒ&ssvNŽ :¨74F4Š–º¸ë6Ç”]+@‰Rѽ4óZ€j¤ˆŽñ"š >)»äÇ­&csP£LWìèÝK™‘b*ÌzCi±ÇE&Kë`–%Að—Ôh–ô€@`—™¤•tsí%Lú(iÌ3%˜Tä=-ÉôÖ„%M&ÆëV“Tš'6HJù¤¥+‚€BJ&6c®T&(é^éŒCz2iФ-Ó#a=”Jƒ)k¦D–ÒR^j,Oä/Õi4¡˜ ÔÀS¤)7¿îˆ€Y'’£è¥öîrVFÅÉA£M`¦¾t‘ÎÒFjBZ`$]˜ô”šxªI« 'õ¤ãŽSPEJg‰@>g­£}"ÊRÎ0TV¿iŸD˜õ‹e1n'añ…%><ÐTQ'p‡‘G }Ø›UM@õª&2Ç:W±êcÉ*Sµ­¥UuÈç™ZUk²(«J¶ç Ùw8iëj4²ÊÌNU!ç‘äæd}›6¶ |Õ¼©c¡«ŸÍU"#µfWPK`kM­¿ åá`”î¸g‚¿z&9 6zv[Oa]Äa‘)Á€´ºÊvÜZh§@/àš ¬G)€žO*t…Ê W¡&hߨ<ÛÃìò´8 6^9XôfÉlŠ•´ºµÅbØ«a™‡}®vÄZ-»>K쉲à¶ÂŠÛ ÛÆ+µ³áÏBÉ­Ði­xí³PñÏ¢X)µhwiçà’*%½L$§ZÆd“Ûhd®jºTêh¥j˜‡^%ÞRÕwUçde¸}w˜4Kúmhõ³7ÈŽÉ=_ª*«´;N[0Š?‘iB‘#S$Ük"q¹›±nàÜÊIa7®U…¹W«âÜ8‹>LÎ-¹–ê Ð)t1E¥ C©•&̪Q‘%Gu¤Fn¾»Qÿ¬©§VpžŒ7è§Õu ¨ofÌa[0 &ST³O±(&×¶0^eD¨k’O@Gh§5ÔƒåøW!÷Œ“‘ét9¯è£þ«AX)—ü²&Ò¼Ò SÀWLa&–ÂVÞ›°â²­®éÅ/)Ѐ=Ù’lp$†‚€Ï‹0ÊTn­¼c®8\ÑÜ«÷bšI£ïÔ ÈG„©y£E祽~"ôfÒÑ[Lï ¡¸f«(PT+uèæ5š6¡õF‹Õx2zÀV\;„÷nÉ59‡&䕳îÈœ¼%…D|5Ì.Þ„ÁrZó¥ F“æÅ_I7v¢˜›è—&lJ6'ŠÀ0" Ýê_šÐ~ÅL¾Är´ôîVŤ©w0 ¾ù—–úÞ¹|ç¯|¤¥[Ï< <ó²¯ËHÜWŸ~_~Qi ÿê=›°ÍDf¼%øÔŽà¹«A?¬Ô5¼¼6ñ^F<1ûêã•Áè£õ–Ìî+õX¦ø-¥è‡’šƒiòµ½•´òÎ_ݛӶpï}ˆ àÓôÈ6¨¿¨¾J8{_©w{]ðøÂ `hŠÙ* k¯Q’„¨t gNÁr2p Ã]˜³ÏAŒ0ùî( 3©€Qλ%UÌ»|‹hÖ9ån‰u1tJ]FÌ=/XT¾¬•Þg÷|¥ô¡œXò\aPLD±óµZ¨7ú šŠ=1èý+Ë•’ÞWÌU@¨)žÅ¨øø~b\Šw1)†Å¾XQùÀS¢=ÙtS£ôÒg Õß忳â0Õ_&f66{TÃ[‡®«H9ªÖp¤ÒÔ2”€©1–À“ˆZÇ2`€aŽšˆb4µO+ _S­aˆ´©ÿè¦"@ˆR­QƒWâdP‰=ÅX–=Pƒ_À7¶Ä“Q–zNª×e_ç˜D¤c°Ža@;N3ÚW1Q.Ù‰A 9í·<“¼uF?È¥69 dÌZKEšH o4ä”h‰ &9þ¥YtldJj4&I„,#s ¼DCì±@2¸ƒ)8û”’ŸrK~ÓÅÇä€,²ÎЈ³ªºh ‹Y"qSR1€å†”´Zž¶F-ߙȖ²Yž’?9Y¢ã9 Ž?ªxÉÊ0 Ïdh\¦dDžQ5Š"gT‹\Ž1²ÎØË–Au¡>ÎÇ‘G¸Ê/ùË䮌Y5 µo olA%W!D^æ¨ÀÏcLÉÐl”ºb ‹>ñ&R ÃØïâ8fÌ¿2CT}7´²`îÊSrx¤ ¨x+ãif_"ÀcÒkjˆW³®ÁÉV¼æF¬V«lžsµy1g ›Í.8ÍÌ[y0géÜ$ïì3±Œ'ŒÍ„o•¬ð´ç£xqðbœÏ&¦aFëÀ™DeTÂêöÆa&!¥.€ebˆ•LðÀ 0˜saŽ|œUÀ@ÈÇ„n5æcí !ô8%ϳY²Ú¶¸ÅÀfŠiB1b? Ó¢ŒI&[àWñLå:'‹*{6T@ž!”kC}ÑPY§‰ä\&À)´xb'ÍEc$=–C “>tSƒ¾âÐ2Ù/!„Ž&O=ÚÀýèÑ+†ô(ÒÆË<$é}&¥p™ÔÑø)KÓgX,ó,—ÒºËH‹é&=§¡ôh¶›’?KH¥¦Ga›†’oú)ç²&&§­XÒcQÓé'­¤ï4-ÍÓò2;Hý§4môÒ„:LjEm§Ëtš8Óò=õi6Hµ.îÒ‚º dê4Áªµ“NÔ¯ºI{ê<í]m‚z #ŒhÔ9ýÒºÃ{æ sÔ7†÷Ô¨@TÉ€³¥YÈ1A–ĸS¿¾úÉÒQ±¶ZÈBY ‡ö-ô·qšÇ Š»Ñ­AÀXD¥±(öjs݈éúé8êº\E:`‚‡ˆ×ܦ;œkCßb‚¥•ïm3x*tx xÖùZ?õ‰ !0÷ ŒT™4hÜ«ø `¶Á <¶Z>ᖛ㶀³ACE+WiM'ÌU2Qr6¡¾Eà™QvMxjAÀºÜ™Ðc€xÆš"Ж€˜€R9_  ,ðdDHHE`ÎVר á$œŠ£×î:: âÌ&øtÚbÚfcìš4˜vˆpõ­jÛ'ž”¨5U;T€íc-?lö·;Gi#i­½¢»¶€p îimñ4µ“IÚŸy;kk­Mì6ÞÛP[nôgÕHµ­6ƒ›‰m[ ¼m£}´‹ÃÜÜ z`K‚m¥¶I[× ; D••!Vr'ž @À‰½¦Iv}Sp*àtnŽýßê›XW*@u‹ìšpºa'Ô.Ût"ª €;²ÑlâÞœŽ<óØ 1@߬óT,Œ‰àƒ¥ÆÄF#h,%T•I‹‹8ïn†ÅX7êé~ž(À kÈêâl7îNŽºnxl0ÜÐpÎÉܠq§[(ôv_ €zóŠ ®·Mi*—{_+ï­¤¢xÄV‘ª²€’¢#ærPÑNÐuk™Ut ¨Œ.n~OÅ:@3¸Ë Þ NX[9ëо78eɤÆ%¾TƘÆÒÊ@A| <Ó:Èïtm¿ñ·•ÒßX,hDçP¾Gw•Cßê»ƒß ö­Á/ËínX¼ÓQ£ë†mø÷þ&á"·¾yð,UX&À°8S²/6rgËÅ5g §úÔŽ@ñÈÆ(ƒZzm¯M¬úΤI|ä,q,6¬G±uøÆ„EŠí¨Ýôè[¾hYoòa¹ávÜÎŒm¼xä8-^â h58ñ=¾ëöÆÇ›Ë7‡;ª|rдg┤×DÎŽÇp«€«x ¡¼«ºrXþµ±ö)¯×ÝB•ãq”±ËŸà”¤Æt‚³ýîëdÈ\Ž)@‘mÅÝÈ)wH¸Æè™9Õ©q´ûƒ„fNÕ¸šWÆ[=¢ù¾pÍ-N^Sç).àP€ðâr xáã…“W÷רî9„WkpÎq=/á-<…£7€Gçf¸a\{<Ÿ³nxÌÀ6‡ç¦¾9E:qÐo€™sñù;t“{ÒÀßÍQ¡"3š=s¼öãþnÃüqœsž·¹‰I©.$¬€aËÑI:â^æ&FÂÀ—Òa:#/Úq{¥ÓÒ–~·kùK'ä2Ý£;m“ÎÈS: Ðés6 õŸ®¸ƒzO_Û t‘oLœ~´+c²ÉiÑ¢ øî½M>¾ÆV'ä(]F„á¬þÕ›º(ë'ª?s¥¶V··[Ex $€= „U@\x€BYµº`Ýĺ ÿ$§ué*ð9òh5¹ÀñŠZºM« Û®0Ë!×Ùœ=Swm¾4e38B‰¦)M€”áZ¤€h/U3° i®,®B 8ìž"±/ö1Ú“ÐÚ0£}”öyч€±¸Žý¨ ˶ue{a툽(v–È‘i;HºŠÚðÀmçÈF@·KÞ^|ûîå³\.ïq¬'PÀ³³ÐäÓ&çãóK1Ñ{={%`;ÍÏyJšê¯èª'Ðî1©GxXoçÀ `ô°~Üv7*é™ýmö<þk—‰Û¾q=˜—ò_ž×“ù+]êü©'öâEÕƒV’}MPÐ^ÛÛúg¿ìµ½´·.ôÞ£óDnè°9Ïö3nÞW{mßì±½¾¿÷71xû™çéý¡Ü—‘òì¥i\iê'ªpõ¾çØú~¾ý§ô½>âŸ#PîKu¦¿ø\%ã 5Àôè­ÿÚ+¿åçzp/æÅ½¨×ÑR ä§ù“îS¾GÇ3-ÿåS”Ç}fþÇõ1> è|L?ì¼ÏêÑ* ý¨ï ×€ÑwødÒÊ‹|O ì+¾¦Çøý˜{$¡/öYÃÕ¯ù?^êè!°ô…ý¹'ºÝéÇû/àìÀoúuÿ·cV1÷™Ýÿîxß|üv?Ž>>ÚÏú§ry/Û0Ö¦ïwµôýt:)Ò¯ç<Ñflò„<Ú€xñâä6tØm\îŒ=§^xÚÿùEèèMûßx 1@NòfýïQÄËþþ ü—?W·t¢÷¿ÿÛ¯þÝ?ÙÞý´¿øÃ‘Øoÿ÷5¶¯õŸï‡n¹dàû{yDñ|N8—¯±k™ å±,€§@Fƒ|†Ðåg†QDwŸm€BXêH:§’6Øk]ÅéI]ÁÞjdñQRÉîÀé¥Gžž×x‘€™K€&oéCCåÁy=ßô €Íœ'9 H0&Õ€»^VNõL$`zÔþ€=Ÿ¢‡¤4à[g>~×G–Ó €•zgß=:€åçù€/`›çôYb‡ ˜öo}ÁÿfÃè N€L³½ pØ‹W³‚qr¢—.æ¿ä(‚QŽRåEís²Eàf›™pÒeä@ 8ÈE׸è\ú2%ág! zÍù:ÎÁù5-z䃀ƒ°b£W"¸a]/k`iL8ÈÞ혗Wz´–8Úwe†¥ZEåµô4=¥×Ìó æ4høEŒµbÏÊÿ2ŠIPG2è(P>˜Ñô Î?|`.¤%‚„ßW6—qDµ`â„d%Lʽ{È^Ÿ ùU}a‚­`AèÌ_-Ó!‘ƒs´ÓìjIØ æÉ<-Öùb‚ b7W©¤`àÜW½ÕW€Xhlo Ü*6 –‚ h ‚pQ!¸«)^ ¡"øNt™ ÆŒ™X„ÒyÕ1@\ÞÑ3è‰Ô ¤ XnX4ÉÖqÍXX ¦E‡é[oSq0&Í‚ÎÞ Ðx5c'0…e1†ØÆâÖÒ®p~ñBKVî4²TnòQOø~uL£Ñ™€žDd˜-Ø ÚG9JN3ŒõÓ`EX Ò„Ù`?Ø'ts[Xf~ƒVî4Œo,Ü÷§àÐkäù]sœ[èûå4SAe$Ɖ8 †‰¥ÎIUQ¾¿AVUN_˜UaÅeq9E@(¢— Mºƒ6üBì«àÉFqRr,Ï4ˆ$I@q/$ ep­Hež!hX”ÜGs¨l"Jzà±TóH®€Ö¨Ÿ‚hÁª°Bpbc ¢MЀ¤H1`XVA-B>œ$ÎnH U¤Ö.Ø/{…ˆCÈX#Ëd1Ud+—ŵ²*L ]Š˜ñ7”/¯F,”)P1h€Ùp˜‡ȯ ÈØR.ø1Éîð9”4±NuƆIƒ¨:ò®pì Ø“‚$áGUC |-‚äàhµ-ZáûE‚ _æ’E#Ñ‘€¹€‚,VØráLx .0û ¤!†(Ϧ3géA—%:P˜K¡åº(Àsæ‚'"ýcìM3¢j2¤‰à˜D _(€ƒåˆ+)å_HbwÅ(aÔà=ŽdF=bœWP‰ §¢%n‰\b—è%~‰`b˜(&މdb™h&ž‰hbš¨&®‰lb›è&¾‰pbœ('Ήtbh'Þ‰xbž¨'î‰|bŸè'þ‰€b ((Š^"netdiag-1.2/tcpblast-20011111/docs/orig/ttcp-1.4.tar.gz000066400000000000000000000150431323731111400217570ustar00rootroot00000000000000‹Â2)ttcp-1.4.tarì_<ôû/ÖÖûÏžcï`°þò'èÿu"•?yšÙ ÀO¡—Oí0¼.MþB ýç~V[ h'pÛp=ØÆWüN¼4ƒ“í#p¢0ôœÌÂÀ¾ýÅKÁ®4þGIÏûý!Ú¡ Yb‡éÄKR˜Øç‰ïØ™çÂy>á¦(×ΈFìcó$‰¦f®öëÓÔ><"¼Þ[ëà¯g¦ºÞØÞ¦™7Máü\oâ‡~x=!Ô7ãõ5þý Lú3°-jß·K?DÑó”ÆL~…k?»$pH#ç‹—¥^Fyà iÆŒÕRíG®?aqQì%6?]/!A‘J°ã9°±NüsÒÛîÁ8°³ÌKn;p:>Øbj~ˆdüiœDWÞÔ ³´ƒm_<ØÏó4åážxIr[A¼è:Ywãy¯&ŽÂàçŸÁÎ`ì>Î ¼KìøÒwä^è´3à\ÂxïÝÑÞÑ.dœ{ÀJÆÇ8ñà gÀÆá__z!$žãùW8ªK;—x 6ÆŠ¸Q¸’AE_X) º ÀÍÒmâÙnJtí ˆ®!âßÒ ˆ’:”z¬f;2eú_Y¢÷±ž×ÞÓoJØC4¦¨¶Ÿ ÁÈ;8¶Ûõ·wttx|rv:Þ=>ÞÅ_¿îî0&š0r ¿L#×+%ð;O=ð3ðS˜F‰‡Dã<°“Þè¦âp¦ ¢T@DVÓ(Oaœ(GE†ùô&¬‰ÕëÄÏa(¥Û’*zh5Ý-6Àî!UÍmͦIŸ¢±e—v¶B±àu†Óé#-)‘½ê"ñbXûú‹–›¼©Sê;ìsI”gì” maÈAmd—¨œ?ÍH‚ã'K9âö$þy΃£\y ÝÂߎòst؉¦¶O«}Hƒ9Åjã©?Aï@€#lÐѹÄlp¼=öÝŸaKj»çÀߎ½+?E›€Éþ¶4l<õBtÁFã© u«-¨6¬Ÿ™6ŒbÂ\…×L/|« Cj*‰£³9ê+ ‘Qïòuµ gÎêmNv{õ&Œ#á,æmºJ€é|³Ø\½=ôh¢²UÔèÂvÒÑl‡{¾€¥?%Ù 5‚Ó’;ͯwe¤‘šJH ÖôÇvbO©Y‘LòÔ¾ðà[ƒìa†M’ŸåôÜ¡§”ž†»a¡ûãÓñֻݳñÐÇIRo†Yâ‰Ç³j’ÒœíºÉº Æ"½¸çÒŸ.ì"Ç'} ò9—m¸Ã͹qâ ƒ8qÉYü:J¾èPAj$0tnDAÞ@Çô×Ö‡Œƒm蛑ŽÏßÂ÷¡Ð3vd÷6´ÉSK@¢Ëayk5ªeÈÓ9žC\ÈÉ©µÑ0XahB:}!À1Hs¢p‰AXqÄVéaðo•L‘f”  ›»±"J}|æXù„ž¨O‘T®ä¯”§Û52‚ÒDyÿ™”Ù-&S ·`M‹ˆ`1‘¨ä4âÜ$ܨªâF¥·b.1Ö'§€J -çB=Ä‘JÖ4È÷`|­oŽÜZÿ4…R`oõñª‰¬ŠŠ5Ày”z¥žú#ÉçîœÜI„e‰jsâ°&BI°¦qd¤h$Ú]€}²W˜r ìÛÊ xÙ\¢*f¤0…³I`_Tf˜³¥YÑ·ö)Ò%´9Ö°áÝ`QàPˆîÅú>%‘$ÊjðË&P¸‡n»Ê>‹î?Â+2æÏŸÂO eš” ð0£1Èv4Rm,›Ôdtƒ§Oš¦\"H¾Gc¢¬ró¼+¯6u}²1øyÍ2¹AÃ>Ý9Bpœ6‡ÔôÆÈ¤j\Úñ/²|Ò ÕŠe²KE95ºÙ¦.ndÚlˆ¹þ¬JÕ œ®áËâ)Ýd³R!?uìĵ:ªÊd$T ¢ ª„ë–!þMiŸÖbÙL agoÇD_ˆ=xñlc]É}hžFâêÄ皈슅$êsDúŠÀ•¡L}SÉÉ W˜#œT \ƒ¨Ïvvßœ¾«›(A*3HcÏÁÚÜ!áQ¡‚â¼”qRi—mà¡i_ë¯o(w Q¬Š’D,ó Ѭ{eK”lo¸<ëbå…Á-qœgRrQŠ-0i!w ÝLÂ9Ù:fòKCC9ŠkŸ‡<¤ 1‚K¸ðü¥wçG2„PrÖ d>ݦJY`Ÿ’Â0TÕ‹hr÷«Èwq¼øŒybZÚ-kȯæ1Beê ²¡‰4p}@ŠÄå“›ZõŠû±gZo»Fƒ²i'N]Y•èu¨"x‹š‡kÔGÄ>›Æz ,r˜F”5 ."®~1øP¡·ÛC¦ÙíÆõ¥x&¿¿îÃò2=]}ìÆÿ`4‚•î X€¥Ža¤XuãÏԃ϶c‡ƒK-Xy³²I1¹¡ƒ!¿âà¿  L€8Ü“Ôaú‹`\Ñqñ¿G…×,‚Þè2',ä*()@ì,òÍe=ÖµÏÖ"”@Y×BBJ©’61ÛP†ª$Ich#óر`«œÿ(†¹ Hí²pèWQ¦ã…P[Åhu½ô(ö‡ZQ•}O'F«š¯aÜáÿs&|G&o²½(SEmÞ`™’ˆ x‚«;2ýê%‘iŠwYËR­¶é´‹/Í ûÿ| —: Ú¯SÑ)e\Å ùe -m.!_ÆV±‚ç­˜ïïÈ›ü ¼ZPeUâì¸æ©êÎTá©C+Û_ƇÛïÏvÞoíoòãøäxwk¿ƒsj¡ñõ‹é\&:õÒ껲?t‘K–ÙÒ«‘vêÍÐ"Øó Š!á•·]xkÊT;ÎD†ë(âKÝu!/ø ×ìè†O«7„Ñ ZÞ TÉÂTUóª†Þn³$.šÕµ8 g|øáŒCú*ö9û¤‡µ…÷–£°Ô>[9®µÚ ZvïTzR5hÁPËW\?g¯_c޼”b0Às³Šð…eˆ¨jf仯ã3ÆéT× $šƒûd_ ô¦^°+žl:µ&©Î… Z¬¡dÃ\ŠaÂÕ´‹#4‘äÚOQöëÒf°’§ Ú¶$þiéóµîåÝs²°âø*­B“ $  o e£G2løgîå¼Óÿ?g‹j‹‘‚‹àë­H†ÈjEÄR¡(#Ûq<%Ô²ÆQHon²\ø~ƒ[ ±ç%Ô ¼]Co5±¨ÁRýè>äØÂ.A"˜ (¶,X& 1|cYÑÁÄïX´ ­%ÅâŽW’vŠ4 c‘݉óÌK·0‹l¶¨_,­k¶h®Šë+Wƒ÷¦ÔŠŠ§W (¤Ø'â'ÞÙgÂÚqÂL—¹ÕêÚP;6&è\C*,‚…„i“V·Öï ˜@ºcàu„]ðȦŠÔǼÅx…PÝ.E…Š˜„(L¸êP¬lYòc=¡Z\ªX‚Ùº—I|Ó±L‰g¢JF¼!XŒ«­IPrÜCz¼ˆ(½è¥¬ÊO&©^HWt †ŒQZeqDñii÷ðí’Òšôiú²j“¶™¹W­ÕAJK©A5Û†6 ÊCí_ÓÆ<›’¸˜m…Ç£ŒP6.X– ?'Z‘fT7&ÄaK¢¿3f¤¸ÝH3ÇêÞÑV˜ ¯ÁcYé,»§+ö9DˆWöšxó«£ó½XRh“¹./WôCÆÿ¿XôÀÛhäý¯§ù•ßú«l±U@佄™+¯ ªÍtš«61t7{kÙžSsHƒÛÞ¿YÅh·Ûª¼fÍþ²ÔͰhî&Ü$3©öû05˜² hI»µÊí«tžz1¤6Xî_¶<$çöÑé1éT[¿/¦lNÎIIÍ¥wëÎåmRÞíÀÙ®Ò³’¦#¬8iy@(µKÏħ±%Š\-%T0Í·Š~­ùÙ.Å•œ9Ë^vÿ…)Ñ÷0Ùzi ͧ7÷a•>½?3û´Šá=§Íš¼”ïù`ˆó3Að WcRKmú¦¼á»¨L ±æ‡HÄb„‰ˆÆp“# .I|‰:3Ü©J~$÷{•,”ŠRŽI)áY"º y× ó9ÖáÑQ9TíY# – •]7ÕþÄOYXŒØËý›—o-‹ÃH»MáùµÛ¼¿ÑnK/Om«¨Œ-%ž¡ôé¯lОоQös.õ½®a<Ž_u|uI Éù¸8§ÌüÀÿ*w»øÉ+ë MB;0JßÕæì p¾1ÍÏgcôÄ”Ü{Xmm¿ŸŽww ÁX *–¸¶ŽÏ¥; ŸFÒ¼¨Æ!7“S¿ÑJrš»ê½ºJ—OP>Ò¤ æ²xGCso¥i>åEÆ&üý¿(¬¯ Ö_‚ùáðàÝÙþÖïžø‡OM˜yÞ}­oWô²«3Š8À%`ÙI;¬"­áBð\"”iÖšˆ`ñµÅmŽB~Ã|1Ãü^†ùC ïd¾žÔîî,˜/  #BÑĵoÍ ìkl-º“ÒÊâálûWº|ÐúëéÊp9¯F6bŽY•5ˆ> ¨V|j{”ï5äž§aÁ1ìœÁ ìÁ>>ó](>íªV¥äãµ,³«•‹¬RL‹d1Jû¬Ü¢Áµ º˜- °;3"‹!i¤Q«©’/(T¸Ë?3:¤¿n ‹ŽÂ¿Ãy`wA* ã$û:Å2bà<[ûL{\÷o F?£*ç~eéèAÚ"ø»ÀÒª&ÊBI…N|k’H_ÔÒ®A1ì—U3©b“¸ƒäÜyê\PèÊ,sµß´ËDɰÈö•TxQÅ#ç¦tÚNoåàÔˆlX¥4¶^yíJ¿ŠS“ 8ë^ ¦ŽÐŸE¨ŽJ˜2w«‚ôG†T©k¹HÅ2u¦´•Â5ñè²¥£®Dô†žÔ§.Á EéÏ;|œnUòålHFàV²ÀJ[ˆÞ:×¶Ø"2 -}|2¬Ð§Ž3ìÎæhÎåõÕ›Oc§û)Í+ ÖLsÁ´›ôçÚ¬j¯-EÙN¾‰µ.Éb/]À+ý¯t¯t/Ú馊LO‡Ðî¹~bÊd ^DUgBq?p÷`Ǽ±ŒoRÊ´n,¸ÁºånAG3¤‹EÍSò hŽÑ; ¹ËîÙiœ=¨z]5~H¨´.TúïjWÝàúmŠ@?Rfdl6Q@>Š3c³]Ÿ†äAï…MX–õùZÑ¢lTqüM8úhJuazmÇÐ¥:~]¨9”ÉÌ ~_<(Ò9í¿ôq}„önŸÌ]{5¿X«Ùcøì<ŠÞ *عȡ­_RâmjæÒÕ/»¬GŠòþÇD© ½&K»*¥ÝRú~ãÏÊ»¯¼Š¿¡ÕµÇ{û}bÿ˜™žby{ áãïöÃ*a~{ á½ïöC¾ WX¥¼>†ôá÷HSqR!­^ ­)o/¦Ü®¯0YhÒüÒá­NÝí×úù `­VOxY¡÷G9­`øXùÔ_™+‹¤ÀËp‰¦0XóÅŽt·¨¿• ¨ÐÁz۪˞~ñÒF"úeXÌky 4XÞ©®Á¿.–x´YTáÙnÓŠ  Ú•EãÜ()©” h¨‹†)ý-ÀÁªqRcu ÅØ0—£V!óh^ƒ­Ž´Ž ãj »]•ê*:»˜’Õ‚V ¾Ú m}›/4œ`L[Ï^ôõ!—/‡8Ú€6ßÍ"«:b‚ÜÔÈ3(lð¦¿ú¢/…}ñÒÄ—R•£ &:Oø#™s˜4†æ;ðEoU­l®Pñ>/ޝ$ñµ•5ð¨U0¯z娢Ü~—/ɬJµ?û™ˆªÛçÎl­Ù _Ž1h}C7’TaH;}#úÎïŠpfóa4áâŸâìPïìò>]U…HZÝ*å ShOˆ÷Ú&>],Î'rQ]i©"@MyÔ’ŒpfüªxN`WT<{ÄQÑñ÷f_Ø~¸Yè.leÑb­ÝwçaNƒ†:b|Å·zÕÙï‡oNߎ‹3G¾ba6ŠÒ³zJ¬®_²xZ#åĈ°÷ {~FçU)¼óÔZ´ê¼âãU¯Zý¡~W¡)OË / [!€AO_Jëß÷¸œ]©­ –fPŸÖýŠßðgÊtÏ’‡ò-rì%ôubÊÛ¶Ek4[ÌjoÏB-dpHØ|x š‰÷ÏÜCSq »¼ÎOÒÛZPÚɱCúÆ6ô/MíäV`Êxê–åŠúh5ÎÞòýbþŠ’÷Ÿí)ã]$QÓ¦¶ªïTõ§ŠœS¯ç·p¡hŒ{°+Õ´oŽ?ÈGô­ãT“’MÄ-ýmY=–ôYX\^ä7Âzd/ÚŪĪބFF¬ÈV܈­’ßµ›W$è2‰Å~"8¯Ê3kuz§g<u1IMwP½”¤Xª ކ—R%S&>SÊR¢óiQL]ºîäˆÝ¤W¨?á"ÂwÿôþßùÉô¿ÿ0˜þe-Mm'‰è“,~hôNþ»'ãƒÃÃ#ì.E0à/ÝÜÜ,5zcìÛÚßmðÇoŸ°âÔÿLݼ£oÒT¶CÇcèñ‡Gã½q£÷RÖè¿ø|šìÉ-O“#ø\´§å#öìQ Í'i&ƺ2[oÍ+ÏÿÓÎÕô6ÑûüŠ('Áñ R¤ªšgojBD¶íGKÿ=ïÍxwíÔâ@N›3ž±=3¶<ï-’çËäùÿÔòÛü¯×xmµ¸ùû{dÝ||gP@qEXUŸ·ê¬öó—k™þ0<+"‘ß0‹ë÷7ËÕíòúJ6FP[,Ó1ÉÄRۦыOL&¥‡>jB*·jÕ@Ãa|B œýÊ€iZvº©ö“%²ÚÎ`yZ)·1dä´Øû¦êúAvŠw¶¨Xßt±°³eÕ*̺;Aî+;´õ¦vŸK“egd!&±k:d’'¤×É}ÕÆJN‰ò•v£¿äµ~´ÖE÷ ´&'nµêÇÍm$–,&-HF RTHÚ5 ‘Èàà™Å•pƒ¶"KcD°h(+²ŽF:‡ZOÊÈé,”¡ì©K ¥ÌPV”wóõº§®ÕË…A­þæ[·t:ÿUoÔÖ„à£à”5®(ÿ çH7~…,c ‹ R—#XYâ49 4oȤ»Lš"C/ÏôÌ`À`´‰ryÌ“Dɹ|ItÔy0œ6&4”iÀ,{m;›ÈØ^_™d\¬(8©¢œ-JïŒÄhBÞÖ^OB¾ÕcË®¶Pµm;Ú“skþ¥ð*›Ú4ÉÅ‹1Ú‰Ä,yý‰ÈILÛN>¼ðÃÓ’Ùd 5é(ÌŒoéì ­ …Šî+y4l©£ £ü½:Ùk~Ÿ0\$ª>ÈçßB“¦w²ŽÇÃÓØð,uÈ£Ïm˜Ç”ôɄ̱ƬV%_#]ú¢B8­ê'ͨCÜ.{¨ìOL‘X…<Ã’ˆƒ ™û×Ï$ÿ?ïóŠ7¦Pnetdiag-1.2/tcpblast-20011111/docs/orig/ttcp.c-brl000066400000000000000000000313511323731111400212510ustar00rootroot00000000000000/* * T T C P . C * * Test TCP connection. Makes a connection on port 2000 * and transfers zero buffers or data copied from stdin. * * Usable on 4.2, 4.3, and 4.1a systems by defining one of * BSD42 BSD43 (BSD41a) * * Modified for operation under 4.2BSD, 18 Dec 84 * T.C. Slattery, USNA * Minor improvements, Mike Muuss and Terry Slattery, 16-Oct-85. */ #ifndef lint static char RCSid[] = "@(#)$Header: ttcp.c,v 1.10 87/09/02 23:26:36 mike Exp $ (BRL)"; #endif #define BSD43 /* #define BSD42 */ /* #define BSD41a */ #include #include #include #include #include #include #include #include /* struct timeval */ #ifdef SYSV #include #include #else #include #endif struct sockaddr_in sinme; struct sockaddr_in sinhim; struct sockaddr_in sindum; struct sockaddr_in frominet; int domain, fromlen; int fd; /* fd of network socket */ int buflen = 1024; /* length of buffer */ char *buf; /* ptr to dynamic buffer */ int nbuf = 1024; /* number of buffers to send in sinkmode */ int udp = 0; /* 0 = tcp, !0 = udp */ int options = 0; /* socket options */ int one = 1; /* for 4.3 BSD style setsockopt() */ short port = 2000; /* TCP port number */ char *host; /* ptr to name of host */ int trans; /* 0=receive, !0=transmit mode */ int sinkmode; /* 0=normal I/O, !0=sink/source mode */ struct hostent *addr; extern int errno; char Usage[] = "\ Usage: ttcp -t [-options] host out\n\ -l## length of network read buf (default 1024)\n\ -s sink (discard) all data from network\n\ -p## port number to listen at (default 2000)\n\ -B Only output full blocks, as specified in -l## (for TAR)\n\ -u use UDP instead of TCP\n\ "; char stats[128]; double t; /* transmission time */ long nbytes; /* bytes on net */ int b_flag = 0; /* use mread() */ void prep_timer(); double read_timer(); double cput, realt; /* user, real time (seconds) */ main(argc,argv) int argc; char **argv; { unsigned long addr_tmp; if (argc < 2) goto usage; argv++; argc--; while( argc>0 && argv[0][0] == '-' ) { switch (argv[0][1]) { case 'B': b_flag = 1; break; case 't': trans = 1; break; case 'r': trans = 0; break; case 'd': options |= SO_DEBUG; break; case 'n': nbuf = atoi(&argv[0][2]); break; case 'l': buflen = atoi(&argv[0][2]); break; case 's': sinkmode = 1; /* source or sink, really */ break; case 'p': port = atoi(&argv[0][2]); break; case 'u': udp = 1; break; default: goto usage; } argv++; argc--; } if(trans) { /* xmitr */ if (argc != 1) goto usage; bzero((char *)&sinhim, sizeof(sinhim)); host = argv[0]; if (atoi(host) > 0 ) { /* Numeric */ sinhim.sin_family = AF_INET; #ifdef cray addr_tmp = inet_addr(host); sinhim.sin_addr = addr_tmp; #else sinhim.sin_addr.s_addr = inet_addr(host); #endif } else { if ((addr=gethostbyname(host)) == NULL) err("bad hostname"); sinhim.sin_family = addr->h_addrtype; bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length); #ifdef cray sinhim.sin_addr = addr_tmp; #else sinhim.sin_addr.s_addr = addr_tmp; #endif cray } sinhim.sin_port = htons(port); sinme.sin_port = 0; /* free choice */ } else { /* rcvr */ sinme.sin_port = htons(port); } if( (buf = (char *)malloc(buflen)) == (char *)NULL) err("malloc"); fprintf(stderr,"ttcp%s: nbuf=%d, buflen=%d, port=%d\n", trans?"-t":"-r", nbuf, buflen, port); if ((fd = socket(AF_INET, udp?SOCK_DGRAM:SOCK_STREAM, 0)) < 0) err("socket"); mes("socket"); if (bind(fd, &sinme, sizeof(sinme)) < 0) err("bind"); if (!udp) { if (trans) { /* We are the client if transmitting */ if(options) { #ifdef BSD42 if( setsockopt(fd, SOL_SOCKET, options, 0, 0) < 0) #else BSD43 if( setsockopt(fd, SOL_SOCKET, options, &one, sizeof(one)) < 0) #endif err("setsockopt"); } if(connect(fd, &sinhim, sizeof(sinhim) ) < 0) err("connect"); mes("connect"); } else { /* otherwise, we are the server and * should listen for the connections */ listen(fd,0); /* allow a queue of 0 */ if(options) { #ifdef BSD42 if( setsockopt(fd, SOL_SOCKET, options, 0, 0) < 0) #else BSD43 if( setsockopt(fd, SOL_SOCKET, options, &one, sizeof(one)) < 0) #endif err("setsockopt"); } fromlen = sizeof(frominet); domain = AF_INET; if((fd=accept(fd, &frominet, &fromlen) ) < 0) err("accept"); mes("accept"); } } prep_timer(); errno = 0; if (sinkmode) { register int cnt; if (trans) { pattern( buf, buflen ); if(udp) (void)Nwrite( fd, buf, 4 ); /* rcvr start */ while (nbuf-- && Nwrite(fd,buf,buflen) == buflen) nbytes += buflen; if(udp) (void)Nwrite( fd, buf, 4 ); /* rcvr end */ } else { while ((cnt=Nread(fd,buf,buflen)) > 0) { static int going = 0; if( cnt <= 4 ) { if( going ) break; /* "EOF" */ going = 1; prep_timer(); } else nbytes += cnt; } } } else { register int cnt; if (trans) { while((cnt=read(0,buf,buflen)) > 0 && Nwrite(fd,buf,cnt) == cnt) nbytes += cnt; } else { while((cnt=Nread(fd,buf,buflen)) > 0 && write(1,buf,cnt) == cnt) nbytes += cnt; } } if(errno) err("IO"); (void)read_timer(stats,sizeof(stats)); if(udp&&trans) { (void)Nwrite( fd, buf, 4 ); /* rcvr end */ (void)Nwrite( fd, buf, 4 ); /* rcvr end */ (void)Nwrite( fd, buf, 4 ); /* rcvr end */ (void)Nwrite( fd, buf, 4 ); /* rcvr end */ } fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", stats); if( cput <= 0.0 ) cput = 0.001; if( realt <= 0.0 ) realt = 0.001; fprintf(stderr,"ttcp%s: %ld bytes processed\n", trans?"-t":"-r", nbytes ); fprintf(stderr,"ttcp%s: %9g CPU sec = %9g KB/cpu sec, %9g Kbits/cpu sec\n", trans?"-t":"-r", cput, ((double)nbytes)/cput/1024, ((double)nbytes)*8/cput/1024 ); fprintf(stderr,"ttcp%s: %9g real sec = %9g KB/real sec, %9g Kbits/sec\n", trans?"-t":"-r", realt, ((double)nbytes)/realt/1024, ((double)nbytes)*8/realt/1024 ); exit(0); usage: fprintf(stderr,Usage); exit(1); } err(s) char *s; { fprintf(stderr,"ttcp%s: ", trans?"-t":"-r"); perror(s); fprintf(stderr,"errno=%d\n",errno); exit(1); } mes(s) char *s; { fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s); } pattern( cp, cnt ) register char *cp; register int cnt; { register char c; c = 0; while( cnt-- > 0 ) { while( !isprint((c&0x7F)) ) c++; *cp++ = (c++&0x7F); } } /******* timing *********/ #ifdef SYSV extern long time(); static long time0; static struct tms tms0; #else static struct timeval time0; /* Time at which timeing started */ static struct rusage ru0; /* Resource utilization at the start */ static void prusage(); static void tvadd(); static void tvsub(); static void psecs(); #endif /* * P R E P _ T I M E R */ void prep_timer() { #ifdef SYSV (void)time(&time0); (void)times(&tms0); #else gettimeofday(&time0, (struct timezone *)0); getrusage(RUSAGE_SELF, &ru0); #endif } /* * R E A D _ T I M E R * */ double read_timer(str,len) char *str; { #ifdef SYSV long now; struct tms tmsnow; char line[132]; (void)time(&now); realt = now-time0; (void)times(&tmsnow); cput = tmsnow.tms_utime - tms0.tms_utime; cput /= HZ; if( cput < 0.00001 ) cput = 0.01; if( realt < 0.00001 ) realt = cput; sprintf(line,"%g CPU secs in %g elapsed secs (%g%%)", cput, realt, cput/realt*100 ); (void)strncpy( str, line, len ); return( cput ); #else /* BSD */ struct timeval timedol; struct rusage ru1; struct timeval td; struct timeval tend, tstart; char line[132]; getrusage(RUSAGE_SELF, &ru1); gettimeofday(&timedol, (struct timezone *)0); prusage(&ru0, &ru1, &timedol, &time0, line); (void)strncpy( str, line, len ); /* Get real time */ tvsub( &td, &timedol, &time0 ); realt = td.tv_sec + ((double)td.tv_usec) / 1000000; /* Get CPU time (user+sys) */ tvadd( &tend, &ru1.ru_utime, &ru1.ru_stime ); tvadd( &tstart, &ru0.ru_utime, &ru0.ru_stime ); tvsub( &td, &tend, &tstart ); cput = td.tv_sec + ((double)td.tv_usec) / 1000000; if( cput < 0.00001 ) cput = 0.00001; return( cput ); #endif } #ifndef SYSV static void prusage(r0, r1, e, b, outp) register struct rusage *r0, *r1; struct timeval *e, *b; char *outp; { struct timeval tdiff; register time_t t; register char *cp; register int i; int ms; t = (r1->ru_utime.tv_sec-r0->ru_utime.tv_sec)*100+ (r1->ru_utime.tv_usec-r0->ru_utime.tv_usec)/10000+ (r1->ru_stime.tv_sec-r0->ru_stime.tv_sec)*100+ (r1->ru_stime.tv_usec-r0->ru_stime.tv_usec)/10000; ms = (e->tv_sec-b->tv_sec)*100 + (e->tv_usec-b->tv_usec)/10000; #define END(x) {while(*x) x++;} cp = "%Uuser %Ssys %Ereal %P %Xi+%Dd %Mmaxrss %F+%Rpf %Ccsw"; for (; *cp; cp++) { if (*cp != '%') *outp++ = *cp; else if (cp[1]) switch(*++cp) { case 'U': tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime); sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000); END(outp); break; case 'S': tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime); sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000); END(outp); break; case 'E': psecs(ms / 100, outp); END(outp); break; case 'P': sprintf(outp,"%d%%", (int) (t*100 / ((ms ? ms : 1)))); END(outp); break; case 'W': i = r1->ru_nswap - r0->ru_nswap; sprintf(outp,"%d", i); END(outp); break; case 'X': sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); END(outp); break; case 'D': sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t); END(outp); break; case 'K': sprintf(outp,"%d", t == 0 ? 0 : ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) - (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t); END(outp); break; case 'M': sprintf(outp,"%d", r1->ru_maxrss/2); END(outp); break; case 'F': sprintf(outp,"%d", r1->ru_majflt-r0->ru_majflt); END(outp); break; case 'R': sprintf(outp,"%d", r1->ru_minflt-r0->ru_minflt); END(outp); break; case 'I': sprintf(outp,"%d", r1->ru_inblock-r0->ru_inblock); END(outp); break; case 'O': sprintf(outp,"%d", r1->ru_oublock-r0->ru_oublock); END(outp); break; case 'C': sprintf(outp,"%d+%d", r1->ru_nvcsw-r0->ru_nvcsw, r1->ru_nivcsw-r0->ru_nivcsw ); END(outp); break; } } *outp = '\0'; } static void tvadd(tsum, t0, t1) struct timeval *tsum, *t0, *t1; { tsum->tv_sec = t0->tv_sec + t1->tv_sec; tsum->tv_usec = t0->tv_usec + t1->tv_usec; if (tsum->tv_usec > 1000000) tsum->tv_sec++, tsum->tv_usec -= 1000000; } static void tvsub(tdiff, t1, t0) struct timeval *tdiff, *t1, *t0; { tdiff->tv_sec = t1->tv_sec - t0->tv_sec; tdiff->tv_usec = t1->tv_usec - t0->tv_usec; if (tdiff->tv_usec < 0) tdiff->tv_sec--, tdiff->tv_usec += 1000000; } static void psecs(l,cp) long l; register char *cp; { register int i; i = l / 3600; if (i) { sprintf(cp,"%d:", i); END(cp); i = l % 3600; sprintf(cp,"%d%d", (i/60) / 10, (i/60) % 10); END(cp); } else { i = l; sprintf(cp,"%d", i / 60); END(cp); } i %= 60; *cp++ = ':'; sprintf(cp,"%d%d", i / 10, i % 10); } #endif /* * N R E A D */ Nread( fd, buf, count ) { struct sockaddr_in from; int len = sizeof(from); register int cnt; if( udp ) { cnt = recvfrom( fd, buf, count, 0, &from, &len ); } else { if( b_flag ) cnt = mread( fd, buf, count ); /* fill buf */ else cnt = read( fd, buf, count ); } return(cnt); } /* * N W R I T E */ Nwrite( fd, buf, count ) { register int cnt; if( udp ) { again: cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) ); if( cnt<0 && errno == ENOBUFS ) { delay(18000); errno = 0; goto again; } } else { cnt = write( fd, buf, count ); } return(cnt); } delay(us) { struct timeval tv; tv.tv_sec = 0; tv.tv_usec = us; (void)select( 1, (char *)0, (char *)0, (char *)0, &tv ); return(1); } /* * M R E A D * * This function performs the function of a read(II) but will * call read(II) multiple times in order to get the requested * number of characters. This can be necessary because * network connections don't deliver data with the same * grouping as it is written with. Written by Robert S. Miles, BRL. */ int mread(fd, bufp, n) int fd; register char *bufp; unsigned n; { register unsigned count = 0; register int nread; do { nread = read(fd, bufp, n-count); if(nread < 0) { perror("ttcp_mread"); return(-1); } if(nread == 0) return((int)count); count += (unsigned)nread; bufp += nread; } while(count < n); return((int)count); } netdiag-1.2/tcpblast-20011111/docs/orig/ttcp.tar.gz000066400000000000000000000121141323731111400214530ustar00rootroot00000000000000‹ò¨Ü$ttcp.tarí;kWÛJ’óÕþ2ÉO™Ü,ƹ›Épnx “™Mr8²$ƒ6¶¤ÑB2ü÷­G·,Ù‚sg÷ÜcŸÄ–ºëÕÕÕUÕ]Mš:QïO¿ï~yÞúÝÜzÆ¿–úU/°µõâù³ÏûÖs|ßúeë—?Áï,Öꃟ”柾ºÎïÆ'ôÅ–ußü?ÉßÒóß[¾Ù¾šÿǧ׬C³vg° 'Ð…]|Åpæ%)œíž€ç¤~tí/^v¡ð_Æ)<·¬>!Ú ilÉÄ‹˜ØãØwìÔsaœM¸)ŒÁµS¢ùØ<‰Ã$©ë]Åú<±ÇSou7Ûøõ¬ÍT·º}’Û$õf ŒoÁõ&~à—‰ÐB}3ÚÛÚäïg`ÐOß6©ýÐv®üEÏB1ø+ÜøéC:_¼4ä*̦®ö`ô÷Ñ_µT‡¡ëOX`@y±ÍÃÏ׋IP¤Ò†þKØóx¹Eü9ëîva4µÓÔ‹oÛp>:zÍÔüÉø³(¯½™¤IÛ¾xp˜eIÂÃ=óâø¶€ÚÑ9vÒÎËçZ¢=?Icœ±£ÔN³:9ã“l<õØ g¶OSW‚>¦þÌÇY!Z½úS‚ØÀÔÒz‚”ѹ²c8ÝùîÇÏ0„µÿ4žš>õ®ý lC¿» FŸ¾7×õ§^€Ú©×Ÿ*Åñ Ô{M(6l«…6œQá¯TîÉ¥oæthæÄýÀ™f®;d.a÷êU±É¿ ìi¹ÍIo#¯Ü„: 1o“&ËÍbåöÀKQ²´‡J­l'WºØáŽ+Xú3’­VCàÌdN ÔtmOI#%•Ì ô ‰#;¶gÔ¬HÆYb_zð½N&±À&Î.2znÓSBOƒúÝ ×ýéùèõ»ý‹Ñþû·`á$LoYì%a;¢b5IŠiÎvÝøÂ—‘®î¹òg•]äHŸƒz\6ã67O½`ÀwP«±'.:@ð›0þ¢3«‘ÀÐñ ÚðK\}kskÀ8Øv‰«ñÄ3<}ßB7JcHCpo{†kbHt|Eª›%ªA6#HN5!ü•2Þ/³Õ§EËÜ)XŠ›…Ïh>mxBOÔ§8…­ÚD’ÁÈu»ÃYBRRHŽê™ø»ô]l‚.)!Ã$"èýГ³;²Cn¸Q .WÔU˜¤eM¡žÈõh±8è!cÏñük9äôC •B๒h( å -ö wÌxÒÛ+¡^{ñ8L¼¹ž¬a³ Ø NŸLBô£ªÍ‰2@'Ž’ vêdI8“Ú¦N7Ÿkä2µo 3àqx¼8:ÞÛÿúïåáùUFMš@ÿM²ìAÝûŠÞ<¢É¾í›uyNìÄÓ~ªóË6PZ>vÔD½~„4¦ÏŸ‚OõZgúôi­dÊ ÜÄ>ÆŒ€çC- µMSxÙÿMS0“š´ìxÀ6DjŠxmTƒ'ÑYpä67q…ùC¦›ÖÖKÅ4BE[Ò«sp²<žÕH€ó½ÔêÑæuŽz—Þ=5µ.ÉNI Œó™öý¤¨¿¯Ñ4ŽŽ/Þ½Û?-ÃHi"âùDÀ«0K+'@=&YÉA<¨y´cðÇŽ]sØ01úO§’"qn¤)’¦RùÞ«È©O¦vZ©Ê7µã`z H ÊÐwfÈd<ÅcæacâyŽä7hZ4&0È_œ½>}ÄL¬ jÊŒ)yH>ö7_~Ô§!¦ZÁøçC­~~¦Ä.ðrï€âï†Îí)Q>:E½£4à@¾Ç“©}Yð›$ØŒ.^¬~ú.êÒ‹.(¨Å†9¨£Þ(§$ ¥Fti›º¦é@Ó‹¥c%&¼n2§^Çt#ò#Ï0ëßëwõ:'ÃŽ/6~]›,&½”£lRóakY@™ ª™µÃÑ.Eèjð™ìÀ¦ —!N(û ê#ôVkÀ4;A½vsåO=ƒß_Y°¾NO×­Ïø†CØèl€ ökµs\çŠI3@ÿ³‰íØáب¶7ÛäúröüŠƒÿ2ÈRbw}L\†±ª`\Ñ‹èŸCZ{{ûoÎßUAï ôÜõVò ”c; }c]uó³Y…2UcÖyÁ£A*D'4? …XÄ‹md;lZÅ0I*‡~-ó¨·¥œí©V»ÃÿK6uG6hð*ÛÁá}Åð˘r}‚œÊŠL¿yqhbîæºdvmÔÎ7/œòjò89„ µÁ4aR u™ð !%Ip”árÅè-zJ]ü¹˜`N6%»xýöâàhÿl@I3mcœØ¾%X½º„RÉ zƒRÔC2åËQÒÝe n¢a—(ª • „,òÓÐ ‚^z)Ž)•ôǤ¥ztþþ½ÉÙæÆÚ+uÔÚ’œù‰dçÕ @›™xÜRßÅ®6O·Y;Ç”e.)í_ÓJ–Ô¡É’ÁÔ:¸JÑ ôÂ#åB±_„Iì¡—¾ }‡3½¢‚±7v®•.á/0@G-n–ÖúLåvà9¹Ä¥É¹Ox®Ó<ÌMfaìAzecrsEIs@;½)Û¶ÈÃd 0ÄéE€+ÆWCHÊdë.=é<åG“-Ò©¨$špR€Kˆc{r‘Nº­$6Ü6oDøŠÐH:¯ðçS°Ö®kO'€E­¨…_×ðkm{ i2 Z”¬¬\É÷JÿHŠŸa¯&HV îç†*3ÔênÓ†è×Ññîo{ïN_nóãèìtÿõa,Ôï~k .Å}rñ]8ŒýÀE.mXg£):ª™·@‹`ç˜OP ñN¼¥æcctðîäàdŸÈp^@|©»BÙ.‘¢XÌGÏ9dŸpwD+41Õ¡bŠU!œ$XæNÄ"„ ‰Æ`“½nÜHrñ Ü)w}$÷{Ç/”ò0NÕ. Ff=÷¼BÞÁÁ²3FŽe8EtT|Sg¢ˆa¼pˆ¤ÚŸø ‹ÞtÝúúË[Óä%Þj‘+D~­ïÝ[-ée“¤M%ýªéâ)ýÊàÛ)E&çŠÚ)"r~á±o)ã«‚lœ òi^nJý©ÿMî 1ÎøuŽ¢I¨sm¦@¡µØœ^c&¶Ü˜dãÅÆWIB5f«c¾¨¸àö6Œ=—JÄ&×i*Tã€òù(Wœ›qFÓU,;Ó­l‚|©‘ëׯ:6˜ª%Î:¯t!º›^_Ðbήºˆ*íЃ¿ü× <“Åo”áoâ7úzøZÂÏîa—U³Ëîc—=À߰H.}šv?Ý k4âÿå2 »3¾ ñúôÝè|´¿7·š¢N\ûÖHqÍ|‹Ìª’~3‹íߨ,ÜüééHq߬Æ;dvC…54‹W,u˜Ç×1êre¨V;S؇¸€38€C|>åÛ$\ )&´lK#XçÕ3ßÓÌÅ4I–ÚÜþ —pë…«FÔ©E ^ÃÞ‚Àbˆ×®—R˜¸Íù»ò`iÌeA‡ôë†ÓAÞ‘/Ùþ`Ø­hCe¡ëãåKMq‘}ì?ÛüLAãþáõÕèT…âܯ,íH;B¿s,­j`ž×!©À‰n ²ékƒÚIÕÉ>ßyi¡þE ’¸$ç.Sçø­¡ÔÕ«©5ùÒH†eâšR‹£À‹ )µQí­…KÂT\É«!V)­;¿µ¢_e¥“ 98ë^ ¦Œ`-"G%L™»Uþ÷3C*¤‘œbV¸IJž{i&0c^w%/_דãÔÅ8¡(ý¸Íµ[³].7ã +m"zs¬m±Id*-×ødP OØ?X »žË›%ŸÆŽ¿³„æ•kÄý%Û‰­¥6³‰ÚkIZº„“U!±Ö{¬ó¼¤‚Wò^I¯¤‚&S †§]hg¬Ÿ˜2ˆ—;QÕY¢_¯Ú?Ú3¾šµï’4¿šðS‘»Š ŒfH×Bç´6 1ÂÕ}^ž“µ¼*ó4þæ·{.4gö×8Á®·­Æi4Æ®“ÜÌoðÕèÑðåD*‡¢-¶Qéo£±ÁûI6#NšÄj¼m%@'â*³Tžf«åD¥šó¹*óâ[g«£ÅY˜yz-̹ªƒ©\“ø¶×n·aõ]J2‰€šß©]´n >iœWP±Jš 5zH¨¤,Tòïj_•9eCÛcG£üÀ#ÐOTÍzAÆF4|:0R6Ûú5$ÿ+®^؆¾iš‘'}²`£Šãáè£U(ÕÉA”êøµRs(“ÿ˜Aý­zP¤s:î°pB¯nŸÌ]¯j~1{écøì=Š>yÉٹȡ¥_âmhæÒeÍ»ÌGŠòÛωRzI–VQJ:sé­"Æ¿*ïá½ò*þâ„z›!ööÇÄþ{2MõËÛcŸþ° óÛcüˆ°ðÍ«Ü*åõ1¤Dš’“iõúiMy·šr«H<¸Æ`¡IóK›Ou·_êç7x€µÚU<ám…>Žä°‚îc㓵±”I‚—&Ù MaÚ7—“énR3íS¢ƒù¶·=VþÒB"úePÌJY 4X>.Á¿Ò‰ yÄ"ÏV‹vEÐÎpž4.’b AiŸ†Z5LéoV“‹Ídž.x>êA2+f%ØâH˪öUbØé¨PWÐÙýÔ¨6mcv w§ƒªS ïˉfÌÃÖ³–®)ùR3Ñì°ùnçQ…,Ðûä†F^@aƒ7üÞ Kûü¥/ ¤ •&ºLø#™K˜4†Æ;ðEŸ>mloPò¾,ޝ$ñµ…=ð¨]0ïz¥J0?ívÂŒ×æÙþâ-{•·/•HÍÅ _ª´¿¡û3*1¤Ã;ŒõžsM8‹Œ¹öËSüÉKuú •ÞŠ*DÒê""g˜B{V=">>›øt‹5›Èÿ¼R¤¥ªD$€’Êó¨-ÕKüU|g°/*^¬(tü#…Ù—¶lçz£ëEiX­µû.,i°¦*z;|T•Z‡¸Á8~sþv”—øø.ƒÑ™§žÅ¢¬º ÈâiÌ'F„½gØË3º¬Já%fÕ®óš7Œ×ÝÜiYý®\S–ÌO.¼)]¿tzú2•ußãzz­Ž&Xš~yZ ë†ÿâíÊO`’ògm‘ãVÓa:‰Í[ɜڹÆÁ‰ZHá-°ùø.ï™eÓÔ¦žsR%Œ]¹¤}éÉénìý#óÐT\ž_©'ém-(邈äØŒ=<ÇK;¾ÅÇFÅ0žº^¸îrµ5îÓ}¾’ÊæÆGÊöŒñ.ã0‹èœÚFáХίï(rþ ^Ç·p¢h)Œºpˆ;Õ¤ oNßËŸÑ_‹ÍtU’l"jC`ê?Í)ûòýU zs}ÿ¹”={Þ.V%FP\MhdÄŠlÅ Ù*ù]/ó‚&Q½Ngg^"V.\\ð`Ô e4~ñöb9T÷> o¥æLeø =(S‰ÎWá"êÒ p'mCvP4Â*Âwõÿë¿]}VŸÕçõYÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_ÕÿWõÿUýUÿ_}þŸÿÉ0@ó`netdiag-1.2/tcpblast-20011111/docs/orig/udpblast.c000066400000000000000000000042321323731111400213360ustar00rootroot00000000000000#include #include #include #include #include #include #include #define BLKSIZE (1024*32) struct sockaddr_in sin; struct servent *sp; struct hostent *host; unsigned long starts, startms, stops, stopms, expms; struct timeval ti; struct timezone tiz; char greet[BLKSIZE] = "Hi!"; int nblocks; int f; int main(argc, argv) int argc; char **argv; { register int i; if (argc!=3) { fprintf(stderr, "usage: tcpblast destination nblkocks\n"); fprintf(stderr, "blocksize: %d bytes\n", BLKSIZE); exit(1); } nblocks = atoi(argv[2]); if (nblocks<=1 || nblocks>=10000) { fprintf(stderr, "tcpblast: 1 < nblocks <= 10000 \n"); exit(1); } bzero((char *)&sin, sizeof (sin)); sin.sin_family = AF_INET; f = socket(AF_INET, SOCK_DGRAM, 0); if (f < 0) { perror("tcpblast: socket"); exit(3); } { int siz = 1024*32; setsockopt(f, SOL_SOCKET, SO_SNDBUF, &siz, sizeof(siz)); getsockopt(f, SOL_SOCKET, SO_SNDBUF, &siz, sizeof(siz)); printf("SO_SNDBUF = %d\n", siz); } if (bind(f, &sin, sizeof (sin)) < 0) { perror("tcpblast: bind"); exit(1); } host = gethostbyname(argv[1]); if (host) { sin.sin_family = host->h_addrtype; bcopy(host->h_addr, &sin.sin_addr, host->h_length); } else { sin.sin_family = AF_INET; sin.sin_addr.s_addr = inet_addr(argv[1]); if (sin.sin_addr.s_addr == -1) { fprintf(stderr, "tcpblast: %s unknown host\n", argv[1]); exit(1); } } sin.sin_port = htons(9); if (connect(f, &sin, sizeof(sin)) <0) { perror("tcpblast connect:"); exit(1); } if (gettimeofday(&ti, &tiz) < 0) { perror("tcpblast time:"); exit(1); } starts = ti.tv_sec; startms = ti.tv_usec / 1000L; for (i=0; i=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .de Vb .ft CW .nf .ne \\$1 .. .de Ve .ft R .fi .. ''' ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' Bell System Logo is used as a dummy character. ''' .tr \(*W-|\(bv\*(Tr .ie n \{\ .ds -- \(*W- .ds PI pi .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" ''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of ''' \*(L" and \*(R", except that they are used on ".xx" lines, ''' such as .IP and .SH, which do another additional levels of ''' double-quote interpretation .ds M" """ .ds S" """ .ds N" """"" .ds T" """"" .ds L' ' .ds R' ' .ds M' ' .ds S' ' .ds N' ' .ds T' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds M" `` .ds S" '' .ds N" `` .ds T" '' .ds L' ` .ds R' ' .ds M' ` .ds S' ' .ds N' ` .ds T' ' .ds PI \(*p 'br\} .\" If the F register is turned on, we'll generate .\" index entries out stderr for the following things: .\" TH Title .\" SH Header .\" Sh Subsection .\" Ip Item .\" X<> Xref (embedded .\" Of course, you have to process the output yourself .\" in some meaninful fashion. .if \nF \{ .de IX .tm Index:\\$1\t\\n%\t"\\$2" .. .nr % 0 .rr F .\} .TH tcpblast 8 "perl 5.005, patch 03" "24/Oct/2000" "tcpblast" .UC .if n .hy 0 .if n .na .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .de CQ \" put $1 in typewriter font .ft CW 'if n "\c 'if t \\&\\$1\c 'if n \\&\\$1\c 'if n \&" \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 '.ft R .. .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 . \" AM - accent mark definitions .bd B 3 . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds ? ? . ds ! ! . ds / . ds q .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' . ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' . ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E .ds oe o\h'-(\w'o'u*4/10)'e .ds Oe O\h'-(\w'O'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds v \h'-1'\o'\(aa\(ga' . ds _ \h'-1'^ . ds . \h'-1'. . ds 3 3 . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE . ds oe oe . ds Oe OE .\} .rm #[ #] #H #V #F C .SH "NAME" tcpblast \- tool for measuring network bandwidth .SH "SYNOPSIS" \fBtcpblast\fR [options] \fIdestination[:port]\fR .SH "DESCRIPTION" tcpblast/udpblast is a simple tool for probing network and estimating its throughput. By default it sends 300 blocks (1024 bytes each) of data to specified destination host. .PP Destination can be name or address, IPv4 or IPv6. When IPv6 address is specified with port it should look like: \*(L'[3ffe:8010::1]:9\*(R' (with single quotes to prevent shell expansion of []). .Sh "Options" .Ip "\fB\-4, --ipv4\fR use only ipv4 address" 3 .Ip "\fB\-6, --ipv6\fR use only ipv6 address" 3 .Ip "\fB\-a\fR send random data" 3 .Ip "\fB\-b\fR \fI\s-1BUF_SIZE\s0\fR socket buf size (default: \-1, don't change), with `\-\*(T' to be substracted from results" 3 .Ip "\fB\-c, --count\fR \fI\s-1BLOCKS\s0\fR change default (300) number of blocks, range: 1..10000000" 3 .Ip "\fB\-d\fR \fI\s-1DOTFREQ\s0\fR print dot every \s-1DOTFREQ\s0 blocks, disables cont. speed disp." 3 .Ip "\fB\-h, --help\fR this help" 3 .Ip "\fB\-i, --delay\fR \fI\s-1DELAY\s0\fR write delay in microseconds (\s-1EXPERIMENTAL\s0)" 3 .Ip "\fB\-l, --last\fR \fI\s-1BLKS\s0\fR show also speed for last \s-1BLKS\s0 blocks" 3 .Ip "\fB\-m\fR results for every block in separate line" 3 .Ip "\fB\-n, --nwrite\fR do not write, use e.g. with chargen port" 3 .Ip "\fB\-o\fR switch from continuous speed displaying to dots printing" 3 .Ip "\fB\-p \s-1PORT\s0\fR bind this local \s-1PORT\s0" 3 .Ip "\fB\-q --quiet\fR show only final statistics" 3 .Ip "\fB\-r, --read\fR read data returned to us, switches default port to echo" 3 .Ip "\fB\-R, --rate\fR \fI\s-1RATESPEC\s0\fR limit the speed according to the \s-1RATESPEC\s0" 3 .Ip "\fB\-s\fR \fI\s-1BLOCK_SIZE\s0\fR block size (default 1024 bytes)" 3 .Ip "\fB\-t\fR \fI\s-1MAXTIME\s0\fR limit time to \s-1MAXTIME\s0 (up to 42950 h)" 3 .Ip "\fB --tcp\fR use \s-1TCP\s0 (default)" 3 .Ip "\fB --udp\fR use \s-1UDP\s0 (default if named udpblast)" 3 .Ip "\fB\-v, --verbosity\fR verbosity, default 0, maximum 3. \-v adds time display, \-vv also speed in B/s, \-v \- speed in b/s." 3 .Ip "\fB\-V\fR, \fB--version\fR version" 3 .Ip "\fIdestination\fR host name or address" 3 .Ip "\fIport\fR use port #/name xyz instead of default port 9" 3 .PP \s-1RATESPEC\s0 \s-1RATE\s0[,\s-1TIME\s0][:\s-1RATE\s0[,\s-1TIME\s0]]... \s-1RATE\s0 generating data at \s-1RATE\s0 speed in B/s \s-1TIME\s0 for \s-1TIME\s0 seconds (can be floating point number), last can be omitted and that time will be infinite .PP Options \-b, \-c, \-R, \-s and \-t can use case insensitive unit multipliers and specifiers: size (bytes): \-b and \-s argument without units is in bytes, can use [{k,m,g}]b (lower or upper case) for \s-1KB\s0, \s-1MB\s0 or \s-1GB\s0. {k,m,g} are powers of 1024. number: \-c argument is just a number, can have k, m or g added (powers of 1024), no unit needed rate (bytes pes second): \-R \s-1RATE\s0 is in B/s or Bps, the postfixes can be [{k,m,g}]{b/s,bps} time (seconds): \-t and \-R \s-1TIME\s0 argument is in seconds, can be postfixed with [{k,m,g}]{s,min,h,w,m,y} .PP Example: tcpblast \-b 4KB \-c 10k \-R 10kbps,2:20kbps,3s target .PP tcpblast version: FreeBSD + rzm 20001030 .SH "BUGS" Rafal says that he is a perfectly bad and careless maintainer :) .PP If You found any other bugs send it to him. .SH "AUTHORS" .Ip "Software: dfk@nic.eu.net (Daniel Karrenberg \- acc. to FreeBSD version)" 3 .Ip "Maintained by: Rafal Maszkowski " 3 .Ip "Manual page: Artur R. Czechowski , Oct 1999; rzm, Oct 2000" 3 .rn }` '' .IX Title "tcpblast 8" .IX Name "tcpblast - tool for measuring network bandwidth" .IX Header "NAME" .IX Header "SYNOPSIS" .IX Header "DESCRIPTION" .IX Subsection "Options" .IX Item "\fB\-4, --ipv4\fR use only ipv4 address" .IX Item "\fB\-6, --ipv6\fR use only ipv6 address" .IX Item "\fB\-a\fR send random data" .IX Item "\fB\-b\fR \fI\s-1BUF_SIZE\s0\fR socket buf size (default: \-1, don't change), with `\-\*(T' to be substracted from results" .IX Item "\fB\-c, --count\fR \fI\s-1BLOCKS\s0\fR change default (300) number of blocks, range: 1..10000000" .IX Item "\fB\-d\fR \fI\s-1DOTFREQ\s0\fR print dot every \s-1DOTFREQ\s0 blocks, disables cont. speed disp." .IX Item "\fB\-h, --help\fR this help" .IX Item "\fB\-i, --delay\fR \fI\s-1DELAY\s0\fR write delay in microseconds (\s-1EXPERIMENTAL\s0)" .IX Item "\fB\-l, --last\fR \fI\s-1BLKS\s0\fR show also speed for last \s-1BLKS\s0 blocks" .IX Item "\fB\-m\fR results for every block in separate line" .IX Item "\fB\-n, --nwrite\fR do not write, use e.g. with chargen port" .IX Item "\fB\-o\fR switch from continuous speed displaying to dots printing" .IX Item "\fB\-p \s-1PORT\s0\fR bind this local \s-1PORT\s0" .IX Item "\fB\-q --quiet\fR show only final statistics" .IX Item "\fB\-r, --read\fR read data returned to us, switches default port to echo" .IX Item "\fB\-R, --rate\fR \fI\s-1RATESPEC\s0\fR limit the speed according to the \s-1RATESPEC\s0" .IX Item "\fB\-s\fR \fI\s-1BLOCK_SIZE\s0\fR block size (default 1024 bytes)" .IX Item "\fB\-t\fR \fI\s-1MAXTIME\s0\fR limit time to \s-1MAXTIME\s0 (up to 42950 h)" .IX Item "\fB --tcp\fR use \s-1TCP\s0 (default)" .IX Item "\fB --udp\fR use \s-1UDP\s0 (default if named udpblast)" .IX Item "\fB\-v, --verbosity\fR verbosity, default 0, maximum 3. \-v adds time display, \-vv also speed in B/s, \-v \- speed in b/s." .IX Item "\fB\-V\fR, \fB--version\fR version" .IX Item "\fIdestination\fR host name or address" .IX Item "\fIport\fR use port #/name xyz instead of default port 9" .IX Header "BUGS" .IX Header "AUTHORS" .IX Item "Software: dfk@nic.eu.net (Daniel Karrenberg \- acc. to FreeBSD version)" .IX Item "Maintained by: Rafal Maszkowski " .IX Item "Manual page: Artur R. Czechowski , Oct 1999; rzm, Oct 2000" netdiag-1.2/tcpblast-20011111/docs/tcpblast.lsm000066400000000000000000000016231323731111400207460ustar00rootroot00000000000000Begin4 Title: tcpblast - tool for measuring network bandwidth Version: 20011111 Entered-date: 2001-11-11 Description: tcp/udpblast patched from FreeBSD and other versions; added options for setting TCP-UDP, block and buffer size, port #, packet size, local address/port, continuous speed display, sending random data, bidirectionality, rate limits; units, IPv6, standalone high performance echo/chargen/discard included Keywords: tcpblast udpblast diagnostics benchmarking network echo chargen discard Author: dfk@nic.eu.net (Daniel Karrenberg - acc. to FreeBSD version) Maintained-by: Rafal Maszkowski Primary-site: sunsite.unc.edu /pub/Linux/system/Network/admin 180 KB tcpblast-200xxxxx.tar.gz Alternate-site: ftp.6bone.pl /pub/blast 180 KB tcpblast-200xxxxx.tar.gz 13 KB README Original-site: Platform: Copying-policy: PD End netdiag-1.2/tcpblast-20011111/docs/tcpblast.pod000066400000000000000000000067121323731111400207410ustar00rootroot00000000000000=head1 NAME tcpblast - tool for measuring network bandwidth =head1 SYNOPSIS B [options] I =head1 DESCRIPTION tcpblast/udpblast is a simple tool for probing network and estimating its throughput. By default it sends 300 blocks (1024 bytes each) of data to specified destination host. Destination can be name or address, IPv4 or IPv6. When IPv6 address is specified with port it should look like: '[3ffe:8010::1]:9' (with single quotes to prevent shell expansion of []). =head2 Options =over 3 =item B<-4, --ipv4> use only ipv4 address =item B<-6, --ipv6> use only ipv6 address =item B<-a> send random data =item B<-b> I socket buf size (default: -1, don't change), with `-' to be substracted from results =item B<-c, --count> I change default (300) number of blocks, range: 1..10000000 =item B<-d> I print dot every DOTFREQ blocks, disables cont. speed disp. =item B<-h, --help> this help =item B<-i, --delay> I write delay in microseconds (EXPERIMENTAL) =item B<-l, --last> I show also speed for last BLKS blocks =item B<-m> results for every block in separate line =item B<-n, --nwrite> do not write, use e.g. with chargen port =item B<-o> switch from continuous speed displaying to dots printing =item B<-p PORT> bind this local PORT =item B<-q --quiet> show only final statistics =item B<-r, --read> read data returned to us, switches default port to echo =item B<-R, --rate> I limit the speed according to the RATESPEC =item B<-s> I block size (default 1024 bytes) =item B<-t> I limit time to MAXTIME (up to 42950 h) =item B< --tcp> use TCP (default) =item B< --udp> use UDP (default if named udpblast) =item B<-v, --verbosity> verbosity, default 0, maximum 3. -v adds time display, -vv also speed in B/s, -v - speed in b/s. =item B<-V>, B<--version> version =item I host name or address =item I use port #/name xyz instead of default port 9 =back RATESPEC RATE[,TIME][:RATE[,TIME]]... RATE generating data at RATE speed in B/s TIME for TIME seconds (can be floating point number), last can be omitted and that time will be infinite Options -b, -c, -R, -s and -t can use case insensitive unit multipliers and specifiers: size (bytes): -b and -s argument without units is in bytes, can use [{k,m,g}]b (lower or upper case) for KB, MB or GB. {k,m,g} are powers of 1024. number: -c argument is just a number, can have k, m or g added (powers of 1024), no unit needed rate (bytes pes second): -R RATE is in B/s or Bps, the postfixes can be [{k,m,g}]{b/s,bps} time (seconds): -t and -R TIME argument is in seconds, can be postfixed with [{k,m,g}]{s,min,h,w,m,y} Example: tcpblast -b 4KB -c 10k -R 10kbps,2:20kbps,3s target tcpblast version: FreeBSD + rzm 20001030 =back =head1 BUGS Rafal says that he is a perfectly bad and careless maintainer :) If You found any other bugs send it to him. =head1 AUTHORS =over 3 =item Software: dfk@nic.eu.net (Daniel Karrenberg - acc. to FreeBSD version) =item Maintained by: Rafal Maszkowski =item Manual page: Artur R. Czechowski , Oct 1999; rzm, Oct 2000 =cut netdiag-1.2/tcpblast-20011111/docs/tcpblast.spec000066400000000000000000000021051323731111400211010ustar00rootroot00000000000000Summary: Primitive banwidth measurement/clogging tool Name: tcpblast Version: 20011111 Release: 1 Group: Applications/System Source: ftp://ftp.6bone.pl/pub/blast/tcpblast-20011111.tar.gz Copyright: GPL BuildRoot: /var/tmp/%{name}-root %description Sends TCP or UDP packets to discard (or specified) port. Can send with specific limit for a specified time or without limit. Bidirectional with use of echo service. Much more - see --help. See README for tools more suitable for measuring (not clogging) links capacity. %prep %setup -q -n tcpblast-20011111 #%patch0 -p1 %build # binaries do not know about the prefix ./configure --prefix=$RPM_BUILD_ROOT/usr make %install rm -rf $RPM_BUILD_ROOT make install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc docs/README /usr/sbin/* /usr/man/man8/* %changelog * Tue Oct 24 2000 Rafal Maszkowski - updated and included man page again * Mon Sep 4 2000 Rafal Maszkowski - excluded completely outdated man page * Tue Nov 16 1999 Rafal Maszkowski - RPM made with 19991116beta netdiag-1.2/tcpblast-20011111/docs/tcpblast.spec.in000066400000000000000000000021101323731111400215020ustar00rootroot00000000000000Summary: Primitive banwidth measurement/clogging tool Name: tcpblast Version: @VERSION@ Release: 1 Group: Applications/System Source: ftp://ftp.6bone.pl/pub/blast/tcpblast-@VERSION@.tar.gz Copyright: GPL BuildRoot: /var/tmp/%{name}-root %description Sends TCP or UDP packets to discard (or specified) port. Can send with specific limit for a specified time or without limit. Bidirectional with use of echo service. Much more - see --help. See README for tools more suitable for measuring (not clogging) links capacity. %prep %setup -q -n tcpblast-@VERSION@ #%patch0 -p1 %build # binaries do not know about the prefix ./configure --prefix=$RPM_BUILD_ROOT/usr make %install rm -rf $RPM_BUILD_ROOT make install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc docs/README /usr/sbin/* /usr/man/man8/* %changelog * Tue Oct 24 2000 Rafal Maszkowski - updated and included man page again * Mon Sep 4 2000 Rafal Maszkowski - excluded completely outdated man page * Tue Nov 16 1999 Rafal Maszkowski - RPM made with 19991116beta netdiag-1.2/tcpblast-20011111/getopt.c000066400000000000000000000730441323731111400171410ustar00rootroot00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ netdiag-1.2/tcpblast-20011111/getopt.h000066400000000000000000000144401323731111400171410ustar00rootroot00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ netdiag-1.2/tcpblast-20011111/getopt1.c000066400000000000000000000107061323731111400172160ustar00rootroot00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ netdiag-1.2/tcpblast-20011111/install-sh000077500000000000000000000127211323731111400174720ustar00rootroot00000000000000#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in 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. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 netdiag-1.2/tcpblast-20011111/shtool000077500000000000000000001707551323731111400167400ustar00rootroot00000000000000#!/bin/sh ## ## shtool -- Portable Shell Tool ## Copyright (c) 1999 Ralf S. Engelschall, All Rights Reserved. ## Version 1.2.3 (06-May-1999) ## ## ## LICENSE ## ======= ## ## ==================================================================== ## Copyright (c) 1994-1999 Ralf S. Engelschall. All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## ## 1. Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## ## 2. 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. ## ## 3. All advertising materials mentioning features or use of this ## software must display the following acknowledgment: ## "This product includes software developed by ## Ralf S. Engelschall ." ## ## 4. Redistributions of any form whatsoever must retain the following ## acknowledgment: ## "This product includes software developed by ## Ralf S. Engelschall ." ## ## THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``AS IS'' AND ANY ## EXPRESSED 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 RALF S. ENGELSCHALL OR ## ITS 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. ## ==================================================================== ## ## This product includes software developed by the Apache Group ## for use in the Apache HTTP server project (http://www.apache.org/) ## ## ## Usage: shtool [] [] ## ## Available commands: ## echo Print command with optional construct expansion ## table Pretty print a field-sperarated list as a table ## prop Display a process indication though a running propeller ## move Move files with simultan substitution and optimized movement ## install Install a program, script or datafile ## mkdir Make a directory ## mkln Extended ln(1) command which calculates relative links ## mkshadow Create a shadow tree ## fixperm Fix file permission inside a source tree ## guessos Simple OS/Platform guesser ## arx Archive (ar) wrapper command. ## slo Separate Linker Options by library class ## version Generate and maintain a version information file ## path Deal with $PATH variables ## if [ $# -eq 0 ]; then echo "$0:Error: Invalid command line" 1>&2 fi if [ $# -eq 0 -o ".$1" = .-h ]; then echo "$0:Usage: shtool [] []" echo "" echo "Available commands are:" echo "" echo ' echo [-n] [-e] [ ...]' echo ' table [-F ] [-w ] [-c ] [-s ]' echo ' ...' echo ' prop [-p ]' echo ' move [-e] [-p] ' echo ' install [-c] [-m ] [-o ] [-g ]' echo ' [-s] [-S ] [-e ] ' echo ' mkdir [-f] [-p] [-m ] [ ...]' echo ' mkln [-v] [-f] [-s] [ ...] ' echo ' mkshadow ' echo ' fixperm [ ...]' echo ' guessos ' echo ' arx [-v] [' echo ' ...]' echo ' slo -Lxx -lxx [ -Lxx -lxx ... ]' echo ' version [-l ] [-n ] [-p ] [-s' echo ' ] [-i ] [-d ] ' echo ' path [-s] [-r] [-d] [-b] [-m] [-p ] ' echo ' [ ...]' echo "" exit 1 fi if [ ".$1" = .-v ]; then echo "shtool 1.2.3 (06-May-1999)" exit 0 fi util=$1 shift case $util in echo ) # # command line parsing # newline="\n" expand=no while [ ".$1" != . ]; do case $1 in -n ) newline=""; shift; continue ;; -e ) expand=yes; shift; continue ;; * ) break ;; esac done text="$*" # # check for broken escape sequence expansion # seo='' bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'` if [ ".$bytes" != .3 ]; then bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'` if [ ".$bytes" = .3 ]; then seo='-E' fi fi # # determine terminal bold sequence # term_bold='' tern_norm='' if [ $expand = yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then case $TERM in xterm|xterm*|vt220|vt220*) term_bold=`echo dummy | awk '{ printf("%c%c%c%c", 27, 91, 49, 109); }'` term_norm=`echo dummy | awk '{ printf("%c%c%c", 27, 91, 109); }'` ;; vt100|vt100*) term_bold=`echo dummy | awk '{ printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }'` term_norm=`echo dummy | awk '{ printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }'` ;; esac if [ ".$term_bold" = . -o ".$term_norm" = . ]; then md="`tput md 2>/dev/null`" me="`tput me 2>/dev/null`" if [ ".$md" != . -a ".$me" != . ]; then term_bold="$xmd" term_norm="$xme" fi fi if [ ".$term_bold" = . -o ".$term_norm" = . ]; then echo "$0:Warning: unable to determine terminal sequence for bold mode" 1>&2 fi fi # # determine user name # username='' if [ $expand = yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then username="$LOGNAME" if [ ".$username" = . ]; then username="$USER" if [ ".$username" = . ]; then username="`(whoami) 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$username" = . ]; then username="`(who am i) 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$username" = . ]; then username='unknown' fi fi fi fi fi # # determine user id # userid='' if [ $expand = yes -a ".`echo $text | egrep '%U'`" != . ]; then userid="`(id -u) 2>/dev/null`" if [ ".$userid" = . ]; then str="`(id) 2>/dev/null`" if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'` fi if [ ".$userid" = . ]; then userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'` if [ ".$userid" = . ]; then userid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'` if [ ".$userid" = . ]; then userid='?' fi fi fi fi fi # # determine host name # hostname='' if [ $expand = yes -a ".`echo $text | egrep '%h'`" != . ]; then hostname="`(uname -n) 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$hostname" = . ]; then hostname="`(hostname) 2>/dev/null |\ awk '{ printf("%s", $1); }'`" if [ ".$hostname" = . ]; then hostname='unknown' fi fi case $hostname in *.* ) domainname=".`echo $hostname | cut -d. -f2-`" hostname="`echo $hostname | cut -d. -f1`" ;; esac fi # # determine domain name # domainname='' if [ $expand = yes -a ".`echo $text | egrep '%d'`" != . ]; then if [ ".$domainname" = . ]; then if [ -f /etc/resolv.conf ]; then domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\ sed -e 's/.*domain//' \ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \ -e 's/^\.//' -e 's/^/./' |\ awk '{ printf("%s", $1); }'`" if [ ".$domainname" = . ]; then domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\ sed -e 's/.*search//' \ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \ -e 's/ .*//' -e 's/ .*//' \ -e 's/^\.//' -e 's/^/./' |\ awk '{ printf("%s", $1); }'`" fi fi fi fi # # determine current time # time_day='' time_month='' time_year='' time_monthname='' if [ $expand = yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then time_day="`date '+%d' | awk '{ printf("%s", $1); }'`" time_month="`date '+%m' | awk '{ printf("%s", $1); }'`" time_year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`" if test ".$time_year" = .; then time_year="`date '+%y' | awk '{ printf("%s", $1); }'`" case $time_year in 9[0-9]*) time_year="19$time_year" ;; *) time_year="20$time_year" ;; esac fi case $time_month in 1|01) time_monthname='Jan' ;; 2|02) time_monthname='Feb' ;; 3|03) time_monthname='Mar' ;; 4|04) time_monthname='Apr' ;; 5|05) time_monthname='May' ;; 6|06) time_monthname='Jun' ;; 7|07) time_monthname='Jul' ;; 8|08) time_monthname='Aug' ;; 9|09) time_monthname='Sep' ;; 10) time_monthname='Oct' ;; 11) time_monthname='Nov' ;; 12) time_monthname='Dec' ;; esac fi # # expand special ``%x'' constructs # if [ $expand = yes ]; then text=`echo $seo "$text" |\ sed -e "s;%B;${term_bold};g" \ -e "s;%b;${term_norm};g" \ -e "s;%u;${username};g" \ -e "s;%U;${userid};g" \ -e "s;%h;${hostname};g" \ -e "s;%d;${domainname};g" \ -e "s;%D;${time_day};g" \ -e "s;%M;${time_month};g" \ -e "s;%Y;${time_year};g" \ -e "s;%m;${time_monthname};g"` fi # # create output # echo dummy |\ awk '{ printf("%s%s", TEXT, NEWLINE); }' \ TEXT="$text" NEWLINE="$newline" ;; table ) # # command line parsing # width=15 cols=3 sep=':' strip=79 while [ ".$1" != . ]; do case $1 in -F ) sep="$2"; shift; shift; continue ;; -w ) width="$2"; shift; shift; continue ;; -c ) cols="$2"; shift; shift; continue ;; -s ) strip="$2"; shift; shift; continue ;; * ) break ;; esac done case x$sep in x? ) ;; * ) echo "$0:Error: Invalid seperator (one char allowed only)" 1>&2; exit 1 ;; esac if [ $cols -gt 4 ]; then echo "$0:Error: Invalid number of colums (1..4 allowed only)" 1>&2 exit 1 fi # # split the list into a table # list=` IFS="$sep" for entry in $*; do if [ ".$entry" != . ]; then echo "$entry" fi done |\ awk " BEGIN { list = \"\"; n = 0; } { list = list \\$1; n = n + 1; if (n < $cols) { list = list \":\"; } if (n == $cols) { list = list \"\\n\"; n = 0; } } END { print list; } " ` # # format table cells and make sure table # doesn't exceed maximum width # IFS=' ' for entry in $list; do case $cols in 1 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${width}s\\n\", \$1); }'" ;; 2 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${width}s %-${width}s\\n\", \$1, \$2); }'" ;; 3 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${width}s %-${width}s %-${width}s\\n\", \$1, \$2, \$3); }'" ;; 4 ) eval "echo \"\${entry}\" | awk -F: '{ printf(\"%-${width}s %-${width}s %-${width}s %-${width}s\\n\", \$1, \$2, \$3, \$4); }'" ;; esac done |\ awk "{ if (length(\$0) > $strip) { printf(\"%s\\n\", substr(\$0, 0, $strip-1)); } else { print \$0; } }" ;; prop ) # # command line parsing # prefix="" while [ ".$1" != . ]; do case $1 in -p ) prefix="$2"; shift; shift; continue ;; * ) break ;; esac done if [ $# -gt 0 ]; then echo "$0:Error: too much arguments" 1>&2 exit 1 fi perl='' for dir in `echo $PATH | sed -e 's/:/ /g'` .; do if [ -f "$dir/perl" ]; then perl="$dir/perl" break fi done if [ ".$perl" != . ]; then # Perl is preferred because writing to STDERR in # Perl really writes immediately as one would expect $perl -e ' @p = ("|","/","-","\\"); $i = 0; while () { printf(STDERR "\r%s...%s\b", $ARGV[0], $p[$i++]); $i = 0 if ($i > 3); } printf(STDERR "\r%s \n", $ARGV[0]); ' "$prefix" else # But when Perl doesn't exists we use Awk even # some Awk's buffer even the /dev/stderr writing :-( awk ' BEGIN { split("|#/#-#\\", p, "#"); i = 1; } { printf("\r%s%c\b", prefix, p[i++]) > "/dev/stderr"; if (i > 4) { i = 1; } } END { printf("\r%s \n", prefix) > "/dev/stderr"; } ' "prefix=$prefix" fi ;; move ) # # command line parsing # expand=no preserve=no while [ ".$1" != . ]; do case $1 in -e ) expand=yes ; shift; continue ;; -p ) preserve=yes ; shift; continue ;; * ) break ;; esac done if [ $# -ne 2 ]; then echo "$0:Usage: move [-e] [-p] " 1>&2 exit 1 fi src=$1 dst=$2 # # consistency checks # if [ ".$src" = . -o ".$dst" = . ]; then echo "$0:Error: Invalid arguments" 1>&2 exit 1 fi if [ ".$src" = ".$dst" ]; then echo "$0:Error: Source and destination files are the same" 1>&2 exit 1 fi expsrc="$src" if [ $expand = yes ]; then expsrc="`echo $expsrc`" fi if [ $expand = yes ]; then if [ ".`echo "$src" | sed -e 's;^.*\\*.*$;;'`" = ".$src" ]; then echo "$0:Error: Source doesn't contain wildcard ('*'): $dst" 1>&2 exit 1 fi if [ ".`echo "$dst" | sed -e 's;^.*%[1-9].*$;;'`" = ".$dst" ]; then echo "$0:Error: Destination doesn't contain substitution ('%N'): $dst" 1>&2 exit 1 fi if [ ".$expsrc" = ".$src" ]; then echo "$0:Error: Sources not found or no asterisk : $src" 1>&2 exit 1 fi else if [ ! -r "$src" ]; then echo "$0:Error: Source not found: $src" 1>&2 exit 1 fi fi # # determine substitution patterns # if [ $expand = yes ]; then srcpat=`echo "$src" | sed -e 's/\\./\\\\./g' -e 's/;/\\;/g' -e 's;\\*;\\\\(.*\\\\);g'` dstpat=`echo "$dst" | sed -e 's;%\([1-9]\);\\\\\1;g'` fi # # iterate over source(s) # for onesrc in $expsrc; do if [ $expand = yes ]; then onedst=`echo $onesrc | sed -e "s;$srcpat;$dstpat;"` else onedst="$dst" fi errorstatus=0 if [ -r $onedst ]; then if cmp -s $onesrc $onedst; then rm -f $onesrc || errstatus=$? else mv -f $onesrc $onedst || errstatus=$? fi else mv -f $onesrc $onedst || errstatus=$? fi if [ $errorstatus -ne 0 ]; then break; fi done # die gracefully exit $errorstatus ;; install ) # # put in absolute paths if you don't have them in your path; # or use env. vars. # mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" # # parse argument line # instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" ext="" src="" dst="" while [ ".$1" != . ]; do case $1 in -c) instcmd="$cpprog" shift; continue ;; -m) chmodcmd="$chmodprog $2" shift; shift; continue ;; -o) chowncmd="$chownprog $2" shift; shift; continue ;; -g) chgrpcmd="$chgrpprog $2" shift; shift; continue ;; -s) stripcmd="$stripprog" shift; continue;; -S) stripcmd="$stripprog $2" shift; shift; continue ;; -e) ext="$2" shift; shift; continue ;; *) if [ ".$src" = . ]; then src=$1 else dst=$1 fi shift; continue ;; esac done if [ ".$src" = . ]; then echo "install.sh: no input file specified" exit 1 fi if [ ".$dst" = . ]; then echo "install.sh: no destination specified" exit 1 fi # # If destination is a directory, append the input filename; if # your system does not like double slashes in filenames, you may # need to add some logic # if [ -d $dst ]; then dst="$dst/`basename $src`" fi # Add a possible extension (such as ".exe") to src and dst src="$src$ext" dst="$dst$ext" # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $instcmd $src $dsttmp # And set any options; do chmod last to preserve setuid bits if [ ".$chowncmd" != . ]; then $chowncmd $dsttmp; fi if [ ".$chgrpcmd" != . ]; then $chgrpcmd $dsttmp; fi if [ ".$stripcmd" != . ]; then $stripcmd $dsttmp; fi if [ ".$chmodcmd" != . ]; then $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $rmcmd $dst $mvcmd $dsttmp $dst exit 0 ;; mkdir ) # command line parsing mode="" force=0 parent=0 while [ ".$1" != . ]; do case $1 in -f) force=1; shift; continue ;; -p) parent=1; shift; continue ;; -m) mode="$2"; shift; shift; continue ;; *) break ;; esac done if [ $# -eq 0 ]; then echo "$0:Usage: mkdir [-f] [-p] [-m ] [ ...]" 1>&2 exit 1 fi errstatus=0 for p in ${1+"$@"}; do # when the directory already exists... if [ -d "$p" ]; then if [ $force = 0 ]; then echo "$0:Error: file exists: $p" 1>&2 errstatus=1 break else continue fi fi # when the directory has to be created if [ $parent = 0 ]; then mkdir $p || errstatus=$? else # the smart situation set fnord `echo ":$p" |\ sed -e 's/^:\//%/' \ -e 's/^://' \ -e 's/\// /g' \ -e 's/^%/\//'` shift pathcomp= for d in ${1+"$@"}; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp="./$pathcomp" ;; esac if [ ! -d "$pathcomp" ]; then mkdir $pathcomp || errstatus=$? if [ ".$mode" != . ]; then chmod $mode $pathcomp || errstatus=$? fi fi pathcomp="$pathcomp/" done fi done exit $errstatus ;; mkln ) # # command line parsing # verbose=no force=no symbolic=no while [ ".$1" != . ]; do case $1 in -v) verbose=yes; shift; continue ;; -f) force=yes; shift; continue ;; -s) symbolic=yes; shift; continue ;; *) break ;; esac done if [ $# -lt 2 ]; then echo "$0:Usage: mkln [-v] [-f] [-s] [ ...] " 1>&2 exit 1 fi args=$? srcs="" while [ $# -gt 1 ]; do srcs="$srcs $1" shift done dst="$1" if [ ! -d $dst ]; then if [ $args -gt 2 ]; then echo "$0:Error: multiple sources not allowed when destination isn't a directory" 1>&2 exit 1 fi fi # # determine link options # lnopt="" if [ $force = yes ]; then lnopt="$lnopt -f" fi if [ $symbolic = yes ]; then lnopt="$lnopt -s" fi # # iterate over sources # for src in $srcs; do # debugging if [ $verbose = yes ]; then echo "src=\"$src\" dst=\"$dst\":" fi # determine if one of the paths is an absolute path, # because then we _have_ to use an absolute symlink oneisabs=0 srcisabs=0 dstisabs=0 case $src in /* ) oneisabs=1; srcisabs=1 ;; esac case $dst in /* ) oneisabs=1; dstisabs=1 ;; esac # split source and destination into dir and base name if [ -d $src ]; then srcdir=`echo $src | sed -e 's;/*$;;'` srcbase="" else srcdir=`echo $src | sed -e 's;^[^/]*$;;' -e 's;^\(.*/\)[^/]*$;\1;' -e 's;\(.\)/$;\1;'` srcbase=`echo $src | sed -e 's;.*/\([^/]*\)$;\1;'` fi if [ -d $dst ]; then dstdir=`echo $dst | sed -e 's;/*$;;'` dstbase="" else dstdir=`echo $dst | sed -e 's;^[^/]*$;;' -e 's;^\(.*/\)[^/]*$;\1;' -e 's;\(.\)/$;\1;'` dstbase=`echo $dst | sed -e 's;.*/\([^/]*\)$;\1;'` fi # debugging if [ $verbose = yes ]; then echo " STATE 1:" echo " srcisabs=$srcisabs srcdir=\"$srcdir\" srcbase=\"$srcbase\"" echo " dstisabs=$dstisabs dstdir=\"$dstdir\" dstbase=\"$dstbase\"" echo " oneisabs=$oneisabs" fi # consistency check if [ ".$dstdir" != . ]; then if [ ! -d $dstdir ]; then echo "$0:Error: destination directory not found: $dstdir" 1>&2 exit 1 fi fi # make sure the source is reachable from the destination if [ $dstisabs = 1 ]; then if [ $srcisabs = 0 ]; then if [ -d $srcdir ]; then srcdir="`cd $srcdir; pwd | sed -e 's;/*$;;'`" srcisabs=1 oneisabs=1 # debugging if [ $verbose = yes ]; then echo " STATE 2:" echo " srcisabs=$srcisabs srcdir=\"$srcdir\" srcbase=\"$srcbase\"" echo " dstisabs=$dstisabs dstdir=\"$dstdir\" dstbase=\"$dstbase\"" echo " oneisabs=$oneisabs" fi fi fi fi # split away a common prefix prefix="" if [ ".$srcdir" = ".$dstdir" ] && [ ".$srcdir" != . ]; then prefix="$srcdir/" srcdir="" dstdir="" else while [ ".$srcdir" != . ] && [ ".$dstdir" != . ]; do presrc=`echo $srcdir | sed -e 's;^\([^/]*\)/.*;\1;'` predst=`echo $dstdir | sed -e 's;^\([^/]*\)/.*;\1;'` if [ ".$presrc" != ".$predst" ]; then break fi prefix="$prefix$presrc/" srcdir=`echo $srcdir | sed -e 's;^[^/]*/*;;'` dstdir=`echo $dstdir | sed -e 's;^[^/]*/*;;'` done fi # debugging if [ $verbose = yes ]; then echo " STATE 3:" echo " prefix=$prefix" echo " srcisabs=$srcisabs srcdir=\"$srcdir\" srcbase=\"$srcbase\"" echo " dstisabs=$dstisabs dstdir=\"$dstdir\" dstbase=\"$dstbase\"" echo " oneisabs=$oneisabs" fi # destination prefix is just the common prefix dstpre="$prefix" # determine source prefix which is the reverse directory # step-up corresponding to the destination directory srcpre="" if [ $oneisabs = 0 ] || [ ".$prefix" != . -a ".$prefix" != ./ ]; then pl="$dstdir/" OIFS="$IFS"; IFS='/' for pe in $pl; do [ ".$pe" = . ] && continue srcpre="../$srcpre" done IFS="$OIFS" else if [ $srcisabs = 1 ]; then srcpre="$prefix" fi fi # debugging if [ $verbose = yes ]; then echo " STATE 4:" echo " prefix=$prefix" echo " srcisabs=$srcisabs srcpre=\"$srcpre\" srcdir=\"$srcdir\" srcbase=\"$srcbase\"" echo " dstisabs=$dstisabs dstpre=\"$dstpre\" dstdir=\"$dstdir\" dstbase=\"$dstbase\"" echo " oneisabs=$oneisabs" fi # determine destination symlink name if [ ".$dstbase" = . ]; then if [ ".$srcbase" != . ]; then dstbase="$srcbase" else dstbase=`echo "$prefix$srcdir" | sed -e 's;/*$;;' -e 's;.*/\([^/]*\)$;\1;'` fi fi # now finalize source and destination directory paths srcdir=`echo $srcdir | sed -e 's;\([^/]\)$;\1/;'` dstdir=`echo $dstdir | sed -e 's;\([^/]\)$;\1/;'` # debugging if [ $verbose = yes ]; then echo " STATE 5:" echo " prefix=$prefix" echo " srcisabs=$srcisabs srcpre=\"$srcpre\" srcdir=\"$srcdir\" srcbase=\"$srcbase\"" echo " dstisabs=$dstisabs dstpre=\"$dstpre\" dstdir=\"$dstdir\" dstbase=\"$dstbase\"" echo " oneisabs=$oneisabs" fi # run the final link command if [ $verbose = yes ]; then echo " RESULT:" echo "ln$lnopt $srcpre$srcdir$srcbase $dstpre$dstdir$dstbase" fi eval ln$lnopt $srcpre$srcdir$srcbase $dstpre$dstdir$dstbase done exit 0 ;; mkshadow ) # default IFS DIFS=' ' # command line check if [ $# -ne 2 ]; then echo "$0:Error: Invalid aruments" 1>&2 exit 1 fi # source and destination directory src=`echo $1 | sed -e 's:/$::'` dst=`echo $2 | sed -e 's:/$::'` # check whether source exists if [ ! -d $src ]; then echo "$0:Error: source directory not found" 1>&2 exit 1 fi # determine if one of the paths is an absolute path, # because then we have to use an absolute symlink oneisabs=0 case $src in /* ) oneisabs=1 ;; esac case $dst in /* ) oneisabs=1 ;; esac # determine reverse directory for destination directory dstrevdir='' if [ $oneisabs = 0 ]; then # (inlined fp2rp) OIFS="$IFS"; IFS='/' for pe in $dst; do dstrevdir="../$dstrevdir" done IFS="$OIFS" else src="`cd $src; pwd`"; fi # create directory tree at destination if [ ! -d $dst ]; then mkdir $dst fi DIRS="`cd $src find . -type d -print |\ sed -e '/\/CVS/d' \ -e '/^\.$/d' \ -e 's:^\./::'`" OIFS="$IFS" IFS="$DIFS" for dir in $DIRS; do mkdir $dst/$dir done IFS="$OIFS" # fill directory tree with symlinks to files FILES="`cd $src find . -depth -print |\ sed -e '/\.o$/d' \ -e '/\.a$/d' \ -e '/\.so$/d' \ -e '/\.so-o$/d' \ -e '/\.cvsignore$/d' \ -e '/\/CVS/d' \ -e '/\.indent\.pro$/d' \ -e '/\.apaci.*/d' \ -e '/Makefile$/d' \ -e '/\/\.#/d' \ -e '/\.orig$/d' \ -e 's/^\.\///'`" OIFS="$IFS" IFS="$DIFS" for file in $FILES; do # don't use `-type f' above for find because of symlinks if [ -d $file ]; then continue fi basename=`echo $file | sed -e 's:^.*/::'` dir=`echo $file | sed -e 's:[^/]*$::' -e 's:/$::' -e 's:$:/:' -e 's:^/$::'` from="$src/$file" to="$dst/$dir$basename" if [ $oneisabs = 0 ]; then if [ ".$dir" != . ]; then subdir=`echo $dir | sed -e 's:/$::'` # (inlined fp2rp) revdir='' OIFS2="$IFS"; IFS='/' for pe in $subdir; do revdir="../$revdir" done IFS="$OIFS2" # finalize from from="$revdir$from" fi from="$dstrevdir$from" fi echo " $to" ln -s $from $to done IFS="$OIFS" ;; fixperm ) for p in $*; do for file in `find $p -depth -print`; do if [ -f $file ]; then if [ -x $file ]; then echo " $file (FILE/EXEC)" chmod 775 $file else echo " $file (FILE/REGULAR)" chmod 664 $file fi continue fi if [ -d $file ]; then echo " $file (DIR)" chmod 775 $file continue fi echo " $file (UNKNOWN)" done done ;; guessos ) MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown" RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown" SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown" VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown" XREL=`(uname -X) 2>/dev/null | grep "^Release" | awk '{print $3}'` if [ "x$XREL" != "x" ]; then if [ -f /etc/kconfig ]; then case "$XREL" in 4.0|4.1) echo "${MACHINE}-whatever-isc4"; exit 0 ;; esac else case "$XREL" in 3.2v4.2) echo "whatever-whatever-sco3"; exit 0 ;; 3.2v5.0*) echo "whatever-whatever-sco5"; exit 0 ;; 4.2MP) if [ "x$VERSION" = "x2.1.1" ]; then echo "${MACHINE}-whatever-unixware211"; exit 0 elif [ "x$VERSION" = "x2.1.2" ]; then echo "${MACHINE}-whatever-unixware212"; exit 0 else echo "${MACHINE}-whatever-unixware2"; exit 0 fi ;; 4.2) echo "whatever-whatever-unixware1"; exit 0 ;; 5) case "$VERSION" in 7*) echo "${MACHINE}-whatever-unixware7"; exit 0 ;; esac ;; esac fi fi case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in MiNT:*) echo "m68k-atari-mint"; exit 0 ;; A/UX:*) echo "m68k-apple-aux3"; exit 0 ;; AIX:*) echo "${MACHINE}-ibm-aix${VERSION}.${RELEASE}"; exit 0 ;; dgux:*) echo "${MACHINE}-dg-dgux"; exit 0 ;; HI-UX:*) echo "${MACHINE}-hi-hiux"; exit 0 ;; HP-UX:*) HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo "${MACHINE}-hp-hpux${HPUXVER}"; exit 0 ;; IRIX:*) if [ -f /usr/lib32/mips4/libm.so ]; then echo "${MACHINE}-sgi-irix32"; exit 0 else echo "${MACHINE}-sgi-irix"; exit 0 fi ;; IRIX64:*) echo "${MACHINE}-sgi-irix64"; exit 0 ;; Linux:[2-9].*) echo "${MACHINE}-whatever-linux2"; exit 0 ;; Linux:1.*) echo "${MACHINE}-whatever-linux1"; exit 0 ;; LynxOS:*) echo "${MACHINE}-lynx-lynxos"; exit 0 ;; BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*) echo "i486-whatever-bsdi"; exit 0 ;; BSD/386:*|BSD/OS:*) echo "${MACHINE}-whatever-bsdi"; exit 0 ;; FreeBSD:*) VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'` MACH=`sysctl -n hw.model` ARCH='whatever' case ${MACH} in *386* ) MACH="i386" ;; *486* ) MACH="i486" ;; Pentium\ II*) MACH="i686" ;; Pentium* ) MACH="i586" ;; Alpha* ) MACH="alpha" ;; * ) MACH="$MACHINE" ;; esac case ${MACH} in i[0-9]86 ) ARCH="pc" ;; esac echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0 ;; NetBSD:*:*:*486*) echo "i486-whatever-netbsd"; exit 0 ;; NetBSD:*) echo "${MACHINE}-whatever-netbsd"; exit 0 ;; OpenBSD:*) echo "${MACHINE}-whatever-openbsd"; exit 0 ;; OSF1:*:*:*alpha*) echo "${MACHINE}-dec-osf"; exit 0 ;; QNX:*) if [ "$VERSION" -gt 422 ]; then echo "${MACHINE}-qssl-qnx32" else echo "${MACHINE}-qssl-qnx" fi exit 0 ;; Paragon*:*:*:*) echo "i860-intel-osf1"; exit 0 ;; SunOS:5.*) SOLVER=`echo ${RELEASE}|awk -F. '{ if (NF < 3) printf "2%s0\n",$2 else printf "2%s%s\n",$2,$3 }'` echo "${MACHINE}-sun-solaris2.${SOLVER}"; exit 0 ;; SunOS:*) echo "${MACHINE}-sun-sunos4"; exit 0 ;; UNIX_System_V:4.*:*) echo "${MACHINE}-whatever-sysv4"; exit 0 ;; unix:3.0.9*:*:88k) echo "${MACHINE}-encore-sysv4"; exit 0 ;; *:4*:R4*:m88k) echo "${MACHINE}-whatever-sysv4"; exit 0 ;; UnixWare:5:99*:*) # Gemini, beta release of next rev of unixware echo "${MACHINE}-whatever-unixware212"; exit 0 ;; DYNIX/ptx:4*:*) echo "${MACHINE}-whatever-sysv4"; exit 0 ;; *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*) echo "x86-ncr-sysv4"; exit 0 ;; ULTRIX:*) echo "${MACHINE}-unknown-ultrix"; exit 0 ;; SINIX-?:* | ReliantUNIX-?:*) echo "${MACHINE}-siemens-sysv4"; exit 0 ;; POSIX*BS2000) echo "${MACHINE}-siemens-sysv4"; exit 0 ;; machten:*) echo "${MACHINE}-tenon-${SYSTEM}"; exit 0; ;; ConvexOS:*:11.*:*) echo "${MACHINE}-v11-${SYSTEM}"; exit 0; ;; UNIX_SV:*:*:maxion) echo "${MACHINE}-ccur-sysv4"; exit 0; ;; PowerMAX_OS:*:*:Night_Hawk) MACHINE=`uname -p` echo "${MACHINE}-concurrent-powermax"; exit 0; ;; UNIX_SV:*) if [ -d /usr/nec ];then echo "mips-nec-sysv4"; exit 0; fi ;; NonStop-UX:4.[02]*:[BC]*:*) echo "${MACHINE}-tandem-sysv4"; exit 0; ;; Rhapsody:*:*:*) case "${MACHINE}" in Power*) MACHINE=powerpc ;; esac echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0 ;; "RISC iX":*) echo "arm-whatever-riscix"; exit 0; ;; *:4.0:2:*) echo "whatever-unisys-sysv4"; exit 0; ;; *:*:dcosx:NILE*) echo "pyramid-pyramid-svr4"; exit 0; ;; *:*:*:"DRS 6000") echo "drs6000-whatever-whatever"; exit 0; ;; esac # existance of the /usr/apollo directory is proof enough for Apollo if [ -d /usr/apollo ]; then echo "whatever-apollo-whatever" exit 0 fi # Now NeXT ISNEXT=`hostinfo 2>/dev/null` case "$ISNEXT" in *NeXT*) # Swiped from a friendly uname clone for NEXT/OPEN Step. NEXTOSVER="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`" if [ "$NEXTOSVER" -gt 3.3 ]; then NEXTOS="openstep" else NEXTOS="nextstep" fi NEXTREL="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`" NEXTARCH=`arch` echo "${NEXTARCH}-next-${NEXTOS}${NEXTREL}" ; exit 0 ;; esac echo "${MACHINE}-whatever-${SYSTEM}|${RELEASE}|${VERSION}" ;; arx ) # # command line parsing # verbose=no while [ ".$1" != . ]; do case $1 in -v) verbose=yes; shift; continue ;; *) break ;; esac done if [ $# -le 4 ]; then echo "$0:Usage: arx [-v] [ ...]" 1>&2 exit 1 fi ar_prg=$1; shift ar_cmd=$1; shift archive=$1; shift files="$*" # # walk through the file list and expand archives members # tmpdir=`echo $archive | sed -e 's;[^/]*$;.arx;'` nfiles="" for file in $files; do if [ ! -f $file ]; then echo "$0:Error: input file not found: $file" 1>&2 exit 1 fi case $file in *.a ) if [ ! -d $tmpdir ]; then if [ $verbose = yes ]; then echo "mkdir $tmpdir" fi mkdir $tmpdir fi case $tmpdir in .arx ) from="../$file" ;; * ) dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'` base=`echo $file | sed -e 's;.*/\([^/]*\)$;\1;'` from="`cd $dir; pwd`/$base" ;; esac if [ $verbose = yes ]; then echo "(cd $tmpdir && $ar_prg x $from)" fi (cd $tmpdir && eval $ar_prg x $from) if [ $? -ne 0 ]; then echo "$0:Error: member extraction failed for archive: $file" 1>&2 exit 1 fi for member in - `eval $ar_prg t $file`; do [ ".$member" = .- ] && continue nfiles="$nfiles $tmpdir/$member" done ;; * ) nfiles="$nfiles $file" ;; esac done # # run the final archive command # if [ $verbose = yes ]; then echo "$ar_prg $ar_cmd $archive $nfiles" fi eval $ar_prg $ar_cmd $archive $nfiles if [ $? -ne 0 ]; then echo "$0:Error: archive command failed" 1>&2 exit $? fi # # cleanup and die gracefully # if [ -d $tmpdir ]; then if [ $verbose = yes ]; then echo "rm -rf $tmpdir" fi rm -rf $tmpdir fi exit 0 ;; slo ) DIFS=' ' # # parse out -L and -l options from command line # DIRS='' LIBS='' ARGV='' optprev="" OIFS="$IFS" IFS="$DIFS" for opt do # concatenate with previous option if exists if [ ".$optprev" != . ]; then opt="${optprev}${opt}"; optprev='' fi # remember options for arg when used stand-alone if [ ".$opt" = ".-L" -o ".$opt" = ".-l" ]; then optprev="$opt" continue; fi # split argument into option plus option argument arg="`echo $opt | cut -c3-`" opt="`echo $opt | cut -c1-2`" # store into containers case $opt in -L) DIRS="$DIRS:$arg" ;; -l) LIBS="$LIBS:$arg" ;; *) ARGV="$ARGV $opt" ;; esac done IFS="$OIFS" # # set linker default directories # DIRS_DEFAULT='/lib:/usr/lib' if [ ".$LD_LIBRARY_PATH" != . ]; then DIRS_DEFAULT="$DIRS_DEFAULT:$LD_LIBRARY_PATH" fi # # sort options by class # DIRS_OBJ='' LIBS_OBJ='' DIRS_PIC='' LIBS_PIC='' DIRS_DSO='' LIBS_DSO='' # for each library... OIFS="$IFS" IFS=':' for lib in $LIBS; do [ ".$lib" = . ] && continue found='no' found_indefdir='no' found_type='' found_dir='' # for each directory... OIFS2="$IFS" IFS=":$DIFS" for dir in ${DIRS} switch-to-defdirs ${DIRS_DEFAULT}; do [ ".$dir" = . ] && continue [ ".$dir" = .switch-to-defdirs ] && found_indefdir=yes [ ! -d $dir ] && continue # search the file OIFS3="$IFS" IFS="$DIFS" for file in '' `cd $dir && ls lib${lib}.* 2>/dev/null`; do [ ".$file" = . ] && continue case $file in *.so|*.so.[0-9]*|*.sl|*.sl.[0-9]* ) found=yes; found_type=DSO; break ;; *.lo|*.la ) found=yes; found_type=PIC ;; *.a ) if [ ".$found_type" = . ]; then found=yes found_type=OBJ fi ;; esac done IFS="$OIFS3" if [ ".$found" = .yes ]; then found_dir="$dir" break fi done IFS="$OIFS2" if [ ".$found" = .yes ]; then if [ ".$found_indefdir" != .yes ]; then eval "dirlist=\"\${DIRS_${found_type}}:\"" if [ ".`echo \"$dirlist\" | fgrep :$found_dir:`" = . ]; then eval "DIRS_${found_type}=\"\$DIRS_${found_type}:${found_dir}\"" fi eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\"" else eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\"" fi else LIBS_OBJ="$LIBS_OBJ:$lib" #dirlist="`echo $DIRS $DIRS_DEFAULT | sed -e 's/:/ /g'`" #echo "slo:Warning: library \"$lib\" not found in any of the following dirs:" 2>&1 #echo "slo:Warning: $dirlist" 1>&1 fi done IFS="$OIFS" # # also pass-through unused dirs even if it's useless # OIFS="$IFS" IFS=':' for dir in $DIRS; do dirlist="${DIRS_OBJ}:${DIRS_PIC}:${DIRS_DSO}:" if [ ".`echo \"$dirlist\" | fgrep :$dir:`" = . ]; then DIRS_OBJ="$DIRS_OBJ:$dir" fi done IFS="$OIFS" # # reassemble the options but seperated by type # OIFS="$IFS" IFS="$DIFS" for type in OBJ PIC DSO; do OIFS2="$IFS" IFS=':' eval "libs=\"\$LIBS_${type}\"" opts='' for lib in $libs; do [ ".$lib" = . ] && continue opts="$opts -l$lib" done eval "LIBS_${type}=\"$opts\"" eval "dirs=\"\$DIRS_${type}\"" opts='' for dir in $dirs; do [ ".$dir" = . ] && continue opts="$opts -L$dir" done eval "DIRS_${type}=\"$opts\"" IFS="$OIFS2" done IFS="$OIFS" # # give back results # OIFS="$IFS" IFS="$DIFS" for var in ARGV DIRS_OBJ LIBS_OBJ DIRS_PIC LIBS_PIC DIRS_DSO LIBS_DSO; do eval "val=\"\$${var}\"" val="`echo $val | sed -e 's/^ *//'`" echo "SLO_${var}=\"${val}\"" done IFS="$OIFS" ;; version ) LANGUAGE=txt NAME=unknown PREFIX=unknown FULLVERSION=unknown REPORT=NO INCREASE=P USAGE=NO FILE="" while [ ".$1" != . ]; do case $1 in -l) LANGUAGE=$2; shift; shift; continue ;; -n) NAME=$2; shift; shift; continue ;; -p) PREFIX=$2; shift; shift; continue ;; -s) FULLVERSION=$2; shift; shift; continue ;; -i) INCREASE=$2; shift; shift; continue ;; -d) REPORT=$2; shift; shift; continue ;; -h) USAGE=YES; shift; continue ;; *) break; esac done if [ $# -ne 1 ]; then USAGE=YES else FILE=$1 fi if [ ".$USAGE" = .YES ]; then echo "$0:Usage: version [options] file" echo "Options are:" echo "-l set language to one of 'txt', 'c' or 'perl'" echo "-n set program name" echo "-p set symbol prefix" echo "-s .[.pb]

set version string" echo "-i v|r|P|p|b|a|s increase version, revision or {alpha,batch,patch,snap} level" echo "-d short|long|libtool|hex display current version only" echo "-h print this page" exit 0 fi # determine language if [ ".$LANGUAGE" = .unknown ]; then case $FILE in *.txt ) LANGUAGE=txt ;; *.c ) LANGUAGE=c ;; *.pl | *.pm ) LANGUAGE=perl ;; * ) echo "$0:Error: Unknown language type" 1>&2; exit 1 ;; esac fi # determine prefix from name and vice versa if [ ".$PREFIX" = . -o ".$PREFIX" = .unknown ]; then if [ ".$NAME" != . -a ".$NAME" != .unknown ]; then PREFIX="$NAME" fi fi if [ ".$NAME" = . -o ".$NAME" = .unknown ]; then if [ ".$PREFIX" != . -a ".$PREFIX" != .unknown ]; then NAME="$PREFIX" fi fi # determine version date=unknown if [ ".$FULLVERSION" = .unknown ]; then if [ -r "$FILE" ]; then # grep out current information id=`grep 'Version [0-9]*.[0-9]*[.abps][0-9]* ([0-9]*-[a-zA-Z]*-[0-9]*)' $FILE | \ head -1 | \ sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([.abps]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\1:\2:\3:\4:\5%'` version=`echo $id | awk -F: '{ print $1 }'` revision=`echo $id | awk -F: '{ print $2 }'` bptype=`echo $id | awk -F: '{ print $3 }'` bplevel=`echo $id | awk -F: '{ print $4 }'` date=`echo $id | awk -F: '{ print $5 }'` if [ .$REPORT = .NO ]; then case $INCREASE in b ) bplevel=`expr $bplevel + 1` bptype=b ;; a ) bplevel=`expr $bplevel + 1` bptype=a ;; s ) bplevel=`expr $bplevel + 1` bptype=s ;; P ) bplevel=`expr $bplevel + 1` bptype=. ;; p ) bplevel=`expr $bplevel + 1` bptype=p ;; r ) revision=`expr $revision + 1` bplevel=0 ;; v ) version=`expr $version + 1` revision=0 bplevel=0 ;; esac date=calc fi FULLVERSION="$version.$revision$bptype$bplevel" else # intialise to first version version=0 revision=5 bptype=b bplevel=0 date=calc fi else # take given version V=`echo $FULLVERSION | sed -e 's%\([0-9]*\)\.\([0-9]*\)\([.abps]\)\([0-9]*\).*%\1:\2:\3:\4%'` version=`echo $V | awk -F: '{ print $1 }'` revision=`echo $V | awk -F: '{ print $2 }'` bptype=`echo $V | awk -F: '{ print $3 }'` bplevel=`echo $V | awk -F: '{ print $4 }'` date=calc fi # determine hex value of version case $FULLVERSION in *.*a* ) HEX=`echo "$FULLVERSION" | sed -e 's/a.*//' | awk -F. '{ printf("%d%02d", $1, $2); }' && echo "$FULLVERSION" | sed -e 's/.*a//' | awk '{ printf("0%02d", $1); }'` ;; *.*b* ) HEX=`echo "$FULLVERSION" | sed -e 's/b.*//' | awk -F. '{ printf("%d%02d", $1, $2); }' && echo "$FULLVERSION" | sed -e 's/.*b//' | awk '{ printf("1%02d", $1); }'` ;; *.*.* ) HEX=`echo "$FULLVERSION" | awk -F. '{ printf("%d%02d2%02d", $1, $2, $3); }'` ;; esac # determine libtool version case $FULLVERSION in *.*a* ) LTV=`echo "$FULLVERSION" | sed -e 's/a.*//' | awk -F. '{ printf("%d:0", $1*10+$2); }'` ;; *.*b* ) LTV=`echo "$FULLVERSION" | sed -e 's/b.*//' | awk -F. '{ printf("%d:0", $1*10+$2); }'` ;; *.*.* ) LTV=`echo "$FULLVERSION" | awk -F. '{ printf("%d:%d", $1*10+$2, $3); }'` ;; esac # determine string out of filename FILESTR=`echo "$FILE" | tr 'abcdefghijklmnopqrstuvwxyz./%+-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_____'` # determine date if [ ".$date" = .calc ]; then day="`date '+%d' | awk '{ printf("%s", $1); }'`" month="`date '+%m' | awk '{ printf("%s", $1); }'`" year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`" if test ".$time_year" = .; then year="`date '+%y' | awk '{ printf("%s", $1); }'`" case $year in 9[0-9]*) year="19$year" ;; *) year="20$year" ;; esac fi case $month in 1|01) month='Jan' ;; 2|02) month='Feb' ;; 3|03) month='Mar' ;; 4|04) month='Apr' ;; 5|05) month='May' ;; 6|06) month='Jun' ;; 7|07) month='Jul' ;; 8|08) month='Aug' ;; 9|09) month='Sep' ;; 10) month='Oct' ;; 11) month='Nov' ;; 12) month='Dec' ;; esac date="${day}-${month}-${year}" fi if [ .$REPORT != .NO ]; then case $REPORT in long ) echo "$version.$revision$bptype$bplevel ($date)" ;; short ) echo "$version.$revision$bptype$bplevel" ;; libtool ) echo "$LTV" ;; hex ) echo "0x$HEX" ;; esac exit 0 fi # create the version file according the the selected language echo "new version: $version.$revision$bptype$bplevel ($date)" tmpfile="/tmp/version.tmp.$$" rm -f $tmpfile >/dev/null 2>&1 case $LANGUAGE in txt ) cat >$tmpfile <<'EOT' This is @NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@) EOT ;; c ) cat >$tmpfile <<'EOT' /* ** @FILE@ -- Version File (automatically generated and maintained by shtool) */ #ifdef AS_HEADER #ifndef @FILESTR@ #define @FILESTR@ #define @PREFIX@_VERSION 0x@HEX@ extern const int @PREFIX@_Version; extern const char @PREFIX@_VersionStr[]; extern const char @PREFIX@_Hello[]; extern const char @PREFIX@_GNUVersion[]; extern const char @PREFIX@_WhatID[]; extern const char @PREFIX@_RCSIdentID[]; extern const char @PREFIX@_WebID[]; extern const char @PREFIX@_PlainID[]; #endif #else const int @PREFIX@_Version = 0x@HEX@; const char @PREFIX@_VersionStr[] = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; const char @PREFIX@_Hello[] = "This is @NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; const char @PREFIX@_GNUVersion[] = "@NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; const char @PREFIX@_WhatID[] = "@(#)@NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; const char @PREFIX@_RCSIdentID[] = "$Id: @NAME@ @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ @DAY@-@MONTH@-@YEAR@ $"; const char @PREFIX@_WebID[] = "@NAME@/@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; const char @PREFIX@_PlainID[] = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; #endif EOT ;; perl ) cat >$tmpfile <<'EOT' ## ## @FILE@ -- Version File (automatically generated and maintained by shtool) ## $@PREFIX@_Version = 0x@HEX@; $@PREFIX@_VersionStr = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; $@PREFIX@_Hello = "This is @NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; $@PREFIX@_GNUVersion = "@NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; $@PREFIX@_WhatID = "@(#)@NAME@ Version @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ (@DAY@-@MONTH@-@YEAR@)"; $@PREFIX@_RCSIdentID = "\$Id: @NAME@ @VERSION@.@REVISION@@BPTYPE@@BPLEVEL@ @DAY@-@MONTH@-@YEAR@ \$"; $@PREFIX@_WebID = "@NAME@/@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; $@PREFIX@_PlainID = "@VERSION@.@REVISION@@BPTYPE@@BPLEVEL@"; 1; EOT ;; esac # now create the version file rm -f $FILE >/dev/null 2>&1 sed \ -e "s|@FILE@|$FILE|g" \ -e "s|@FILESTR@|$FILESTR|g" \ -e "s|@PREFIX@|$PREFIX|g" \ -e "s|@NAME@|$NAME|g" \ -e "s|@HEX@|$HEX|g" \ -e "s|@VERSION@|$version|g" \ -e "s|@REVISION@|$revision|g" \ -e "s|@BPTYPE@|$bptype|g" \ -e "s|@BPLEVEL@|$bplevel|g" \ -e "s|@YEAR@|$year|g" \ -e "s|@MONTH@|$month|g" \ -e "s|@DAY@|$day|g" <$tmpfile >$FILE rm -f $tmpfile >/dev/null 2>&1 exit 0 ;; path ) # # parse argument line # silent=no reverse=no magic=no dirname=no basename=no pathlist="$PATH" namelist="" tmpfile="/tmp/path.tmp.$$" while [ ".$1" != . ]; do case $1 in -s ) silent=yes ; shift; continue ;; -r ) reverse=yes ; shift; continue ;; -d ) dirname=yes ; shift; continue ;; -b ) basename=yes ; shift; continue ;; -m ) magic=yes ; shift; continue ;; -p ) pathlist="$2"; shift; shift; continue ;; * ) break ;; esac done if [ $# -eq 0 ]; then echo "$0:Usage: path [-s] [-r] [-d] [-b] [-p ] [ ...]" 1>&2 exit 1 fi namelist="$*" # # check whether the test command supports the -x option # cat >$tmpfile </dev/null; then minusx="-x" else minusx="-r" fi rm -f $tmpfile # # split path string # paths="`echo $pathlist |\ sed -e 's/^:/.:/' \ -e 's/::/:.:/g' \ -e 's/:$/:./' \ -e 's/:/ /g'`" # # SPECIAL REQUEST # translate forward to reverse path # if [ $reverse = yes ]; then if [ "x$namelist" = "x." ]; then rp='.' else rp='' for pe in `IFS="$IFS/"; echo $namelist`; do rp="../$rp" done fi echo $rp | sed -e 's:/$::' exit 0 fi # # SPECIAL REQUEST # strip out directory or base name # if [ $dirname = yes ]; then echo "$namelist" |\ sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' exit 0 fi if [ $basename = yes ]; then echo "$namelist" |\ sed -e 's;.*/\([^/]*\)$;\1;' exit 0 fi # # MAGIC SITUATION # Perl Interpreter (perl) # if [ ".$magic" = .yes ] && [ ".$namelist" = .perl ]; then rm -f $tmpfile touch $tmpfile c=0 found=0 for dir in $paths; do dir=`echo $dir | sed -e 's;/*$;;'` for perl in perl5 perl miniperl; do if [ $minusx "$dir/$perl" ]; then perl="$dir/$perl" version=`$perl -v | grep version |\ sed -e 's/.* version //' -e 's/ built.*//' -e 's/ with.*//'` versionnum="`echo $version | sed -e 's/\.//g' -e 's/_//g'`" versionnum=`expr $versionnum - $c` echo "$versionnum $perl" >>$tmpfile found=1 fi done c=`expr $c + 1` done if [ $found = 1 ]; then perl="`cat $tmpfile | sort -u | tail -1 | cut '-d ' -f2`" rm -f $tmpfile echo "$perl" exit 0 fi exit 1 fi # # MAGIC SITUATION # C pre-processor (cpp) # if [ ".$magic" = .yes ] && [ ".$namelist" = .cpp ]; then cat >$tmpfile.c < Syntax Error EOT # 1. try the standard cc -E approach cpp="${CC-cc} -E" (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out my_error=`grep -v '^ *+' $tmpfile.out` if [ ".$my_error" != . ]; then # 2. try the cc -E approach and GCC's -traditional-ccp option cpp="${CC-cc} -E -traditional-cpp" (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out my_error=`grep -v '^ *+' $tmpfile.out` if [ ".$my_error" != . ]; then # 3. try a standalone cpp command in path and lib dirs for path in $paths /lib /usr/lib /usr/local/lib; do path=`echo $path | sed -e 's;/*$;;'` if [ $minusx "$path/cpp" ] && [ ! -d "$path/cpp" ]; then cpp="$path/cpp" break fi done if [ ".$cpp" != . ]; then (eval "$cpp $tmpfile.c >/dev/null") 2>$tmpfile.out my_error=`grep -v '^ *+' $tmpfile.out` if [ ".$my_error" != . ]; then # ok, we gave up... cpp='' fi fi fi fi rm -f $tmpfile.c $tmpfile.out if [ ".$cpp" != . ]; then echo "$cpp" exit 0 fi exit 1 fi # # STANDARD SITUATION # iterate over names # for name in $namelist; do # iterate over paths for path in $paths; do path=`echo $path | sed -e 's;/*$;;'` if [ $minusx "$path/$name" ] && [ ! -d "$path/$name" ]; then if [ "$silent" != "yes" ]; then echo "$path/$name" fi exit 0 fi done done exit 1 ;; * ) echo "$0:Error: Unknown command" 2>&1 echo "$0:Hint: Run 'shtool.gen -h' for usage" 2>&1 exit 1 ;; esac ##EOF## netdiag-1.2/tcpblast-20011111/strsep.c000066400000000000000000000034751323731111400171600ustar00rootroot00000000000000/* Copyright (C) 1992, 93, 96, 97, 98, 99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #undef __strsep #undef strsep char * strsep (char **stringp, const char *delim) { char *begin, *end; begin = *stringp; if (begin == NULL) return NULL; /* A frequent case is when the delimiter string contains only one character. Here we don't need to call the expensive `strpbrk' function and instead work using `strchr'. */ if (delim[0] == '\0' || delim[1] == '\0') { char ch = delim[0]; if (ch == '\0') end = NULL; else { if (*begin == ch) end = begin; else if (*begin == '\0') end = NULL; else end = strchr (begin + 1, ch); } } else /* Find the end of the token. */ end = strpbrk (begin, delim); if (end) { /* Terminate the token and set *STRINGP past NUL character. */ *end++ = '\0'; *stringp = end; } else /* No more delimiters; this is the last token. */ *stringp = NULL; return begin; } netdiag-1.2/tcpblast-20011111/tcpblast.c000066400000000000000000000710621323731111400174510ustar00rootroot00000000000000/* Taken in 1996 from FreeBSD: * * tcpblast - test and estimate TCP throuput * * Daniel Karrenberg */ /* * Changes and extensions: 1996-2000 Rafal Maszkowski * * ftp://ftp.6bone.pl/pub/blast/README */ char verstr[30]="FreeBSD + rzm ", *vdate=VERSION; #include #include #include #include #include #include #include #include #include /* for Solaris */ #include #include #include #include #include #include /* fcntl() */ #include /* signal() */ #include /* for Solaris */ #include "compat.h" #include /* TCP_MAXSEG */ #if defined(__sunos__) || defined(__osf1__) #define strerror(x) atoi(x) char *gettext(x) char *x; { return x; } #endif #define _(msg) msg /* to fit time difference in one variable we are scaling s*(1000*USCALE)+us/(1000/USCALE) */ #define USCALE 100 #define DEFBLKSIZE (1024) #define MAXBLKSIZE (32*1024) #define MAXBLOCKS 10000000 /* options to make printresult() arguments list shorter */ #define PRRES_VERBMASK 7 #define PRRES_SCROLL 8 #define PRRES_RD 16 #define PRRES_WR 32 #define PRRES_SHOW 64 /* circular buffer element containing time and written/read bytes */ typedef struct { long t, b; } cbelem; /* unit conversion */ typedef struct { char *unit; int val; } unitelem; struct sockaddr_in sock_in; struct in_addr source; #ifdef HAVE_IN6_ADDR struct in6_addr source6; #endif /* HAVE_IN6_ADDR */ struct servent *sp; struct hostent *host; struct timeval t0; struct timezone tz; char wbuff[MAXBLKSIZE], rbuff[MAXBLKSIZE], *ind, port[30]="9"; long readall=0, writeall=0; unsigned long delay=0; int af = AF_INET, f, bufsize=0, tcp=0, udp=0, randomb=0, blksize=DEFBLKSIZE, setbufsize=-1, dots=1, continuous=1, experimental=0, verbosity=0, lastnwb=1, lastnrb=1, reading=0, writing=1, comparing=0, scroll=0, maxwrblk=300, maxrdblk=0, maxtime=0, lport=0 /* any */, rate=0, family=PF_UNSPEC, maxseg=-1, opt_source=0; ; struct ratetime { struct timeval rrate, time; }; struct ratetime *ratetab = NULL; void usage(char *name) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: %s [options] destination[:port]\n\n", name); fprintf(stderr, "tcpblast/udpblast is a simple tool for probing network and estimating its\n"); fprintf(stderr, "throughput. By default it sends %d blocks (1024 bytes each) of data to\n", maxwrblk); fprintf(stderr, "specified destination host.\n"); #ifdef HAVE_GETADDRINFO fprintf(stderr, "Destination can be name or address, IPv4 or IPv6. When IPv6 address is specified\n"); fprintf(stderr, "with port it should look like: '[3ffe:8010::1]:9' (with single quotes to prevent\n"); fprintf(stderr, "shell expansion of []).\n"); #endif /* HAVE_GETADDRINFO */ fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); #ifdef HAVE_GETADDRINFO fprintf(stderr, "-4, --ipv4 use only ipv4 address\n"); fprintf(stderr, "-6, --ipv6 use only ipv6 address\n"); #endif /* HAVE_GETADDRINFO */ fprintf(stderr, "-a send random data\n"); fprintf(stderr, "-b BUF_SIZE socket buf size (default: %d == %s), with `-' to\n", setbufsize, setbufsize==-1 ? "don't change" : "change"); fprintf(stderr, " be substracted from results\n"); fprintf(stderr, "-c, --count BLOCKS change default (%d) number of blocks, range: 1..%d\n", maxwrblk, MAXBLOCKS); fprintf(stderr, "-d DOTFREQ print dot every DOTFREQ blocks, disables cont. speed disp. \n"); /* fprintf(stderr, "-f FILE send FILE instead of generated data\n") ; */ fprintf(stderr, "-h, --help this help\n"); fprintf(stderr, "-i, --delay DELAY write delay in microseconds (EXPERIMENTAL)\n"); fprintf(stderr, "-l, --last BLKS show also speed for last BLKS blocks\n"); fprintf(stderr, "-m results for every block in separate line\n"); fprintf(stderr, "-n, --nwrite do not write, use e.g. with chargen port\n"); fprintf(stderr, "-o switch from continuous speed displaying to dots printing\n"); fprintf(stderr, "-p PORT bind this local PORT\n"); fprintf(stderr, "-q --quiet show only final statistics\n"); fprintf(stderr, "-r, --read read data returned to us, switches default port to echo\n"); fprintf(stderr, "-R, --rate RATESPEC limit the speed according to the RATESPEC\n"); fprintf(stderr, "-S, --source ADDRESS source (locally bound) IPv4 or IPv6 ADDRESS\n"); fprintf(stderr, "-s BLOCK_SIZE block size (default %d bytes)\n", blksize); fprintf(stderr, "-t MAXTIME limit time to MAXTIME (up to %.0f h)\n", 4.294967295e9/(1000*USCALE)); fprintf(stderr, " --tcp use TCP (%s)\n", ind[0]=='t' ? "default" : "default if named tcpblast" ); fprintf(stderr, " --udp use UDP (%s)\n", ind[0]=='u' ? "default" : "default if named udpblast" ); fprintf(stderr, "-v, --verbosity verbosity, default 0, maximum 3. -v adds time display, -vv\n"); fprintf(stderr, " also speed in B/s, -v - speed in b/s.\n"); fprintf(stderr, "-V, --version version\n"); fprintf(stderr, "-x, --maxseg SIZE setting packet SIZE using TCP_MAXSEG\n"); fprintf(stderr, "destination host name or address\n"); fprintf(stderr, "port use port #/name xyz instead of default port %s\n", port); fprintf(stderr, "\n"); fprintf(stderr, "RATESPEC RATE[,TIME][:RATE[,TIME]]...\n"); fprintf(stderr, "RATE generating data at RATE speed in B/s\n"); fprintf(stderr, "TIME for TIME seconds (can be floating point number), last can\n"); fprintf(stderr, " be omitted and that time will be infinite\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options -b, -c, -R, -s and -t can use case insensitive unit multipliers and\n"); fprintf(stderr, "specifiers:\n"); fprintf(stderr, " size (bytes):\n"); fprintf(stderr, " -b and -s argument without units is in bytes, can use [{k,m,g}]b (lower\n"); fprintf(stderr, " or upper case) for KB, MB or GB. {k,m,g} are powers of 1024.\n"); fprintf(stderr, " number:\n"); fprintf(stderr, " -c argument is just a number, can have k, m or g added (powers of 1024),\n"); fprintf(stderr, " no unit needed\n"); fprintf(stderr, " rate (bytes pes second):\n"); fprintf(stderr, " -R RATE is in B/s or Bps, the postfixes can be [{k,m,g}]{b/s,bps}\n"); fprintf(stderr, " time (seconds):\n"); fprintf(stderr, " -t and -R TIME argument is in seconds, can be postfixed with\n"); fprintf(stderr, " [{k,m,g}]{s,min,h,w,m,y}\n"); fprintf(stderr, "\n"); fprintf(stderr, "Example:\n"); fprintf(stderr, " tcpblast -b 4KB -c 10k -R 10KBps,2:20kbps,3s target\n"); fprintf(stderr, "\n"); fprintf(stderr, "%s version: %s\n", name, verstr); exit(0); } void usage_small(char *name) { fprintf(stderr, "type %s --help for help\n", name); exit(0); } /* randomize the buffer */ void randbuff(int blksize) { int i; for (i=0; i0 we additionally count speed fo last n blocks options PRRES_VERBMASK - 3 bits, PRRES_SCROLL, PRRES_RD, PRRES_WR, PRRES_SHOW global: max{wr|rd}blk loop limir for written/read blocks */ void printresult(struct timeval t0, long writeall, long readall, int bufsize, int lastnwb, int lastnrb, int options) { static int circrbufset = 0, circwbufset = 0, cbrsize, cbwsize, cbrptr, cbwptr; static cbelem *circrbuf = NULL, *circwbuf = NULL; unsigned long wtime, rtime, dwtime=0, drtime=0, pwtime, prtime; /* 0s to shut up -Wall */ int rd, wr, vrb, show; wtime = rtime = gettdiff(t0); rd = options&PRRES_RD; wr = options&PRRES_WR; vrb = options&PRRES_VERBMASK; show = options&PRRES_SHOW; if (show && !(options&PRRES_SCROLL)) printf("\r"); /* possible future expansion: reset the table if # of KBs changes (or shrink/extend in next version) */ if (wr && circwbufset && (lastnwb != cbwsize)) { circwbufset = 0; if (circwbuf) free(circwbuf); } if (rd && circrbufset && (lastnrb != cbrsize)) { circrbufset = 0; if (circrbuf) free(circrbuf); } if (wr && (lastnwb>0)) { if (circwbufset) { /* we are not advancing the pointer if no new bytes were found; comparing with b+blksize handles special case when we finish blocked and # of bytes is uneven, we can avoid using a new time after long blocking, we will still use the last # of bytes when calculating speed */ if (writeall >= circwbuf[cbwptr % cbwsize].b + blksize) { cbwptr++; circwbuf[cbwptr % cbwsize].t = wtime; circwbuf[cbwptr % cbwsize].b = writeall; } else { /* instead of dissolving the rate we are using 'stale' style */ wtime = circwbuf[cbwptr % cbwsize].t; } pwtime = circwbuf[(cbwptr + 1) % cbwsize].t; if (pwtime >= wtime) { dwtime = 0; } else { dwtime = wtime - pwtime; }; } else { circwbuf = malloc(sizeof(cbelem)*lastnwb); if (circwbuf == NULL) { perror("malloc: no memory"); } else { bzero(circwbuf, sizeof(cbelem)*lastnwb); cbwsize = lastnwb; cbwptr = 0; circwbufset = 1; } } } if (rd && (lastnrb>0) ) { if (circrbufset) { /* see comment for writing */ if (readall >= circrbuf[cbrptr % cbrsize].b + blksize) { cbrptr++; circrbuf[cbrptr % cbrsize].t = rtime; circrbuf[cbrptr % cbrsize].b = readall; } else { /* instead of dissolving the rate we are using 'stale' style */ rtime = circrbuf[cbrptr % cbrsize].t; } prtime = circrbuf[(cbrptr + 1) % cbrsize].t; if (prtime >= rtime) { drtime = 0; } else { drtime = rtime - prtime; }; } else { circrbuf = malloc(sizeof(cbelem)*lastnrb); if (circrbuf == NULL) { perror("malloc: no memory"); } else { bzero(circrbuf, sizeof(cbelem)*lastnrb); cbrsize = lastnrb; cbrptr = 0; circrbufset = 1; } } } if (show) { if (wr) printf("Written"); if (rd) printf("/Read"); printf(" "); if (wr) printf("%5ld", writeall/1024); if (rd) printf("/%ld", readall/1024); printf(" KB"); if (vrb >= 1) { printf(" in "); if (wr) printf("%.1f", (double)wtime/USCALE); if (rd) printf("/%.1f", (double)rtime/USCALE); printf(" ms"); } if (vrb >= 3) { printf(" "); if (wr) printf("%.1f", ((double)writeall-bufsize)/wtime*8000*USCALE); if (rd) printf("/%.1f", ((double)readall-bufsize)/rtime*8000*USCALE); printf(" b/s"); } if (vrb >= 2) { printf(" "); if (wr) printf("%.1f", ((double)writeall-bufsize)/wtime*1000*USCALE); if (rd) printf("/%.1f", (double)(readall-bufsize)/rtime*USCALE*1000); printf(" B/s"); } printf(" "); if (wr) printf("%.2f", ((double)writeall-bufsize) / (double) (wtime*(1024.0/USCALE)) * 1000 ); if (rd) printf("/%.2f", ((double)readall-bufsize) / (double) (rtime*(1024.0/USCALE)) * 1000 ); printf(" KB/s"); if ( (lastnwb>1) || (lastnrb>1) ) { long dw=0, dr=0; /* 0s to shup up -Wall */ if (wr) dw = writeall-circwbuf[(cbwptr + 1) % cbwsize].b; if (rd) dr = readall -circrbuf[(cbrptr + 1) % cbrsize].b; printf(" (last "); if (wr) printf("%ld", dw/1024); if (rd) printf("/%ld", dr/1024); printf(" KB:"); printf(" "); if (wr) printf("%.1f", (double)dw /dwtime*USCALE*1000 ); if (rd) printf("/%.1f", (double)dr /drtime*USCALE*1000); printf(" B/s)"); } printf(" "); if (options&PRRES_SCROLL) printf("\n"); fflush(stdout); } } /* * finish -- (netkit-base-0.10-37, ping.c) * Print out statistics, and give up. */ void finish() { /* (void)signal(SIGINT, SIG_IGN); */ /* printf("\n"); */ if (dots!=0) printf("\n"); if (continuous) printf("\r"); printresult(t0, writeall, readall, 0, lastnwb, lastnrb, verbosity|scroll|reading*PRRES_RD|writing*PRRES_WR|PRRES_SHOW); if (experimental && (bufsize>0) && (maxwrblk*blksize>bufsize)) { printf("\nExperimentally taking into account %d B socket buffer:\n", bufsize); printresult(t0, writeall, readall, bufsize, lastnwb, lastnrb, verbosity|scroll|reading*PRRES_RD|writing*PRRES_WR|PRRES_SHOW); } printf("\n"); exit(0); } unitelem unitmult[] = { { "k", 1024 }, { "m", 1048576}, { "g", 1073741824 }, { NULL, 0} }; unitelem unitspeed[] = { { "b/s", 1}, { "bps", 1}, { NULL, 0} }; unitelem unitsize[] = { { "b", 1}, { NULL, 0} }; unitelem unittime[] = { { "s", 1}, { "min", 60 }, { "h", 3600 }, { "d", 86400 }, { "w", 604800 }, { "m", 2635200 }, { "y", 31557600 }, { NULL, 0 } }; #define NEED_SMTH_YES 1 #define NEED_SMTH_NO 0 double atoval(char *tstr, unitelem *unitmult, unitelem *unitsmth, int needsmth) { char *errptr; int i, uleft; long mult = 1, smth = 1, seensmth = 0; double val; val = strtod(tstr, &errptr); if ( (errptr == NULL) || (strlen(errptr) == 0) ) return val; uleft = strlen(errptr); if (needsmth) for (i = 0; unitsmth[i].val != 0; i++) { /* comparing the unit name with last bytes of the string */ if (strncasecmp(errptr+uleft-strlen(unitsmth[i].unit), unitsmth[i].unit, strlen(unitsmth[i].unit))==0) { smth = unitsmth[i].val; uleft -= strlen(unitsmth[i].unit); seensmth = 1; break; } } if (needsmth) { if (seensmth != 1) { printf("Unit error in <%s>\n", tstr); exit(1); } if (!uleft) return val*smth; /* unit, no multipliers */ } for (i = 0; unitmult[i].val != 0; i++) { if (strncasecmp(errptr, unitmult[i].unit, strlen(unitmult[i].unit)) == 0) { if (strlen(unitmult[i].unit) != uleft) continue; mult = unitmult[i].val; uleft -= strlen(unitmult[i].unit); break; } } if (uleft !=0 ) { printf("Unit error in <%s>\n", tstr); exit(1); } return val*mult*smth; } int parse_rates(char *spec) { int colons=0, i=0; char *scan=spec, *rtoken, *comma; double frate, ftime; while (*scan!='\0') if (*scan++==':') colons++; ratetab = calloc(colons+2, sizeof(struct ratetime)); if (ratetab==NULL) { printf("calloc() failed\n"); exit(1); } while( (rtoken = strsep(&spec,":")) ) { comma = index(rtoken, ','); if (!comma) { if (i!=colons) { /* both i and colons counted from 0 */ printf("Only in the last section of RATESPEC it makes sense to omit TIME (default: infinity)\n"); exit(1); } ratetab[i].time.tv_sec = LONG_MAX; /* we mean infinity really, 68 y should suffice, gonna die earlier */ ratetab[i].time.tv_usec = 0; } else { *comma = '\0'; ftime = atoval(comma+1, unitmult, unittime, NEED_SMTH_YES); ratetab[i].time.tv_sec = (long)(ftime); ratetab[i].time.tv_usec = (long) ((ftime - (long)(ftime)) * 1000000 + 0.5); } frate = atoval(rtoken, unitmult, unitspeed, NEED_SMTH_YES); ratetab[i].rrate.tv_sec = (long) (1000000 /* us/s */ * ( blksize /* bytes-block */ / frate ) +0.5); ratetab[i].rrate.tv_usec = ratetab[i].rrate.tv_sec % 1000000; ratetab[i].rrate.tv_sec = ratetab[i].rrate.tv_sec / 1000000; i++; } /* last one */ ratetab[i].rrate.tv_sec = 0; ratetab[i].rrate.tv_usec = 0; return 0; } void sndbuf(int f, int setbufsize, char *name) { int size=sizeof(int); /* getsockopt() should know how much space we have */ /* get/setsockopt doesn't return any error really for SO_SNDBUF, at least on Linux; it limits the buffer to [2048..65536] (131070 for 2.1 (?) but you can manipulate with /proc/sys/net/core/wmem_max ) */ if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, (void *)&bufsize, &size)==-1) printf("%s getsockopt: %s", name, strerror(errno)); printf("read SO_SNDBUF = %d\n", bufsize); if (setbufsize!=-1) { if (setsockopt(f, SOL_SOCKET, SO_SNDBUF, (void *)&setbufsize, sizeof(setbufsize))==-1) printf("%s getsockopt: %s", name, strerror(errno)); if (getsockopt(f, SOL_SOCKET, SO_SNDBUF, (void *)&bufsize, &size)==-1) /* size value's been set b4 */ printf("%s getsockopt: %s", name, strerror(errno)); printf("set SO_SNDBUF = %d\n", bufsize); } } void setmaxseg(int f, int maxseg, char *name) { int currseg, size=sizeof(int); /* getsockopt() should know how much space we have */ if (getsockopt(f, IPPROTO_TCP, TCP_MAXSEG, (void *)&currseg, &size)==-1) printf("%s getsockopt: %s", name, strerror(errno)); printf("read TCP_MAXSEG = %d\n", currseg); if (maxseg!=-1) { if (setsockopt(f, IPPROTO_TCP, TCP_MAXSEG, (void *)&maxseg, sizeof(maxseg))==-1) printf("%s getsockopt: %s", name, strerror(errno)); if (getsockopt(f, IPPROTO_TCP, TCP_MAXSEG, (void *)&currseg, &size)==-1) /* size value's been set b4 */ printf("%s getsockopt: %s", name, strerror(errno)); printf("set TCP_MAXSEG = %d\n", currseg); } } int bind_local(int f, int af, int lport, struct in_addr laddr) { struct sockaddr_in sock_in; bzero((char *)&sock_in, sizeof(sock_in)); sock_in.sin_family = af; sock_in.sin_port = htons(lport); if (opt_source) sock_in.sin_addr = laddr; if (bind(f, (struct sockaddr*)&sock_in, sizeof (sock_in)) < 0) { perror("tcp/udpblast: bind"); exit(7); } return 0; } #ifdef HAVE_IN6_ADDR int bind_local6(int f, int af, int lport, struct in6_addr laddr) { struct sockaddr_in6 sock_in; bzero((char *)&sock_in, sizeof (sock_in)); sock_in.sin6_family = af; sock_in.sin6_port = htons(lport); if (opt_source) sock_in.sin6_addr = laddr; if (bind(f, (struct sockaddr*)&sock_in, sizeof (sock_in)) < 0) { perror("tcp/udpblast: bind 6"); exit(7); } return 0; } #endif /* HAVE_IN6_ADDR */ struct timeval getrate(struct timeval *time) { static int i=0; *time = ratetab[i].time; return ratetab[i++].rrate; } int main(int argc, char **argv) { int ncol; char hostname[100], *srate=NULL /* for gcc */, fname[256], *name, *rpar, *pport; long written1, read1, tmpw, tmpr, wrblk, rdblk, flags; struct timeval twrpass, twrcurr, tdiff, timecount, rrate; #ifdef HAVE_GETADDRINFO struct addrinfo *ai, *ai0, hints; int errgai; #else struct servent *service; #endif /* HAVE_GETADDRINFO */ #ifdef HAVE_INET_PTON int errpton; #endif /* HAVE_INET_PTON */ /* changing default, based on program name */ if (argv[0]) { /* no tricks! */ strncpy(fname, argv[0], sizeof(fname)); } else { strcpy(fname, "tcpblast"); } if ( (name = rindex(fname, '/')) ) { name++; } else { name = fname; } strcat(verstr, vdate); /* non-random data - is modem compressing it? */ bzero(wbuff, MAXBLKSIZE); /* memset(wbuff, 'a', MAXBLKSIZE); oops, tests */ /* find first letter in the name - usage() needs it */ ind = name; /* degenerated after intr. argv->name proc. */ while (1) { static const struct option long_options[] = { { "count", required_argument, NULL, 'c' }, { "delay", required_argument, NULL, 'i' }, { "help", no_argument, NULL, 'h' }, { "ipv4", no_argument, NULL, '4' }, { "ipv6", no_argument, NULL, '6' }, { "nwrite", no_argument, NULL, 'n' }, { "quiet", no_argument, NULL, 'q' }, { "read", no_argument, NULL, 'r' }, { "rate", required_argument, NULL, 'R' }, { "source", required_argument, NULL, 'S' }, { "tcp", no_argument, NULL, 2 }, { "udp", no_argument, NULL, 3 }, { "version", no_argument, NULL, 'V' }, { "verbosity", no_argument, NULL, 'v' }, { "maxseg", required_argument, NULL, 'x' }, { NULL, 0, NULL, 0 } }; int optchar; if ((optchar = getopt_long (argc, argv, "46ab:c:d:hi:l:mop:qrR:s:S:t:vVx:", long_options, NULL)) == -1) break; switch (optchar) { case 2: tcp=1; break; case 3: udp=1; break; #ifdef HAVE_GETADDRINFO case '4': family = PF_INET; break; case '6': family = PF_INET6; break; #endif /* HAVE_GETADDRINFO */ case 'a': randomb=1; break; case 'b': /* negative BUFSIZE means substracting it from results */ setbufsize = atoval(optarg, unitmult, unitsize, NEED_SMTH_YES); printf("%d\n", setbufsize); if (setbufsize < 0) bufsize = setbufsize = abs(setbufsize); break; case 'c': maxwrblk = abs((int)(atoval(optarg, unitmult, NULL, NEED_SMTH_NO))); break; case 'd': dots=abs(atoi(optarg)); continuous=0; break; case 'f': printf("-f option not yet implemented\n"); exit(1); break; case 'h': usage(name); break; case 'i': delay=abs(atoi(optarg)); break; case 'l': lastnwb=lastnrb=abs(atoi(optarg))+1; break; /* split later */ case 'm': scroll=PRRES_SCROLL; break; case 'n': writing=0; break; case 'o': continuous=0; break; case 'p': lport=atoi(optarg); if ((lport<0) || (lport>65535)) { printf("Local port must be in 0..65535 range\n"); exit(1); } break; case 'q': dots=0; continuous=0; break; case 'r': reading=1; strcpy(port,"7"); break; case 'R': rate=1; srate = malloc(strlen(optarg)+1); if (!srate) { printf("srate = malloc() failed\n"); exit(1); } strcpy(srate, optarg); break; case 's': blksize=abs((int)(atoval(optarg, unitmult, unitsize, NEED_SMTH_YES))); break; case 'S': opt_source = 1; #ifdef HAVE_INET_PTON errpton = inet_pton(af, optarg, &source); #ifdef HAVE_IN6_ADDR if (errpton <= 0) { af = AF_INET6; errpton = inet_pton(af, optarg, &source6); } #endif /* HAVE_IN6_ADDR */ if (errpton <= 0) { printf(_("error: inet_pton(%d, %s, )\n"), af, optarg); exit(66); } #else if ( (source.s_addr = inet_addr(optarg)) == INADDR_NONE ) { printf(_("error: inet_addr(%s)\n"), optarg); exit(66); } #endif /* HAVE_INET_PTON */ break; case 't': maxtime=abs((int)(atoval(optarg, unitmult, unittime, NEED_SMTH_YES))); break; case 'v': verbosity++; break; case 'V': printf("%s version: %s\n", name, verstr); return 0; break; case 'x': maxseg=atoi(optarg); break; default: ; } } /* for now parse_rates() exit()s on errors itself */ if (rate && parse_rates(srate)) { printf("wrong RATESPEC\n"); exit(1); } /* correctness */ if (tcp && udp) { printf("cannot use both TCP and UDP\n"); usage_small(name); exit(2); } /* if neither -t nor -u is chosen use first character of the program name */ if ( (tcp==0) && (udp==0) && (ind[0]=='t') ) tcp=1; if ( (tcp==0) && (udp==0) && (ind[0]=='u') ) udp=1; if (!tcp && !udp) { printf("must use either TCP or UDP\n"); usage_small(name); exit(3); } if (continuous) dots=0; /* after options processing we need one arg left */ if (argc - optind != 1) { if (argc - optind == 0) printf("give a hostname[:port]\n"); usage_small(name); exit(4); } strncpy(hostname, argv[optind], sizeof(hostname)-1); if (maxwrblk<=0 || maxwrblk>MAXBLOCKS) { fprintf(stderr, "%s: %d BLOCKS outside of range 1..%d \n", name, maxwrblk, MAXBLOCKS); exit(5); } if (!maxrdblk) maxrdblk = maxwrblk; if (!reading) maxrdblk = 0; if (!writing) maxwrblk = 0; /* parsing hostname; possible combinations: hostname[:port] # ipv4 or ipv6, -[46] switch to choose if both available ipv4[:port] ipv6 \[ipv6\] \[ipv6\][:port] */ pport = NULL; ncol = 0; { char *p = hostname; while (*p) if (*p++ == ':') ncol++; } if (ncol >= 2) { /* must be a v6 addr */ rpar = index(hostname, ']'); if (rpar) { /* if : follows ] set ptr and cut port from the hostname */ if (rpar[1] == ':') { pport = rpar+2; rpar[0] = '\0'; } /* assuming that ] has its [ we strip both */ *rpar = '\0'; memmove(hostname, hostname+1, strlen(hostname+1)+1); } } else if (ncol == 1) { /* must be a v4:port */ if ( (pport = rindex(hostname, ':')) != 0 ) { *pport = '\0'; pport++; } } if (pport) strncpy(port, pport, sizeof(port)-1); printf("Sending %s %s data to %s, port %s using %d B blocks.\n", randomb ? "random":"non-random", tcp ? "TCP":"UDP", hostname, port, blksize); #ifdef HAVE_GETADDRINFO memset(&hints, 0, sizeof(hints)); hints.ai_socktype = tcp? SOCK_STREAM:SOCK_DGRAM; hints.ai_family = family; /* if (index(hostname, ':')) hints.ai_flags |= AI_NUMERICHOST; */ if ( (errgai=getaddrinfo(hostname, port, &hints, &ai0)) != 0 ) { printf( _("getaddrinfo(): %s (%d)\n"), gai_strerror(errgai), errgai); return 1; } f = -1; for (ai = ai0; ai; ai = ai->ai_next) { f = socket(ai->ai_family, ai->ai_socktype, 0); if (f < 0) continue; sndbuf(f, setbufsize, name); setmaxseg(f, maxseg, name); if (af == AF_INET) bind_local (f, af, lport, source); #ifdef HAVE_IN6_ADDR if (af == AF_INET6) bind_local6(f, af, lport, source6); #endif /* HAVE_IN6_ADDR */ if (connect(f, (struct sockaddr *) ai->ai_addr, ai->ai_addrlen) < 0) { close(f); f = -1; continue; } break; } if (ai0) freeaddrinfo(ai0); if (f == -1) { perror( _("connect")); exit(1); } #else /* HAVE_GETADDRINFO */ if (tcp) f = socket(AF_INET, SOCK_STREAM, 0); else f = socket(AF_INET, SOCK_DGRAM, 0); if (f < 0) { perror("tcp/udpblast: socket"); exit(6); } sndbuf(f, setbufsize, name); setmaxseg(f, maxseg, name); bind_local(f, af, lport, source); host = gethostbyname(hostname); if (host) { sock_in.sin_family = host->h_addrtype; bcopy(host->h_addr, &sock_in.sin_addr, host->h_length); } else { sock_in.sin_family = AF_INET; sock_in.sin_addr.s_addr = inet_addr(argv[optind]); if (sock_in.sin_addr.s_addr == -1) { fprintf(stderr, "%s: %s unknown host\n", name, argv[optind]); exit(8); } } /* port # or name can be used */ service = getservbyname(port, tcp ? "tcp" : "udp"); if (service==NULL) sock_in.sin_port = htons(abs(atoi(port))); else sock_in.sin_port = service->s_port; if (connect(f, (struct sockaddr*)&sock_in, sizeof(sock_in)) <0) { perror("tcp/udpblast connect"); exit(9); } #endif /* HAVE_GETADDRINFO */ if (gettimeofday(&t0, &tz) < 0) { perror("tcp/udpblast time"); exit(10); } if (randomb) srand(t0.tv_usec); /* more less... */ /* single process, all non-blocking writes/reads */ flags=fcntl(f, F_GETFL); fcntl(f, F_SETFL, flags|O_NONBLOCK); if (comparing) { /* allocate a table of pointers to all possible blocks */ } signal(SIGINT, finish); /* ^C stops */ if (rate) { rrate = getrate(&timecount); gettimeofday(&twrpass, &tz); } written1 = read1 = wrblk = rdblk = 0; do { if (writing && (wrblk=0) && (tdiff.tv_usec>0) ) { usleep(tdiff.tv_sec*1000000 + tdiff.tv_usec); } /* FIXME: what happens if we couldn't write a whole block? the line below might have been taking it into account */ timeradd(&twrpass, &rrate, &twrpass); /* the block should be sent until twrpass time */ timersub(&timecount, &rrate, &timecount); /* count to 0 */ } written1 = write(f, wbuff+written1, (size_t)blksize-written1); if (written1 != -1) { writeall += written1; written1 += tmpw; } else { written1 = tmpw; } if (written1 >= blksize) { written1 -= blksize; wrblk++; /* optimization: do not call printresult() at all when silent */ if (dots||continuous) printresult(t0, writeall, readall, experimental ? bufsize : 0, lastnwb, lastnrb, verbosity|scroll|PRRES_WR|reading*PRRES_RD |writing*PRRES_WR|continuous*PRRES_SHOW); if ( (dots) && ( (dots==1) || (wrblk%dots==1) ) ) write(1, ".", 1); if (randomb) { randbuff(blksize); /* alloc space, copy */ if (comparing) { } } } } if (reading && (rdblk= blksize) { read1 -= blksize; rdblk++; /* optimization: do not call printresult() at all when silent */ if (dots||continuous) printresult(t0, writeall, readall, experimental ? bufsize : 0, lastnwb, lastnrb, verbosity|scroll|PRRES_RD|reading*PRRES_RD |writing*PRRES_WR|continuous*PRRES_SHOW); /* when !writing we would get lots of BSs when reading so we use ... & writing */ if ( (dots) && ( (dots==1) || (rdblk%dots==1) ) && writing ) write(1, "\b \b", 1); if (comparing) { if (randomb) { } else { } } } } /* with -O3 not calling the function whem maxtime==0 ? */ if (maxtime && ((gettdiff(t0)/(1000*USCALE)) > maxtime)) break; } while ( (wrblk * * 12/15/90 - initial hack * 8/7/91 - clean-up time, first real version * 1/15/92 - add inter-buffer delay option * 1/16/92 - clean up echo mode code, add #ifdef for AIX */ #include #include #include #include #include #include #include #define DEFBLKSIZE 1024 /* default blocksize is 1k */ #define DEFNBLKS 100 /* default number of blocks is 100 */ extern char *optarg; /* external vars used by getopt(3) */ extern int optind, opterr; /* * neat macro from ka9q to "do the right thing" with ansi prototypes */ #ifndef __ARGS #ifdef __STDC__ #define __ARGS(x) x #else #define __ARGS(x) () #endif #endif static void usage __ARGS((char *argv[])); /* forward declaration */ #if !defined(sun) && !defined(_AIX) /* sunos and aix define pid_t, */ /* do others? */ typedef int pid_t; #endif #ifndef TRUE #define TRUE (1) #endif /*TRUE*/ #ifndef FALSE #define FALSE (0) #endif /*FALSE*/ int main(argc, argv) unsigned int argc; char *argv[]; { int eflag = FALSE; /* use echo instead of discard for full duplex*/ int vflag = FALSE; /* verbosity*/ int fflag = FALSE; /* preload buffer with file */ int delay = 0; /* inter-buffer delay in usecs */ pid_t pid = 0; /* pid of receiver child */ int status; /* return status of child */ struct timeval start, end; /* used to store start and end time of I/O */ #ifndef sun struct timeval timeout; /* used for timeout in select call */ #endif /*sun*/ double delta; /* stores delta of start and end in sec */ /* generic counter */ register int cnt; int c; /* used to return options from getopt(3) */ struct sockaddr_in sin; /* sockaddr for socket */ struct hostent *hp; /* hostent for host name lookups */ struct servent *serv; /* service entry for port lookup */ int sock; /* socket descriptor */ int fd[2]; /* descriptors for pipe */ unsigned int blksize = DEFBLKSIZE; /* block size (1k default) */ unsigned int nblks = DEFNBLKS; /* number of blocks (100 default)*/ unsigned int nbytes; /* number of bytes to transfer */ register unsigned int bytes_left; /* keep track of bytes left to */ /* read/write */ register char *buf; /* input and output buffer (malloced) */ register char *bufp; /* placeholder pointer */ FILE *infile; /* used to preload buffer */ while ((c = getopt(argc, argv, "vehb:n:f:d:")) != -1) { switch (c) { case 'v': vflag = TRUE; break; case 'e': eflag = TRUE; break; case 'h': usage(argv); break; case 'n': nblks = atoi(optarg); break; case 'b': blksize = atoi(optarg); break; case 'f': fflag = TRUE; if ((infile = fopen(optarg, "r")) == NULL) { fprintf(stderr, "%s: Can't open file %s.\n", argv[0], optarg); exit(2); } break; case 'd': delay = atoi(optarg); #ifndef sun /* we need to fake usleep() with select() on non-sun machines */ timeout.tv_usec = atoi(optarg) ; timeout.tv_sec = 0; #endif /*sun*/ break; default: usage(argv); break; } } if ((argc - optind) != 1) /* we better have a host name */ usage(argv); if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket"); exit(1); } bzero((char *) &sin, sizeof(sin)); sin.sin_family = AF_INET; if (bind(sock, &sin, sizeof (sin)) == -1) { perror("bind"); exit(1); } hp = gethostbyname(argv[optind]); if (hp) { /* try name first */ sin.sin_family = hp->h_addrtype; bcopy(hp->h_addr, &sin.sin_addr, hp->h_length); } else { /* maybe it's a numeric address ?*/ sin.sin_family = AF_INET; if ((sin.sin_addr.s_addr = inet_addr(argv[optind])) == -1) { /* nope, sorry we lose */ fprintf(stderr, "host not found: %s\n", argv[optind]); exit(1); } } serv = getservbyname(eflag ? "echo" : "discard", "tcp"); /* get port */ sin.sin_port = serv->s_port; if (connect(sock, &sin, sizeof(sin)) == -1) { perror("connect"); exit(1); } nbytes = nblks * blksize; /* number of bytes to send/receive */ if (vflag) printf("Sending %d bytes with blocksize %d bytes\n", nbytes, blksize); if ((buf = malloc((blksize < 4096) ? 4096 : blksize)) == NULL) { perror("malloc buf"); exit(1); } bzero(buf, blksize); /* clean out the buffer */ if (fflag) { /* preload buffer with file */ cnt = fread(buf, sizeof(u_char), blksize, infile); if (cnt < blksize) fprintf(stderr, "Warning! File is smaller than blocksize.\n"); } if (eflag) { if (pipe(fd) == -1) { /* create pipe for return */ perror("pipe"); exit(1); } if ((pid = fork()) == -1) { /* fork off a receiver */ perror("fork()"); exit(1); } } if (eflag && pid != 0) { /* we are the receiver */ close (fd[1]); bytes_left = nblks * blksize; if (gettimeofday(&start, NULL) == -1) { perror("gettimeofday"); exit(1); } if (vflag) { register int flush_flag = FALSE, blk_boundry = bytes_left - blksize; while (bytes_left) { if ((cnt = read(sock, buf, bytes_left)) == -1) { perror("receive:"); exit(2); } bytes_left -= cnt; while (blk_boundry > bytes_left) { fputs("\b \b", stdout); flush_flag = TRUE; blk_boundry -= blksize; } if (flush_flag) { fflush(stdout); flush_flag = FALSE; } } if (gettimeofday(&end, NULL) == -1) { perror("gettimeofday"); exit(1); } printf("\b"); fflush(stdout); } else { /* not vflag */ while (bytes_left) { if ((cnt = read(sock, buf, bytes_left)) == -1) { perror("receive:"); exit(2); } bytes_left -= cnt; } if (gettimeofday(&end, NULL) == -1) { perror("gettimeofday"); _exit(1); } } delta = (double) (end.tv_sec - start.tv_sec) + (double) ((double) (end.tv_usec - start.tv_usec) / 1000000.0); printf("Received %d bytes in %f seconds (%0.3f kbytes/s)\n", nbytes, delta, (double) (nbytes / delta) /1024); if (wait(&status) == -1) {/* wait for child lest we */ /* unleash zombies */ perror("wait"); exit(1); } if (status) { fprintf(stderr, "child returned non-zero status %d\n", status); } /* get delta from transmitter process */ if ((cnt = read(fd[0], (char *) &delta, sizeof(delta))) == -1) { perror("read pipe"); exit(1); } printf("Transmitted %d bytes in %f seconds (%0.3f kbytes/s)\n", nbytes, delta, (double) (nbytes / delta) / 1024); } else { /* we are the transmitter */ if (vflag) { if (gettimeofday(&start, NULL) == -1) { perror("gettimeofday"); exit(1); } while (nblks--) { cnt = 0; bufp = buf; bytes_left = blksize; do { if ((cnt = write(sock, bufp, bytes_left)) == -1) { perror("receive:"); exit(2); } bufp += cnt; bytes_left -= cnt; #ifdef sun if (delay) usleep(delay); #else /*sun*/ if (delay) select(0, NULL, NULL, NULL, timeout); #endif /*sun*/ } while (bytes_left); putchar('.'); fflush(stdout); } if (gettimeofday(&end, NULL) == -1) { perror("gettimeofday"); exit(1); } } else { /* not vflag */ if (gettimeofday(&start, NULL) == -1) { perror("gettimeofday"); exit(1); } while (nblks--) { cnt = 0; bufp = buf; bytes_left = blksize; do { if ((cnt = write(sock, bufp, bytes_left)) == -1) { perror("receive:"); exit(2); } bufp += cnt; bytes_left -= cnt; #ifdef sun if (delay) usleep(delay); #else /*sun*/ if (delay) select(0, NULL, NULL, NULL, timeout); #endif /*sun*/ } while (bytes_left); } if (gettimeofday(&end, NULL) == -1) { perror("gettimeofday"); exit(1); } } delta = (double) (end.tv_sec - start.tv_sec) + (double) ((double) (end.tv_usec - start.tv_usec) / 1000000.0); /* write delta value to pipe */ if (eflag) { if ((cnt = write(fd[1], (char *) &delta, sizeof(delta))) == -1) { perror("write pipe"); exit(1); } exit(0); } else printf("\nTransmitted %d bytes in %f seconds (%0.3f kbytes/s)\n", nbytes, delta, (double) (nbytes / delta) / 1024); } exit(0); } static void usage(argv) char *argv[]; { fprintf(stderr, "usage: %s [-v] [-e] [-h] [-b blksize] [-n nblks] [-f file] host\n", argv[0]); fprintf(stderr, " -v verbose\n"); fprintf(stderr, " -e use echo service for full duplex transfer\n"); fprintf(stderr, " -h print this message\n"); fprintf(stderr, " -b blocksize in bytes (default 1024)\n"); fprintf(stderr, " -n number of blocks (default 100)\n"); fprintf(stderr, " -f file to preload buffer (zero buffer by default)\n"); fprintf(stderr, " -d inter-buffer transmission delay in usecs (default 0)\n"); exit(1); } netdiag-1.2/trafshow-5.2.3/000077500000000000000000000000001323731111400152635ustar00rootroot00000000000000netdiag-1.2/trafshow-5.2.3/.trafshow000066400000000000000000000030201323731111400171140ustar00rootroot00000000000000# # default fcolor:bcolor # - Set the default screen background color-pair # # port[/proto] fcolor:bcolor # - Set color pattern by service port # # [proto] source[/mask][,port] destination[/mask][,port] fcolor:bcolor # - Set color pattern by pair of from-to addresses # # Reserved tokens `*', `any', `all' matchs ANY in the pattern. # # The colors are: # black red green yellow blue magenta cyan white # # The upper-case Fcolor mean bright *on* and Bcolor blink *on*. # #default white:blue # following color settings looks nice under black-on-gray xterm (xterm-color) # Private IP Addresses will be alarmed by Red foreground. # Source Destination Color 10.0.0.0/8 any Red any 10.0.0.0/8 Red 127.0.0.1/8 any Red any 127.0.0.1/8 Red 172.16.0.0/16 any Red any 172.16.0.0/16 Red 192.168.0.0/16 any Red any 192.168.0.0/16 Red # Network Services. # Service Color Comments 135 Red # netbios 137 red # netbios 138 red # netbios 139 red # netbios snmp white smux white 162 White # snmp-trap 67 white # bootp/dhcp-server 68 white # bootp/dhcp-client 546 white # dhcpv6-client 547 white # dhcpv6-server timed white who white domain cyan 389 cyan # ldap 636 cyan # ldaps */icmp Cyan http blue https blue 3128 Blue # http-proxy 8080 Blue # http-proxy smtp Green nntp Green pop3 green 995 green # pop3s 143 green # imap2,4 220 green # imap3 ftp yellow 20 Yellow # ftp-data tftp Yellow nfs Yellow 6000 Yellow # X11 ssh magenta telnet Magenta sunrpc Magenta 513/tcp Magenta # rsh 514/tcp Magenta # rcmd netdiag-1.2/trafshow-5.2.3/CHANGES000066400000000000000000000017761323731111400162710ustar00rootroot00000000000000Version 5.2.1 at Jul 21 10:55:23 NOVST 2004 ------------------------------------------- * The first public version released! Version 5 of the program is the Next Generation trafshow project writen from scratch. No any shared codes with the previous versions. The TrafShow Application Architecture has been specially designed to handle a lot of traffic capture sources with the huge amount of exported network flows. There are no such network throughput which contents could not be displayed ;-) Version 5.2.2 at Jan 8 12:34:34 NOVT 2006 ------------------------------------------ * The sources was cleaned for new version of gcc 4.0. No complains any more. No other improvements has been made. Version 5.2.3 at Mar 12 15:04:12 NOVT 2006 ------------------------------------------ * Significant improvement for *BSD packets capturing scheme using libpcap version 0.8 capabilities (pcap_get_selectable_fd() function). * Bug-fix against core dumps on the list of interfaces with aliases and so on. netdiag-1.2/trafshow-5.2.3/FILES000066400000000000000000000012741323731111400160540ustar00rootroot00000000000000.trafshow CHANGES FILES INSTALL Makefile.in PACKAGE README VERSION aclocal.m4 addrtoname.c addrtoname.h cisco_netflow.c cisco_netflow.h colormask.c colormask.h config.guess config.h.in config.sub configure configure.in domain_resolver.c domain_resolver.h ethertype.h events.c events.h getkey.c getkey.h hashtab.c hashtab.h help_page.c help_page.h install-sh netstat.c netstat.h lookupa.c lookupa.h parse_dl.c parse_dl.h parse_ip.c parse_ip.h recycle.c recycle.h screen.c screen.h selector.c selector.h session.c session.h show_dump.c show_dump.h show_if.c show_if.h show_stat.c show_stat.h sll.h snprintf.c snprintf.h standard.h strcasecmp.c strftime.c trafshow.1 trafshow.c trafshow.h util.c util.h netdiag-1.2/trafshow-5.2.3/INSTALL000066400000000000000000000040641323731111400163200ustar00rootroot00000000000000 How to install trafshow. 1. First, make sure the libpcap already installed into your system. See the README file in this directory for the minimum required version of libpcap and it distribution. Follow the INSTALL file of pcap library to build and install it. 2. Next, make sure you have already installed the curses library. The most systems has the ncurses as default curses library. Currently trafshow may be compiled with any curses library, configure script will detect the prefered curses that supports colors. 3. Now, decide whether you want to place trafshow and man page. The configure script option `--prefix' changes the root directory for installing trafshow (/usr/local by default). Use `--prefix=/usr' to replace your default trafshow distribution or just edit the BINDEST and MANDEST paths in Makefile.in. 4. Type `./configure' to determine your system attributes and libraries to generate an appropriate Makefile from Makefile.in and config.h from config.h.in. Some systems require unusual options for compilation of linking that the configure script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure 5. Type `make' to build the trafshow program. Ignore any warnings, no error messages should be produced. If you system is not listed in the README as one which we have tested, you may have to modify the configure script, Makefile.in and probably config.h.in. Please send us patches for any modifications you need to make. 6. Login as root and type `make install'. This should install trafshow and man page into your system. It also copy example file of color configuration in /etc/trafshow, it not replaced if already there. By default, trafshow is installed with no any set-uid permission. So you would decide who must have access to the packet capture devices. netdiag-1.2/trafshow-5.2.3/Makefile.in000066400000000000000000000054461323731111400173410ustar00rootroot00000000000000# # Copyright (c) 1993-2004 Rinet Corp., Novosibirsk, Russia # # Redistribution and use in source forms, with and without modification, # are permitted provided that this entire comment appears intact. # Redistribution in binary form may occur without any restrictions. # # THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. # # # Makefile.in -- template for Makefile # Process this file with `./configure' to produce Makefile # remember to edit Makefile.in, not Makefile # # Top level hierarchy prefix = @prefix@ exec_prefix = @exec_prefix@ # Pathname of directory to install the binary BINDEST = @bindir@ # Pathname of directory to install the man page MANDEST = @mandir@ # # You shouldn't need to edit anything below here. # PROG = trafshow CC = @PTHREAD_CC@ CFLAGS = @CFLAGS@ -Wall -I. @DEFS@ @PTHREAD_CFLAGS@ YACC = @YACC@ YFLAGS = -d -p `echo $@ | sed -e 's/\..*/_/'` LEX = @LEX@ LEXLIB = @LEXLIB@ LFLAGS = LDFLAGS = @LDFLAGS@ LIBS = @PTHREAD_LIBS@ @LIBS@ # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a # problem if you don't own the file but can write to the directory. .c.o: @rm -f $@ $(CC) $(CFLAGS) -c $*.c CSRC = trafshow.c screen.c colormask.c getkey.c selector.c \ events.c session.c show_if.c show_stat.c show_dump.c \ parse_dl.c parse_ip.c netstat.c cisco_netflow.c addrtoname.c \ hashtab.c lookupa.c recycle.c util.c help_page.c domain_resolver.c YSRC = LSRC = GENSRC = version.c SRC = $(CSRC) $(YSRC) $(LSRC) $(GENSRC) # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot # hack the extra indirection OBJ = $(CSRC:.c=.o) $(YSRC:.y=.o) $(LSRC:.l=.o) $(GENSRC:.c=.o) @LIBOBJS@ CLEANFILES = $(PROG) $(OBJ) $(GENSRC) y.tab.h $(PROG): $(OBJ) @rm -f $@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(OBJ): config.h trafshow.h Makefile version.o: version.c version.c: VERSION Makefile @rm -f $@ @sed -e 's/.*/char package[] = "&";/' PACKAGE > $@ @sed -e 's/.*/char version[] = "&";/' VERSION >> $@ @echo 'char target[] = "@target@";' >> $@ @echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@ install: ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG) ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1 [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG) clean: rm -f $(CLEANFILES) distclean: rm -f $(CLEANFILES) Makefile config.h \ config.cache config.log config.status autom4te.cache tar: @cwd=`pwd`; dir=`basename $$cwd`; name=`cat PACKAGE`-`cat VERSION`; \ list=""; tar="tar cvf"; \ for i in `cat FILES`; do list="$$list $$name/$$i"; done; \ rm -f ../$$name; ln -s $$dir ../$$name; \ (cd ..; $$tar - $$list) | gzip -c > /tmp/$$name.tgz; \ rm -f ../$$name depend: $(GENSRC) mkdep $(CFLAGS) $(SRC) netdiag-1.2/trafshow-5.2.3/PACKAGE000066400000000000000000000000111323731111400162310ustar00rootroot00000000000000trafshow netdiag-1.2/trafshow-5.2.3/README000066400000000000000000000107331323731111400161470ustar00rootroot00000000000000 Trafshow Version 5. This directory contains trafshow source code, a tool for real-time network traffic visualization. Brief description ----------------- Trafshow is a simple interactive program that gather the network traffic from all libpcap-capable interfaces to accumulate it in memory cache, and then separately display it on appropriated curses window in line-narrowed manner as a list of network flows sorted by throughput. Display updates occurs nearly in real time, asynchronously from data collecting. It look like a live show of traffic flows. Any kind of network traffic are mixed together in the one live-show screen, an Ethernet, IP, etc. The IP traffic can be aggregated by netmask prefix bits and service ports to reorganize a heap of trivial flows into the treelike hierarchies suitable for human perception. The user can glance over the list of resulting flows and select at their to browse detail. So you can deepen into the traffic inheritance hierarchy and inspect the packets of each trivial flow in variety of presentations: raw-hex, ascii, time-stamp. The program make aggregation automatically when number of flows will exceed some reasonable amount. Just a few seconds after launch may be required for adaptation to your volume of traffic. Trafshow also listens on UDP port (as a server) for diverse feeders of Cisco Netflow and then separately display the collected data in the same manner as described above. The following versions of Netflow are currently supported: V1, V5, V7. Usage ----- This program may be found wonderful at lest to locate suspicious traffic on the net very quickly on demand, or to evaluate real-time traffic bandwidth utilization, in a simplest and convenient environment. But it is not intended for collecting and analysis of the network traffic for a long period of time, nor for billing! The program pretend to be IPv6 compatible and ready to using, but it is not tested enough. You can define INET6 to do so. Please see trafshow(1) man page for further information. Requirements ------------ Now trafshow is a multi-threaded application, therefore your system MUST support POSIX threads. In other words if your system does not support POSIX threads you cannot compile and use this program. Hopefully, the almost all of modern operating systems has support it by default (leastwise last years). Trafshow use the libpcap to gather network traffic, a system-independent interface for user-level packet capture. Note that most systems ship libpcap, but usually an older version. The minumum required version is 0.7, newest always preferred. The original distribution of the library is located at http://www.tcpdump.org. Trafshow can use variouse curses libraries, a terminal-independent set of screen functions with optimal cursor motion. Currently trafshow can be compiled with any curses library, but not all of them work with color functions properly. Slang or Ncurses is preferred because it right supports color. Note that most systems ship ncurses, that will be enough. Once libpcap and libncurses is built and installed, you can build trafshow using the procedure in the INSTALL file. Distribution and support ------------------------ Because the program is freely distributed software it can be found around of world with or without modifications. The original distribution of the program is available at ftp://ftp.nsk.su/pub/RinetSoft/trafshow-X.Y.tgz, where X is a main version and Y is a current release. There is no special support available right now. Problems, bugs, questions, desirable enhancements, etc., should be sent to the e-mail address trafshow@risp.ru. Please see trafshow(1) man page for the authors and acknowledgements. License ------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. netdiag-1.2/trafshow-5.2.3/VERSION000066400000000000000000000000061323731111400163270ustar00rootroot000000000000005.2.3 netdiag-1.2/trafshow-5.2.3/aclocal.m4000066400000000000000000000167621323731111400171370ustar00rootroot00000000000000dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html dnl AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris*) flag="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";; *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD netdiag-1.2/trafshow-5.2.3/addrtoname.c000066400000000000000000001043211323731111400175460ustar00rootroot00000000000000/* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * Internet, ethernet, port, and protocol string to address * and address to string conversion routines #ifndef lint static const char rcsid[] _U_ = "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.96.2.3 2003/12/15 04:02:53 guy Exp $ (LBL)"; #endif */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include /* concession to AIX */ #include #include #ifdef linux #include #else #include #endif #include #include #ifdef HAVE_NET_IF_DL_H #include #endif #ifdef TIME_WITH_SYS_TIME #include #endif #include #include #include #include #include #include #include #include "addrtoname.h" #include "ethertype.h" #include "domain_resolver.h" #ifndef NTOHL #define NTOHL(x) (x) = ntohl(x) #define NTOHS(x) (x) = ntohs(x) #define HTONL(x) (x) = htonl(x) #define HTONS(x) (x) = htons(x) #endif /* dirty fake */ #define error(s) { perror(s); exit(1); } struct tok { int v; /* value */ const char *s; /* string */ }; /* * hash tables for whatever-to-name translations * * XXX there has to be error checks against strdup(3) failure */ #define HASHNAMESIZE 4096 struct hnamemem { int resolving; u_int32_t addr; const char *name; struct hnamemem *nxt; }; struct hnamemem hnametable[HASHNAMESIZE]; struct hnamemem tporttable[HASHNAMESIZE]; struct hnamemem uporttable[HASHNAMESIZE]; struct hnamemem servtable[HASHNAMESIZE]; struct hnamemem iprototable[HASHNAMESIZE]; struct hnamemem etypetable[HASHNAMESIZE]; struct hnamemem dnaddrtable[HASHNAMESIZE]; struct hnamemem llcsaptable[HASHNAMESIZE]; struct hnamemem ipxsaptable[HASHNAMESIZE]; struct hnamemem icmptable[HASHNAMESIZE]; #ifdef INET6 struct hnamemem icmpv6table[HASHNAMESIZE]; #endif #ifdef INET6 struct h6namemem { struct in6_addr addr; char *name; struct h6namemem *nxt; }; struct h6namemem h6nametable[HASHNAMESIZE]; #endif /* INET6 */ struct enamemem { u_short e_addr0; u_short e_addr1; u_short e_addr2; const char *e_name; u_char *e_nsap; /* used only for nsaptable[] */ #define e_bs e_nsap /* for bytestringtable */ struct enamemem *e_nxt; }; struct enamemem enametable[HASHNAMESIZE]; struct enamemem nsaptable[HASHNAMESIZE]; struct enamemem bytestringtable[HASHNAMESIZE]; struct protoidmem { u_int32_t p_oui; u_short p_proto; const char *p_name; struct protoidmem *p_nxt; }; struct protoidmem protoidtable[HASHNAMESIZE]; char * satoa(sa, dst, size) const struct sockaddr *sa; char *dst; int size; { const char *cp = 0; #ifdef INET6 char buf[100]; #endif if (!sa || !dst || size < 1) return 0; if (sa->sa_family == AF_INET) { cp = intoa(((struct sockaddr_in *)sa)->sin_addr.s_addr); } #ifdef INET6 else if (sa->sa_family == AF_INET6) { cp = inet_ntop(AF_INET6, &((struct sockaddr_in6 *)sa)->sin6_addr, buf, sizeof(buf)); } #endif #if defined(AF_LINK) && defined(LLADDR) else if (sa->sa_family == AF_LINK) { struct sockaddr_dl *sdl = (struct sockaddr_dl *)sa; if (sdl->sdl_alen > 0) cp = linkaddr_string((u_char *)LLADDR(sdl), sdl->sdl_alen); } #endif if (!cp) return 0; (void)strncpy(dst, cp, size); dst[size-1] = '\0'; return dst; } /* * A faster replacement for inet_ntoa(). */ const char * intoa(u_int32_t addr) { register char *cp; register u_int byte; register int n; static char buf[sizeof(".xxx.xxx.xxx.xxx")]; NTOHL(addr); cp = &buf[sizeof buf]; *--cp = '\0'; n = 4; do { byte = addr & 0xff; *--cp = byte % 10 + '0'; byte /= 10; if (byte > 0) { *--cp = byte % 10 + '0'; byte /= 10; if (byte > 0) *--cp = byte + '0'; } *--cp = '.'; addr >>= 8; } while (--n > 0); return cp + 1; } extern int nflag; static void name_resolved(unused, dd) void *unused; DOMAIN_DATA *dd; { register struct hnamemem *p; /* sanity check */ if (unused || !dd) return; p = &hnametable[dd->addr & (HASHNAMESIZE-1)]; for (; p->nxt; p = p->nxt) { if (p->addr == dd->addr) { if (p->name) free((char *)p->name); p->name = strdup(dd->name); p->resolving = 2; break; } } domain_data_free(&dd, 0); } /* * Return a name for the IP address pointed to by ap. This address * is assumed to be in network byte order. */ const char * getname(const u_char *ap) { u_int32_t addr; register struct hnamemem *p; int found; memcpy(&addr, ap, sizeof(addr)); /* * Do not print names if -n was given. */ if (nflag) return intoa(addr); found = 0; p = &hnametable[addr & (HASHNAMESIZE-1)]; for (; p->nxt; p = p->nxt) { if (p->addr == addr) { found++; break; } } if (!found) { p->addr = addr; p->nxt = newhnamemem(); p->name = strdup(intoa(addr)); } if (!p->resolving) { if (domain_resolve_name(addr, 0, name_resolved) < 0) p->resolving = -1; else p->resolving = 1; } return (p->name); } #ifdef INET6 /* * Return a name for the IP6 address pointed to by ap. This address * is assumed to be in network byte order. */ const char * getname6(const u_char *ap) { struct hostent *hp; struct in6_addr addr; static struct h6namemem *p; /* static for longjmp() */ const char *cp; char ntop_buf[INET6_ADDRSTRLEN]; memcpy(&addr, ap, sizeof(addr)); /* * Do not print names if -n was given. */ if (nflag) return inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf)); p = &h6nametable[*(u_int16_t *)&addr.s6_addr[14] & (HASHNAMESIZE-1)]; for (; p->nxt; p = p->nxt) { if (memcmp(&p->addr, &addr, sizeof(addr)) == 0) return (p->name); } p->addr = addr; p->nxt = newh6namemem(); hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6); if (hp) { p->name = strdup(hp->h_name); return (p->name); } cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf)); if (!cp) return 0; p->name = strdup(cp); return (p->name); } #endif /* INET6 */ static char hex[] = "0123456789abcdef"; /* Find the hash node that corresponds the ether address 'ep' */ static inline struct enamemem * lookup_emem(const u_char *ep) { register u_int i, j, k; struct enamemem *tp; k = (ep[0] << 8) | ep[1]; j = (ep[2] << 8) | ep[3]; i = (ep[4] << 8) | ep[5]; tp = &enametable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->e_nxt) if (tp->e_addr0 == i && tp->e_addr1 == j && tp->e_addr2 == k) return tp; else tp = tp->e_nxt; tp->e_addr0 = i; tp->e_addr1 = j; tp->e_addr2 = k; tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) error("lookup_emem: calloc"); return tp; } /* * Find the hash node that corresponds to the bytestring 'bs' * with length 'nlen' */ static inline struct enamemem * lookup_bytestring(register const u_char *bs, const unsigned int nlen) { struct enamemem *tp; register u_int i, j, k; if (nlen >= 6) { k = (bs[0] << 8) | bs[1]; j = (bs[2] << 8) | bs[3]; i = (bs[4] << 8) | bs[5]; } else if (nlen >= 4) { k = (bs[0] << 8) | bs[1]; j = (bs[2] << 8) | bs[3]; i = 0; } else i = j = k = 0; tp = &bytestringtable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->e_nxt) if (tp->e_addr0 == i && tp->e_addr1 == j && tp->e_addr2 == k && memcmp((const char *)bs, (const char *)(tp->e_bs), nlen) == 0) return tp; else tp = tp->e_nxt; tp->e_addr0 = i; tp->e_addr1 = j; tp->e_addr2 = k; tp->e_bs = (u_char *) calloc(1, nlen + 1); memcpy(tp->e_bs, bs, nlen); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) error("lookup_bytestring: calloc"); return tp; } /* Find the hash node that corresponds the NSAP 'nsap' */ static inline struct enamemem * lookup_nsap(register const u_char *nsap) { register u_int i, j, k; unsigned int nlen = *nsap; struct enamemem *tp; const u_char *ensap = nsap + nlen - 6; if (nlen > 6) { k = (ensap[0] << 8) | ensap[1]; j = (ensap[2] << 8) | ensap[3]; i = (ensap[4] << 8) | ensap[5]; } else i = j = k = 0; tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->e_nxt) if (tp->e_addr0 == i && tp->e_addr1 == j && tp->e_addr2 == k && tp->e_nsap[0] == nlen && memcmp((const char *)&(nsap[1]), (char *)&(tp->e_nsap[1]), nlen) == 0) return tp; else tp = tp->e_nxt; tp->e_addr0 = i; tp->e_addr1 = j; tp->e_addr2 = k; tp->e_nsap = (u_char *)malloc(nlen + 1); if (tp->e_nsap == NULL) error("lookup_nsap: malloc"); memcpy((char *)tp->e_nsap, (const char *)nsap, nlen + 1); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) error("lookup_nsap: calloc"); return tp; } /* Find the hash node that corresponds the protoid 'pi'. */ static inline struct protoidmem * lookup_protoid(const u_char *pi) { register u_int i, j; struct protoidmem *tp; /* 5 octets won't be aligned */ i = (((pi[0] << 8) + pi[1]) << 8) + pi[2]; j = (pi[3] << 8) + pi[4]; /* XXX should be endian-insensitive, but do big-endian testing XXX */ tp = &protoidtable[(i ^ j) & (HASHNAMESIZE-1)]; while (tp->p_nxt) if (tp->p_oui == i && tp->p_proto == j) return tp; else tp = tp->p_nxt; tp->p_oui = i; tp->p_proto = j; tp->p_nxt = (struct protoidmem *)calloc(1, sizeof(*tp)); if (tp->p_nxt == NULL) error("lookup_protoid: calloc"); return tp; } const char * etheraddr_string(register const u_char *ep) { register u_int i; register char *cp; register struct enamemem *tp; char buf[sizeof("00:00:00:00:00:00")]; tp = lookup_emem(ep); if (tp->e_name) return (tp->e_name); #ifdef USE_ETHER_NTOHOST if (!nflag) { char buf2[128]; if (ether_ntohost(buf2, (const struct ether_addr *)ep) == 0) { tp->e_name = strdup(buf2); return (tp->e_name); } } #endif cp = buf; *cp++ = hex[*ep >> 4 ]; *cp++ = hex[*ep++ & 0xf]; for (i = 5; (int)--i >= 0;) { *cp++ = ':'; *cp++ = hex[*ep >> 4 ]; *cp++ = hex[*ep++ & 0xf]; } *cp = '\0'; tp->e_name = strdup(buf); return (tp->e_name); } const char * linkaddr_string(const u_char *ep, const unsigned int len) { register u_int i, j; register char *cp; register struct enamemem *tp; if (!ep || len < 1) return ""; #ifdef notdef if (len == 6) /* XXX not totally correct... */ return etheraddr_string(ep); #endif tp = lookup_bytestring(ep, len); if (tp->e_name) return (tp->e_name); tp->e_name = cp = (char *)malloc(len*3); if (tp->e_name == NULL) error("linkaddr_string: malloc"); if ((j = *ep >> 4) != 0) *cp++ = hex[j]; *cp++ = hex[*ep++ & 0xf]; for (i = len-1; i > 0 ; --i) { *cp++ = ':'; if ((j = *ep >> 4) != 0) *cp++ = hex[j]; *cp++ = hex[*ep++ & 0xf]; } *cp = '\0'; return (tp->e_name); } const char * ethertype_string(u_short type) { register char *cp; register struct hnamemem *tp; register u_int32_t i = type; char buf[sizeof("0000")]; for (tp = &etypetable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); cp = buf; NTOHS(type); *cp++ = toupper(hex[type >> 12 & 0xf]); *cp++ = toupper(hex[type >> 8 & 0xf]); *cp++ = toupper(hex[type >> 4 & 0xf]); *cp++ = toupper(hex[type & 0xf]); *cp++ = '\0'; tp->name = strdup(buf); return (tp->name); } const char * protoid_string(register const u_char *pi) { register u_int i, j; register char *cp; register struct protoidmem *tp; char buf[sizeof("00:00:00:00:00")]; tp = lookup_protoid(pi); if (tp->p_name) return tp->p_name; cp = buf; if ((j = *pi >> 4) != 0) *cp++ = hex[j]; *cp++ = hex[*pi++ & 0xf]; for (i = 4; (int)--i >= 0;) { *cp++ = ':'; if ((j = *pi >> 4) != 0) *cp++ = hex[j]; *cp++ = hex[*pi++ & 0xf]; } *cp = '\0'; tp->p_name = strdup(buf); return (tp->p_name); } const char * llcsap_string(u_char sap) { register struct hnamemem *tp; register u_int32_t i = sap; char buf[sizeof("sap-00")]; for (tp = &llcsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); snprintf(buf, sizeof(buf), "sap-%02x", sap & 0xff); tp->name = strdup(buf); return (tp->name); } const char * isonsap_string(const u_char *nsap) { register u_int i, nlen = nsap[0]; register char *cp; register struct enamemem *tp; tp = lookup_nsap(nsap); if (tp->e_name) return tp->e_name; tp->e_name = cp = (char *)malloc(nlen * 2 + 2); if (cp == NULL) error("isonsap_string: malloc"); nsap++; *cp++ = '/'; for (i = nlen; (int)--i >= 0;) { *cp++ = hex[*nsap >> 4]; *cp++ = hex[*nsap++ & 0xf]; } *cp = '\0'; return (tp->e_name); } const char * tcpport_string(u_short port) { register struct hnamemem *tp; register u_int32_t i = port; char buf[sizeof("00000")]; for (tp = &tporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) { if (tp->addr == i) return (tp->name); } tp->addr = i; tp->nxt = newhnamemem(); (void)snprintf(buf, sizeof(buf), "%u", i); tp->name = strdup(buf); return (tp->name); } const char * udpport_string(u_short port) { register struct hnamemem *tp; register u_int32_t i = port; char buf[sizeof("00000")]; for (tp = &uporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) { if (tp->addr == i) return (tp->name); } tp->addr = i; tp->nxt = newhnamemem(); (void)snprintf(buf, sizeof(buf), "%u", i); tp->name = strdup(buf); return (tp->name); } int isservport(u_short port) { register struct hnamemem *tp; register u_int32_t i = port; for (tp = &servtable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) { if (tp->addr == i) return 1; } return 0; } const char * ipxsap_string(u_short port) { register char *cp; register struct hnamemem *tp; register u_int32_t i = port; char buf[sizeof("0000")]; for (tp = &ipxsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); cp = buf; NTOHS(port); *cp++ = toupper(hex[port >> 12 & 0xf]); *cp++ = toupper(hex[port >> 8 & 0xf]); *cp++ = toupper(hex[port >> 4 & 0xf]); *cp++ = toupper(hex[port & 0xf]); *cp++ = '\0'; tp->name = strdup(buf); return (tp->name); } static void init_servarray(void) { struct servent *sv; register struct hnamemem *table; register int i; while ((sv = getservent()) != NULL) { int port = ntohs(sv->s_port); i = port & (HASHNAMESIZE-1); table = &servtable[i]; if (table->addr != port) { while (table->addr) table = table->nxt; table->addr = port; table->nxt = newhnamemem(); } if (strcmp(sv->s_proto, "tcp") == 0) table = &tporttable[i]; else if (strcmp(sv->s_proto, "udp") == 0) table = &uporttable[i]; else continue; while (table->name) table = table->nxt; table->name = strdup(sv->s_name); table->addr = port; table->nxt = newhnamemem(); } endservent(); } static struct tok ethertype_db[] = { { ETHERTYPE_IP, "ip" }, { ETHERTYPE_MPLS, "mpls" }, { ETHERTYPE_MPLS_MULTI, "mpls-mc" }, { ETHERTYPE_IPV6, "ipv6" }, { ETHERTYPE_8021Q, "dot1q" }, { ETHERTYPE_VMAN, "vman" }, { ETHERTYPE_PUP, "pup" }, { ETHERTYPE_ARP, "arp" }, { ETHERTYPE_REVARP , "rarp" }, { ETHERTYPE_NS, "ns" }, { ETHERTYPE_SPRITE, "sprite" }, { ETHERTYPE_TRAIL, "trail" }, { ETHERTYPE_CDP, "cdp" }, { ETHERTYPE_MOPDL, "mop-dl" }, { ETHERTYPE_MOPRC, "mop-rc" }, { ETHERTYPE_DN, "dn" }, { ETHERTYPE_LAT, "lat" }, { ETHERTYPE_SCA, "sca" }, { ETHERTYPE_LANBRIDGE, "lanbridge" }, { ETHERTYPE_DECDNS, "dec-dns" }, { ETHERTYPE_DECDTS, "dec-dts" }, { ETHERTYPE_VEXP, "vexp" }, { ETHERTYPE_VPROD, "vprod" }, { ETHERTYPE_ATALK, "atalk" }, { ETHERTYPE_AARP, "atalk-arp" }, { ETHERTYPE_IPX, "ipx" }, { ETHERTYPE_PPP, "ppp" }, { ETHERTYPE_PPPOED, "pppoe-d" }, { ETHERTYPE_PPPOES, "pppoe-s" }, { ETHERTYPE_LOOPBACK, "loopback" }, { 0, NULL } }; static void init_etypearray(void) { register int i; register struct hnamemem *table; for (i = 0; ethertype_db[i].s; i++) { int j = htons(ethertype_db[i].v) & (HASHNAMESIZE-1); table = &etypetable[j]; while (table->name) table = table->nxt; table->name = ethertype_db[i].s; table->addr = htons(ethertype_db[i].v); table->nxt = newhnamemem(); } } static struct protoidlist { const u_char protoid[5]; const char *name; } protoidlist[] = { {{ 0x00, 0x00, 0x0c, 0x01, 0x07 }, "CiscoMLS" }, {{ 0x00, 0x00, 0x0c, 0x20, 0x00 }, "CiscoCDP" }, {{ 0x00, 0x00, 0x0c, 0x20, 0x01 }, "CiscoCGMP" }, {{ 0x00, 0x00, 0x0c, 0x20, 0x03 }, "CiscoVTP" }, {{ 0x00, 0xe0, 0x2b, 0x00, 0xbb }, "ExtremeEDP" }, {{ 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL } }; /* * SNAP proto IDs with org code 0:0:0 are actually encapsulated Ethernet * types. */ static void init_protoidarray(void) { register int i; register struct protoidmem *tp; struct protoidlist *pl; u_char protoid[5]; protoid[0] = 0; protoid[1] = 0; protoid[2] = 0; for (i = 0; ethertype_db[i].s; i++) { u_short etype = htons(ethertype_db[i].v); memcpy((char *)&protoid[3], (char *)&etype, 2); tp = lookup_protoid(protoid); tp->p_name = strdup(ethertype_db[i].s); } /* Hardwire some SNAP proto ID names */ for (pl = protoidlist; pl->name != NULL; ++pl) { tp = lookup_protoid(pl->protoid); /* Don't override existing name */ if (tp->p_name != NULL) continue; tp->p_name = pl->name; } } static struct etherlist { const u_char addr[6]; const char *name; } etherlist[] = { {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, "ethernet" }, {{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, "broadcast" }, {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL } }; /* * Initialize the ethers hash table. We take two different approaches * depending on whether or not the system provides the ethers name * service. If it does, we just wire in a few names at startup, * and etheraddr_string() fills in the table on demand. If it doesn't, * then we suck in the entire /etc/ethers file at startup. The idea * is that parsing the local file will be fast, but spinning through * all the ethers entries via NIS & next_etherent might be very slow. * * XXX pcap_next_etherent doesn't belong in the pcap interface, but * since the pcap module already does name-to-address translation, * it's already does most of the work for the ethernet address-to-name * translation, so we just pcap_next_etherent as a convenience. */ static void init_etherarray(void) { register struct etherlist *el; register struct enamemem *tp; #ifdef USE_ETHER_NTOHOST char name[256]; #else register struct pcap_etherent *ep; register FILE *fp; /* Suck in entire ethers file */ fp = fopen(PCAP_ETHERS_FILE, "r"); if (fp != NULL) { while ((ep = pcap_next_etherent(fp)) != NULL) { tp = lookup_emem(ep->addr); tp->e_name = strdup(ep->name); } (void)fclose(fp); } #endif /* Hardwire some ethernet names */ for (el = etherlist; el->name != NULL; ++el) { tp = lookup_emem(el->addr); /* Don't override existing name */ if (tp->e_name != NULL) continue; #ifdef USE_ETHER_NTOHOST /* Use yp/nis version of name if available */ if (ether_ntohost(name, (const struct ether_addr *)el->addr) == 0) { tp->e_name = strdup(name); continue; } #endif tp->e_name = el->name; } } static struct tok llcsap_db[] = { /* IEEE SAPs */ { 0x00, "null" }, { 0x02, "isap" }, { 0x03, "gsap" }, { 0x06, "ip-sap" }, { 0x0e, "proway-nm" }, { 0x42, "stp" }, { 0x4e, "rs511" }, { 0x5e, "isi-ip" }, { 0x7e, "x25-plp" }, { 0x80, "3com" }, { 0x8e, "proway" }, { 0xaa, "snap" }, { 0xbc, "banyan" }, { 0xe0, "ipx" }, { 0xf0, "netbeui" }, { 0xf4, "lanman" }, { 0xfe, "iso-clns" }, { 0xff, "raw-ipx" }, /* known as raw 802.3 packet */ /* IBM SAPs */ { 0x04, "isna" }, { 0x05, "gsna" }, { 0xd4, "resource" }, { 0xdc, "dyn-arp" }, { 0xf0, "netbios" }, { 0xf8, "irpl" }, { 0xf4, "ilan" }, { 0xf5, "glan" }, { 0xfc, "discovery" }, { 0, NULL } }; static void init_llcsaparray(void) { register int i; register struct hnamemem *table; for (i = 0; llcsap_db[i].s != NULL; i++) { table = &llcsaptable[llcsap_db[i].v]; while (table->name) table = table->nxt; table->name = llcsap_db[i].s; table->addr = llcsap_db[i].v; table->nxt = newhnamemem(); } } static struct tok ipxsap_db[] = { { 0x0000, "Unknown" }, { 0x0001, "User" }, { 0x0002, "User Group" }, { 0x0003, "PrintQueue" }, { 0x0004, "FileServer" }, { 0x0005, "JobServer" }, { 0x0006, "Gateway" }, { 0x0007, "PrintServer" }, { 0x0008, "ArchiveQueue" }, { 0x0009, "ArchiveServer" }, { 0x000a, "JobQueue" }, { 0x000b, "Administration" }, { 0x000F, "Novell TI-RPC" }, { 0x0017, "Diagnostics" }, { 0x0020, "NetBIOS" }, { 0x0021, "NAS SNA Gateway" }, { 0x0023, "NACS AsyncGateway" }, { 0x0024, "RemoteBridge/RoutingService" }, { 0x0026, "BridgeServer" }, { 0x0027, "TCP/IP Gateway" }, { 0x0028, "Point-to-point X.25 BridgeServer" }, { 0x0029, "3270 Gateway" }, { 0x002a, "CHI Corp" }, { 0x002c, "PC Chalkboard" }, { 0x002d, "TimeSynchServer" }, { 0x002e, "ARCserve5.0/PalindromeBackup" }, { 0x0045, "DI3270 Gateway" }, { 0x0047, "AdvertisingPrintServer" }, { 0x004a, "NetBlazerModems" }, { 0x004b, "BtrieveVAP" }, { 0x004c, "NetwareSQL" }, { 0x004d, "XtreeNetwork" }, { 0x0050, "BtrieveVAP4.11" }, { 0x0052, "QuickLink" }, { 0x0053, "PrintQueueUser" }, { 0x0058, "Multipoint X.25 Router" }, { 0x0060, "STLB/NLM" }, { 0x0064, "ARCserve" }, { 0x0066, "ARCserve3.0" }, { 0x0072, "WAN CopyUtility" }, { 0x007a, "TES-NetwareVMS" }, { 0x0092, "WATCOM Debugger/EmeraldTapeBackupServer" }, { 0x0095, "DDA OBGYN" }, { 0x0098, "NetwareAccessServer" }, { 0x009a, "Netware for VMS II/NamedPipeServer" }, { 0x009b, "NetwareAccessServer" }, { 0x009e, "PortableNetwareServer/SunLinkNVT" }, { 0x00a1, "PowerchuteAPC UPS" }, { 0x00aa, "LAWserve" }, { 0x00ac, "CompaqIDA StatusMonitor" }, { 0x0100, "PIPE STAIL" }, { 0x0102, "LAN ProtectBindery" }, { 0x0103, "OracleDataBaseServer" }, { 0x0107, "Netware386/RSPX RemoteConsole" }, { 0x010f, "NovellSNA Gateway" }, { 0x0111, "TestServer" }, { 0x0112, "HP PrintServer" }, { 0x0114, "CSA MUX" }, { 0x0115, "CSA LCA" }, { 0x0116, "CSA CM" }, { 0x0117, "CSA SMA" }, { 0x0118, "CSA DBA" }, { 0x0119, "CSA NMA" }, { 0x011a, "CSA SSA" }, { 0x011b, "CSA STATUS" }, { 0x011e, "CSA APPC" }, { 0x0126, "SNA TEST SSA Profile" }, { 0x012a, "CSA TRACE" }, { 0x012b, "NetwareSAA" }, { 0x012e, "IKARUS VirusScan" }, { 0x0130, "CommunicationsExecutive" }, { 0x0133, "NNS DomainServer/NetwareNamingServicesDomain" }, { 0x0135, "NetwareNamingServicesProfile" }, { 0x0137, "Netware386 PrintQueue/NNS PrintQueue" }, { 0x0141, "LAN SpoolServer" }, { 0x0152, "IRMALAN Gateway" }, { 0x0154, "NamedPipeServer" }, { 0x0166, "NetWareManagement" }, { 0x0168, "Intel PICKIT CommServer/Intel CAS TalkServer" }, { 0x0173, "Compaq" }, { 0x0174, "Compaq SNMP Agent" }, { 0x0175, "Compaq" }, { 0x0180, "XTreeServer/XTreeTools" }, { 0x018A, "NASI ServicesBroadcastServer" }, { 0x01b0, "GARP Gateway" }, { 0x01b1, "Binfview" }, { 0x01bf, "IntelLanDeskManager" }, { 0x01ca, "AXTEC" }, { 0x01cb, "ShivaNetModem/E" }, { 0x01cc, "ShivaLanRover/E" }, { 0x01cd, "ShivaLanRover/T" }, { 0x01ce, "ShivaUniversal" }, { 0x01d8, "CastelleFAXPressServer" }, { 0x01da, "CastelleLANPressPrintServer" }, { 0x01dc, "CastelleFAX/Xerox7033 FaxServer/ExcelLanFax" }, { 0x01f0, "LEGATO" }, { 0x01f5, "LEGATO" }, { 0x0233, "NMS Agent/NetwareManagementAgent" }, { 0x0237, "NMS IPX Discovery/LANternReadWriteChannel" }, { 0x0238, "NMS IP Discovery/LANternTrapAlarmChannel" }, { 0x023a, "LANtern" }, { 0x023c, "MAVERICK" }, { 0x023f, "NovellSMDR" }, { 0x024e, "NetwareConnect" }, { 0x024f, "NASI ServerBroadcast Cisco" }, { 0x026a, "NMS ServiceConsole" }, { 0x026b, "TimeSynchronizationServer Netware 4.x" }, { 0x0278, "DirectoryServer Netware 4.x" }, { 0x027b, "NetwareManagementAgent" }, { 0x0280, "Novell File and Printer Sharing Service for PC" }, { 0x0304, "NovellSAA Gateway" }, { 0x0308, "COM/VERMED" }, { 0x030a, "GalacticommWorldgroupServer" }, { 0x030c, "IntelNetport2/HP JetDirect/HP Quicksilver" }, { 0x0320, "AttachmateGateway" }, { 0x0327, "MicrosoftDiagnostiocs" }, { 0x0328, "WATCOM SQL Server" }, { 0x0335, "MultiTechSystems MultisynchCommServer" }, { 0x0343, "Xylogics RemoteAccessServer/LANModem" }, { 0x0355, "ArcadaBackupExec" }, { 0x0358, "MSLCD1" }, { 0x0361, "NETINELO" }, { 0x037e, "Powerchute UPS Monitoring" }, { 0x037f, "ViruSafeNotify" }, { 0x0386, "HP Bridge" }, { 0x0387, "HP Hub" }, { 0x0394, "NetWare SAA Gateway" }, { 0x039b, "LotusNotes" }, { 0x03b7, "CertusAntiVirus" }, { 0x03c4, "ARCserve4.0" }, { 0x03c7, "LANspool3.5" }, { 0x03d7, "LexmarkPrinterServer" }, { 0x03d8, "LexmarkXLE PrinterServer" }, { 0x03dd, "BanyanENS NetwareClient" }, { 0x03de, "GuptaSequelBaseServer/NetWareSQL" }, { 0x03e1, "UnivelUnixware" }, { 0x03e4, "UnivelUnixware" }, { 0x03fc, "IntelNetport" }, { 0x03fd, "PrintServerQueue" }, { 0x040A, "ipnServer" }, { 0x040D, "LVERRMAN" }, { 0x040E, "LVLIC" }, { 0x0414, "NET Silicon (DPI)/Kyocera" }, { 0x0429, "SiteLockVirus" }, { 0x0432, "UFHELPR???" }, { 0x0433, "Synoptics281xAdvancedSNMPAgent" }, { 0x0444, "MicrosoftNT SNA Server" }, { 0x0448, "Oracle" }, { 0x044c, "ARCserve5.01" }, { 0x0457, "CanonGP55" }, { 0x045a, "QMS Printers" }, { 0x045b, "DellSCSI Array" }, { 0x0491, "NetBlazerModems" }, { 0x04ac, "OnTimeScheduler" }, { 0x04b0, "CD-Net" }, { 0x0513, "EmulexNQA" }, { 0x0520, "SiteLockChecks" }, { 0x0529, "SiteLockChecks" }, { 0x052d, "CitrixOS2 AppServer" }, { 0x0535, "Tektronix" }, { 0x0536, "Milan" }, { 0x055d, "Attachmate SNA gateway" }, { 0x056b, "IBM8235 ModemServer" }, { 0x056c, "ShivaLanRover/E PLUS" }, { 0x056d, "ShivaLanRover/T PLUS" }, { 0x0580, "McAfeeNetShield" }, { 0x05B8, "NLM to workstation communication (Revelation Software)" }, { 0x05BA, "CompatibleSystemsRouters" }, { 0x05BE, "CheyenneHierarchicalStorageManager" }, { 0x0606, "JCWatermarkImaging" }, { 0x060c, "AXISNetworkPrinter" }, { 0x0610, "AdaptecSCSIManagement" }, { 0x0621, "IBM AntiVirus" }, { 0x0640, "Windows95 RemoteRegistryService" }, { 0x064e, "MicrosoftIIS" }, { 0x067b, "Microsoft Win95/98 File and Print Sharing for NetWare" }, { 0x067c, "Microsoft Win95/98 File and Print Sharing for NetWare" }, { 0x076C, "Xerox" }, { 0x079b, "ShivaLanRover/E 115" }, { 0x079c, "ShivaLanRover/T 115" }, { 0x07B4, "CubixWorldDesk" }, { 0x07c2, "Quarterdeck IWare Connect V2.x NLM" }, { 0x07c1, "Quarterdeck IWare Connect V3.x NLM" }, { 0x0810, "ELAN License Server Demo" }, { 0x0824, "ShivaLanRoverAccessSwitch/E" }, { 0x086a, "ISSC Collector" }, { 0x087f, "ISSC DAS AgentAIX" }, { 0x0880, "Intel Netport PRO" }, { 0x0881, "Intel Netport PRO" }, { 0x0b29, "SiteLock" }, { 0x0c29, "SiteLockApplications" }, { 0x0c2c, "LicensingServer" }, { 0x2101, "PerformanceTechnologyInstantInternet" }, { 0x2380, "LAI SiteLock" }, { 0x238c, "MeetingMaker" }, { 0x4808, "SiteLockServer/SiteLockMetering" }, { 0x5555, "SiteLockUser" }, { 0x6312, "Tapeware" }, { 0x6f00, "RabbitGateway" }, { 0x7703, "MODEM" }, { 0x8002, "NetPortPrinters" }, { 0x8008, "WordPerfectNetworkVersion" }, { 0x85BE, "Cisco EIGRP" }, { 0x8888, "WordPerfectNetworkVersion/QuickNetworkManagement" }, { 0x9000, "McAfeeNetShield" }, { 0x9604, "CSA-NT_MON" }, { 0xb6a8, "OceanIsleReachoutRemoteControl" }, { 0xf11f, "SiteLockMetering" }, { 0xf1ff, "SiteLock" }, { 0xf503, "Microsoft SQL Server" }, { 0xF905, "IBM TimeAndPlace" }, { 0xfbfb, "TopCallIII FaxServer" }, { 0xffff, "AnyService/Wildcard" }, { 0, (char *)0 } }; static void init_ipxsaparray(void) { register int i; register struct hnamemem *table; for (i = 0; ipxsap_db[i].s != NULL; i++) { int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1); table = &ipxsaptable[j]; while (table->name) table = table->nxt; table->name = ipxsap_db[i].s; table->addr = htons(ipxsap_db[i].v); table->nxt = newhnamemem(); } } const char * ipproto_string(u_char proto) { register struct hnamemem *tp; register u_int32_t i = proto; char buf[sizeof("00000")]; for (tp = &iprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); (void)snprintf(buf, sizeof(buf), "%u", i); tp->name = strdup(buf); return (tp->name); } static void init_iprotoarray(void) { struct protoent *pe; register struct hnamemem *tp; register u_int32_t i; while ((pe = getprotoent()) != NULL) { i = pe->p_proto; for (tp = &iprototable[i & (HASHNAMESIZE-1)]; tp->name; tp = tp->nxt) ; tp->name = strdup(pe->p_name); tp->addr = i; tp->nxt = newhnamemem(); } endprotoent(); } static struct tok icmp_db[] = { { 0x0000, "echo-reply" }, { 0x0300, "unrch-net" }, { 0x0301, "unrch-host" }, { 0x0302, "unrch-proto" }, { 0x0303, "unrch-port" }, { 0x0304, "need-frag" }, { 0x0305, "src-fail" }, { 0x0306, "bad-net" }, { 0x0307, "bad-host" }, { 0x0308, "isolated" }, { 0x0309, "net-prhbt" }, { 0x030a, "host-prhbt" }, { 0x030b, "bad-ntos" }, { 0x030c, "bad-htos" }, { 0x030d, "filtered" }, { 0x030e, "no-prec" }, { 0x030f, "prec-cut" }, { 0x0400, "quench" }, { 0x0500, "redir-net" }, { 0x0501, "redir-hst" }, { 0x0502, "redir-ntos" }, { 0x0503, "redir-htos" }, { 0x0800, "echo-reqst" }, { 0x0900, "advert" }, { 0x0a00, "solicit" }, { 0x0b00, "ttl-exceed" }, { 0x0b01, "frg-exceed" }, { 0x0c00, "err-atptr" }, { 0x0c01, "optabsent" }, { 0x0c02, "bad-len" }, { 0x0d00, "time-reqst" }, { 0x0e00, "time-reply" }, { 0x0f00, "info-reqst" }, { 0x1000, "info-reply" }, { 0x1100, "mask-reqst" }, { 0x1200, "mask-reply" }, { 0, NULL } }; static void init_icmparray(void) { register int i; register struct hnamemem *table; for (i = 0; icmp_db[i].s != NULL; i++) { table = &icmptable[icmp_db[i].v & (HASHNAMESIZE-1)]; while (table->name) table = table->nxt; table->name = icmp_db[i].s; table->addr = icmp_db[i].v; table->nxt = newhnamemem(); } } const char * icmp_string(u_short code) { register struct hnamemem *tp; register u_int32_t i = code; char buf[sizeof("0000")]; for (tp = &icmptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); snprintf(buf, sizeof(buf), "%04x", code); tp->name = strdup(buf); return (tp->name); } #ifdef INET6 static struct tok icmpv6_db[] = { { 0x0100, "no-route" }, { 0x0101, "adm-prhbt" }, { 0x0102, "not-nghbr" }, { 0x0103, "addr-unrch" }, { 0x0104, "bad-port" }, { 0x0200, "pkt-toobig" }, { 0x0300, "hop-exceed" }, { 0x0301, "frg-exceed" }, { 0x0400, "bad-hdr" }, { 0x0401, "unkn-nhdr" }, { 0x0402, "unkn-opt" }, { 0x8000, "echo-reqst" }, { 0x8100, "echo-repl" }, { 0x8200, "membr-qry" }, { 0x8300, "membr-rprt" }, { 0x8400, "membr-red" }, { 0x8500, "router-sol" }, { 0x8600, "router-adv" }, { 0x8700, "nghbr-sol" }, { 0x8800, "nghbr-adv" }, { 0x8900, "redirect" }, { 0, NULL } }; static void init_icmpv6array(void) { register int i; register struct hnamemem *table; for (i = 0; icmpv6_db[i].s != NULL; i++) { table = &icmpv6table[icmpv6_db[i].v & (HASHNAMESIZE-1)]; while (table->name) table = table->nxt; table->name = icmpv6_db[i].s; table->addr = icmpv6_db[i].v; table->nxt = newhnamemem(); } } const char * icmpv6_string(u_short code) { register struct hnamemem *tp; register u_int32_t i = code; char buf[sizeof("0000")]; for (tp = &icmpv6table[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(); snprintf(buf, sizeof(buf), "%04x", code); tp->name = strdup(buf); return (tp->name); } #endif /* * Initialize the address to name translation machinery. We map all * non-local IP addresses to numeric addresses if fflag is true (i.e., * to prevent blocking on the nameserver). localnet is the IP address * of the local network. mask is its subnet mask. */ void init_addrtoname() { #ifdef notdef if (nflag) /* * Simplest way to suppress names. */ return; #endif init_etherarray(); init_servarray(); init_etypearray(); init_llcsaparray(); init_protoidarray(); init_ipxsaparray(); init_iprotoarray(); init_icmparray(); #ifdef INET6 init_icmpv6array(); #endif } #ifdef notdef const char * dnaddr_string(u_short dnaddr) { register struct hnamemem *tp; for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != 0; tp = tp->nxt) if (tp->addr == dnaddr) return (tp->name); tp->addr = dnaddr; tp->nxt = newhnamemem(); if (nflag) tp->name = dnnum_string(dnaddr); else tp->name = dnname_string(dnaddr); return(tp->name); } #endif /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */ struct hnamemem * newhnamemem(void) { register struct hnamemem *p; static struct hnamemem *ptr = NULL; static u_int num = 0; if (num <= 0) { num = 64; ptr = (struct hnamemem *)calloc(num, sizeof (*ptr)); if (ptr == NULL) error("newhnamemem: calloc"); } --num; p = ptr++; return (p); } #ifdef INET6 /* Return a zero'ed h6namemem struct and cuts down on calloc() overhead */ struct h6namemem * newh6namemem(void) { register struct h6namemem *p; static struct h6namemem *ptr = NULL; static u_int num = 0; if (num <= 0) { num = 64; ptr = (struct h6namemem *)calloc(num, sizeof (*ptr)); if (ptr == NULL) error("newh6namemem: calloc"); } --num; p = ptr++; return (p); } #endif /* INET6 */ netdiag-1.2/trafshow-5.2.3/addrtoname.h000066400000000000000000000045661323731111400175650ustar00rootroot00000000000000/* * Copyright (c) 1990, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.18 2001/09/17 21:57:51 fenner Exp $ (LBL) */ #ifndef _ADDRTONAME_H_ #define _ADDRTONAME_H_ /* Name to address translation routines. */ const char *linkaddr_string(const u_char *addr, const unsigned int); const char *etheraddr_string(const u_char *addr); const char *ethertype_string(u_short type); const char *tcpport_string(u_short port); const char *udpport_string(u_short port); int isservport(u_short port); const char *getname(const u_char *addr); const char *ipproto_string(u_char proto); #ifdef INET6 const char *getname6(const u_char *addr); #endif const char *intoa(u_int32_t); char *satoa(const struct sockaddr *saddr, char *dst, int size); void init_addrtoname(void); struct hnamemem *newhnamemem(void); #ifdef INET6 struct h6namemem *newh6namemem(void); #endif #define ipaddr_string(p) getname((const u_char *)(p)) #ifdef INET6 #define ip6addr_string(p) getname6((const u_char *)(p)) #endif const char *isonsap_string(const u_char *nsap); const char *llcsap_string(u_char sap); const char *ipxsap_string(u_short sap); const char *icmp_string(u_short code); #ifdef INET6 const char *icmpv6_string(u_short code); #endif #endif /* !_ADDRTONAME_H_ */ netdiag-1.2/trafshow-5.2.3/cisco_netflow.c000066400000000000000000000334761323731111400203020ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #ifdef INET6 #include #include #endif #include #include #include #include #include #include #include "cisco_netflow.h" #include "trafshow.h" #include "session.h" #include "netstat.h" #include "show_dump.h" #include "addrtoname.h" static void read_netflow(SESSION *sd, const unsigned char *data, int len); static PCAP_HANDLER *match_feeder(PCAP_HANDLER *ph_list, const struct sockaddr *sa); static void parse_netflow(PCAP_HANDLER *ph, const unsigned char *data, int len); static char *get_name(const struct sockaddr *sa, char *dst, int size); static void fprint_tcpflags(FILE *fp, int flags); static void fprint_tos(FILE *fp, int tos); static void dump_netflow_v1(const CNF_DATA_V1 *data); static void dump_netflow_v5(const CNF_DATA_V5 *data); static void dump_netflow_v7(const CNF_DATA_V7 *data); int cisco_netflow_init(ph_list, port) PCAP_HANDLER **ph_list; int port; { SESSION *sd; int sock, on = 1; socklen_t slen; static struct sockaddr_in sin; /* why static? */ if (!ph_list) return -1; memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(port); if ((sd = session_open(-1, 0, DataSequence)) == 0) { perror("session_open"); return -1; } sock = session_sock(sd); slen = sizeof(on); #ifdef SO_REUSEPORT if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &on, slen) < 0) { perror("setsockopt SO_REUSEPORT"); return -1; } #elif SO_REUSEADDR if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, slen) < 0) { perror("setsockopt SO_REUSEADDR"); return -1; } #endif slen = sizeof(sin); if (bind(sock, (struct sockaddr *)&sin, slen) < 0) { perror("bind"); return -1; } session_setcallback(sd, 0, 0, read_netflow); session_setcookie(sd, ph_list); return 0; } static PCAP_HANDLER * match_feeder(ph, sa) PCAP_HANDLER *ph; const struct sockaddr *sa; { const pcap_addr_t *ap; if (!sa) return 0; for (; ph; ph = ph->next) { if (ph->pcap) /* skip pcap devices */ continue; for (ap = ph->addr; ap; ap = ap->next) { if (!ap->addr || ap->addr->sa_family != sa->sa_family) continue; if (ap->addr->sa_family == AF_INET) { if (!memcmp(&((struct sockaddr_in *)ap->addr)->sin_addr, &((struct sockaddr_in *)sa)->sin_addr, sizeof(struct in_addr))) return ph; } #ifdef INET6 else if (ap->addr->sa_family == AF_INET6) { if (!memcmp(&((struct sockaddr_in6 *)ap->addr)->sin6_addr, &((struct sockaddr_in6 *)sa)->sin6_addr, sizeof(struct in6_addr))) return ph; } #endif } } return 0; } static char * get_name(sa, dst, size) const struct sockaddr *sa; char *dst; int size; { struct hostent *hp = 0; if (!sa) return 0; if (sa->sa_family == AF_INET) { hp = gethostbyaddr((char *)&((struct sockaddr_in *)sa)->sin_addr, sizeof(struct in_addr), AF_INET); } #ifdef INET6 else if (sa->sa_family == AF_INET6) { hp = gethostbyaddr((char *)&((struct sockaddr_in6 *)sa)->sin6_addr, sizeof(struct in6_addr), AF_INET6); } #endif if (hp) { int i; for (i = 0; i < size-1; i++) { if (hp->h_name[i] == '\0' || hp->h_name[i] == '.') break; dst[i] = hp->h_name[i]; } dst[i] = '\0'; return dst; } return 0; } static void read_netflow(sd, data, len) SESSION *sd; const unsigned char *data; int len; { const struct sockaddr *from; PCAP_HANDLER *ph, **ph_list = (PCAP_HANDLER **)session_cookie(sd); /* sanity check */ if (!ph_list || !data || len < sizeof(CNF_HDR_V1)) return; if ((from = session_from(sd)) == 0) return; /* should not happen */ if ((ph = match_feeder(*ph_list, from)) == 0) { /* insert new one */ int cnt = 0; PCAP_HANDLER *ph_prev = 0; char buf[256]; pcap_addr_t *ap; for (ph = *ph_list; ph; ph = ph->next) { if (!ph->pcap) cnt++; ph_prev = ph; } if ((ph = (PCAP_HANDLER *)malloc(sizeof(PCAP_HANDLER))) == 0) { perror("malloc"); return; } memset(ph, 0, sizeof(PCAP_HANDLER)); ph->masklen = aggregate; if (!get_name(from, buf, sizeof(buf))) sprintf(buf, "netflow%d", cnt); ph->name = strdup(buf); sprintf(buf, "Netflow V%d", ntohs(((CNF_HDR_V1 *)data)->version)); ph->descr = strdup(buf); if ((ap = (pcap_addr_t *)malloc(sizeof(struct pcap_addr))) != 0) { memset(ap, 0, sizeof(struct pcap_addr)); if ((ap->addr = (struct sockaddr *)malloc(sizeof(struct sockaddr))) == 0) { perror("malloc"); return; } memcpy(ap->addr, from, sizeof(struct sockaddr)); } ph->addr = ap; if ((ph->ns_mutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t))) == 0) { perror("malloc"); return; } pthread_mutex_init(ph->ns_mutex, 0); ph->prev = ph_prev; if (ph_prev) ph_prev->next = ph; else *ph_list = ph; } parse_netflow(ph, data, len); } static void parse_netflow(ph, data, len) PCAP_HANDLER *ph; const unsigned char *data; int len; { struct timeval now; int version, counter, msec, hdrlen, dump_it; CNF_HDR_V1 *v1h; CNF_HDR_V5 *v5h; CNF_HDR_V7 *v7h; CNF_DATA_V1 *v1d = 0; CNF_DATA_V5 *v5d = 0; CNF_DATA_V7 *v7d = 0; NETSTAT ns; v1h = (CNF_HDR_V1 *)data; if (!v1h || len < sizeof(CNF_HDR_V1)) return; version = ntohs(v1h->version); counter = ntohs(v1h->counter); if (version == 1) { v1d = (CNF_DATA_V1 *)(data + sizeof(CNF_HDR_V1)); len -= sizeof(sizeof(CNF_HDR_V1)); len /= sizeof(CNF_DATA_V1); } else if (version == 5) { v5h = (CNF_HDR_V5 *)data; v5d = (CNF_DATA_V5 *)(data + sizeof(CNF_HDR_V5)); len -= sizeof(sizeof(CNF_HDR_V5)); len /= sizeof(CNF_DATA_V5); } else if (version == 7) { v7h = (CNF_HDR_V7 *)data; v7d = (CNF_DATA_V7 *)(data + sizeof(CNF_HDR_V7)); len -= sizeof(sizeof(CNF_HDR_V7)); len /= sizeof(CNF_DATA_V7); } else return; gettimeofday(&now, 0); while (counter-- > 0 && len-- > 0) { struct ip_address *src = &ns.ip_src_addr; struct ip_address *dst = &ns.ip_dst_addr; memset(&ns, 0, sizeof(NETSTAT)); ns.ip_ver = 4; /* XXX what about IPv6? */ ns.mtime = now; msec = 0; dump_it = 0; if (version == 1 && v1d) { ns.ip_proto = v1d->proto; src->ip_addr.s_addr = v1d->src_addr; src->ip_port = v1d->src_port; dst->ip_addr.s_addr = v1d->dst_addr; dst->ip_port = v1d->dst_port; ns.pkt_cnt = ntohl(v1d->dpkts); ns.pkt_len = ntohl(v1d->doctets); msec = ntohl(v1d->lasttime) - ntohl(v1d->firsttime); } else if (version == 5 && v5d) { ns.ip_proto = v5d->proto; src->ip_addr.s_addr = v5d->src_addr; src->ip_port = v5d->src_port; dst->ip_addr.s_addr = v5d->dst_addr; dst->ip_port = v5d->dst_port; ns.pkt_cnt = ntohl(v5d->dpkts); ns.pkt_len = ntohl(v5d->doctets); msec = ntohl(v5d->lasttime) - ntohl(v5d->firsttime); } else if (version == 7 && v7d) { ns.ip_proto = v7d->proto; src->ip_addr.s_addr = v7d->src_addr; src->ip_port = v7d->src_port; dst->ip_addr.s_addr = v7d->dst_addr; dst->ip_port = v7d->dst_port; ns.pkt_cnt = ntohl(v7d->dpkts); ns.pkt_len = ntohl(v7d->doctets); msec = ntohl(v7d->lasttime) - ntohl(v7d->firsttime); } /* suggest data length (dirty fake) */ hdrlen = sizeof(struct ip); switch (ns.ip_proto) { case IPPROTO_TCP: hdrlen += sizeof(struct tcphdr); break; case IPPROTO_UDP: hdrlen += sizeof(struct udphdr); break; case IPPROTO_ICMP: hdrlen += sizeof(struct icmp); break; } hdrlen *= ns.pkt_cnt; if (ns.pkt_len >= hdrlen) ns.data_len = ns.pkt_len - hdrlen; if (msec > 0) { ns.pkt_cnt_rate = ns.pkt_cnt * 1000 / msec; ns.pkt_len_rate = ns.pkt_len * 1000 / msec; ns.data_len_rate = ns.data_len * 1000 / msec; } pcap_save(ph, &ns); if (cisco_netflow_dump && ph->name && !strcmp(cisco_netflow_dump, ph->name) && netstat_match(&ns, dump_match)) { dump_it++; } if (version == 1 && v1d) { if (dump_it) dump_netflow_v1(v1d); v1d++; } else if (version == 5 && v5d) { if (dump_it) dump_netflow_v5(v5d); v5d++; } else if (version == 7 && v7d) { if (dump_it) dump_netflow_v7(v7d); v7d++; } } } static void fprint_tcpflags(fp, flags) FILE *fp; int flags; { fprintf(fp, "TCPflags: %02x", flags); if (flags & 0x01) fprintf(fp, " FIN"); if (flags & 0x02) fprintf(fp, " SYN"); if (flags & 0x04) fprintf(fp, " RST"); if (flags & 0x08) fprintf(fp, " PUSH"); if (flags & 0x10) fprintf(fp, " ACK"); if (flags & 0x20) fprintf(fp, " URG"); fprintf(fp, "\n"); } static void fprint_tos(fp, tos) FILE *fp; int tos; { fprintf(fp, "TOS: %02x", tos); switch (tos & 0xe0) { /* precedence bits */ case 0xe0: fprintf(fp, " NETCONTROL"); break; case 0xc0: fprintf(fp, " INTERNETCONTROL"); break; case 0xa0: fprintf(fp, " CRITIC_ECP"); break; case 0x80: fprintf(fp, " FLASHOVERRIDE"); break; case 0x60: fprintf(fp, " FLASH"); break; case 0x40: fprintf(fp, " IMMEDIATE"); break; case 0x20: fprintf(fp, " PRIORITY"); break; } tos &= 0x1e; /* type of service bits */ if (tos & 0x10) fprintf(fp, " LOWDELAY"); if (tos & 0x08) fprintf(fp, " THROUGHPUT"); if (tos & 0x04) fprintf(fp, " RELIABILITY"); if (tos & 0x02) fprintf(fp, " LOWCOST"); fprintf(fp, "\n"); } static void dump_netflow_v1(dp) const CNF_DATA_V1 *dp; { FILE *fp; if (!dump_file || (fp = fopen(dump_file, "a")) == 0) return; fprintf(fp, "\nNetflow: V1\n"); fprintf(fp, "SrcAddr: %s\n", intoa(dp->src_addr)); fprintf(fp, "DstAddr: %s\n", intoa(dp->dst_addr)); fprintf(fp, "NextHop: %s\n", intoa(dp->nexthop)); fprintf(fp, "InputIf: %d\n", (int)ntohs(dp->ifin)); fprintf(fp, "OutputIf: %d\n", (int)ntohs(dp->ifout)); fprintf(fp, "Packets: %u\n", (u_int32_t)ntohl(dp->dpkts)); fprintf(fp, "Octets: %u\n", (u_int32_t)ntohl(dp->doctets)); fprintf(fp, "First: %u\n", (u_int32_t)ntohl(dp->firsttime)); fprintf(fp, "Last: %u\n", (u_int32_t)ntohl(dp->lasttime)); if (dp->proto == IPPROTO_TCP) { fprintf(fp, "SrcPort: %s\n", tcpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", tcpport_string(ntohs(dp->dst_port))); } else if (dp->proto == IPPROTO_UDP) { fprintf(fp, "SrcPort: %s\n", udpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", udpport_string(ntohs(dp->dst_port))); } else { fprintf(fp, "SrcPort: %d\n", (int)ntohs(dp->src_port)); fprintf(fp, "DstPort: %d\n", (int)ntohs(dp->dst_port)); } fprintf(fp, "Protocol: %s\n", ipproto_string(dp->proto)); fprint_tos(fp, dp->tos); fprint_tcpflags(fp, dp->flags); (void)fclose(fp); } static void dump_netflow_v5(dp) const CNF_DATA_V5 *dp; { FILE *fp; if (!dump_file || (fp = fopen(dump_file, "a")) == 0) return; fprintf(fp, "\nNetflow: V5\n"); fprintf(fp, "SrcAddr: %s\n", intoa(dp->src_addr)); fprintf(fp, "DstAddr: %s\n", intoa(dp->dst_addr)); fprintf(fp, "NextHop: %s\n", intoa(dp->nexthop)); fprintf(fp, "InputIf: %d\n", (int)ntohs(dp->ifin)); fprintf(fp, "OutputIf: %d\n", (int)ntohs(dp->ifout)); fprintf(fp, "Packets: %u\n", (u_int32_t)ntohl(dp->dpkts)); fprintf(fp, "Octets: %u\n", (u_int32_t)ntohl(dp->doctets)); fprintf(fp, "First: %u\n", (u_int32_t)ntohl(dp->firsttime)); fprintf(fp, "Last: %u\n", (u_int32_t)ntohl(dp->lasttime)); if (dp->proto == IPPROTO_TCP) { fprintf(fp, "SrcPort: %s\n", tcpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", tcpport_string(ntohs(dp->dst_port))); } else if (dp->proto == IPPROTO_UDP) { fprintf(fp, "SrcPort: %s\n", udpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", udpport_string(ntohs(dp->dst_port))); } else { fprintf(fp, "SrcPort: %d\n", (int)ntohs(dp->src_port)); fprintf(fp, "DstPort: %d\n", (int)ntohs(dp->dst_port)); } fprint_tcpflags(fp, dp->flags); fprintf(fp, "Protocol: %s\n", ipproto_string(dp->proto)); fprint_tos(fp, dp->tos); fprintf(fp, "SrcASN: %d\n", (int)ntohs(dp->src_as)); fprintf(fp, "DstASN: %d\n", (int)ntohs(dp->dst_as)); fprintf(fp, "SrcMask: %d\n", (int)dp->src_mask); fprintf(fp, "DstMask: %d\n", (int)dp->dst_mask); (void)fclose(fp); } static void dump_netflow_v7(dp) const CNF_DATA_V7 *dp; { FILE *fp; if (!dump_file || (fp = fopen(dump_file, "a")) == 0) return; fprintf(fp, "\nNetflow: V7\n"); fprintf(fp, "SrcAddr: %s\n", intoa(dp->src_addr)); fprintf(fp, "DstAddr: %s\n", intoa(dp->dst_addr)); fprintf(fp, "NextHop: %s\n", intoa(dp->nexthop)); fprintf(fp, "InputIf: %d\n", (int)ntohs(dp->ifin)); fprintf(fp, "OutputIf: %d\n", (int)ntohs(dp->ifout)); fprintf(fp, "Packets: %u\n", (u_int32_t)ntohl(dp->dpkts)); fprintf(fp, "Octets: %u\n", (u_int32_t)ntohl(dp->doctets)); fprintf(fp, "First: %u\n", (u_int32_t)ntohl(dp->firsttime)); fprintf(fp, "Last: %u\n", (u_int32_t)ntohl(dp->lasttime)); if (dp->proto == IPPROTO_TCP) { fprintf(fp, "SrcPort: %s\n", tcpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", tcpport_string(ntohs(dp->dst_port))); } else if (dp->proto == IPPROTO_UDP) { fprintf(fp, "SrcPort: %s\n", udpport_string(ntohs(dp->src_port))); fprintf(fp, "DstPort: %s\n", udpport_string(ntohs(dp->dst_port))); } else { fprintf(fp, "SrcPort: %d\n", (int)ntohs(dp->src_port)); fprintf(fp, "DstPort: %d\n", (int)ntohs(dp->dst_port)); } fprint_tcpflags(fp, dp->flags); fprintf(fp, "Protocol: %s\n", ipproto_string(dp->proto)); fprint_tos(fp, dp->tos); fprintf(fp, "SrcASN: %d\n", (int)ntohl(dp->src_as)); fprintf(fp, "DstASN: %d\n", (int)ntohl(dp->dst_as)); fprintf(fp, "SrcMask: %d\n", (int)dp->src_mask); fprintf(fp, "DstMask: %d\n", (int)dp->dst_mask); fprintf(fp, "RouterSc: %s\n", intoa(dp->router_sc)); (void)fclose(fp); } netdiag-1.2/trafshow-5.2.3/cisco_netflow.h000066400000000000000000000132661323731111400203020ustar00rootroot00000000000000/* * Copyright (c) 2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _CISCO_NETFLOW_H_ #define _CISCO_NETFLOW_H_ #include #define CNF_PORT 9995 /* collector UDP port by default */ /* * Cisco Netflow packets format */ /* * Version 1 Header Format */ typedef struct cnf_hdr_v1 { u_int16_t version; /* version number=1 */ u_int16_t counter; /* number of exported flows (1-24) */ u_int32_t sysuptime; /* milliseconds since router booted */ u_int32_t unix_secs; /* current seconds since UTC */ u_int32_t unix_nsecs; /* current nanoseconds since UTC */ } CNF_HDR_V1; /* * Version 1 Flow Record Format */ typedef struct cnf_data_v1 { u_int32_t src_addr; /* source IP address */ u_int32_t dst_addr; /* destination IP address */ u_int32_t nexthop; /* next hop router's IP address */ u_int16_t ifin; /* input interface's SNMP index */ u_int16_t ifout; /* output interface's SNMP index */ u_int32_t dpkts; /* packets in the flow */ u_int32_t doctets; /* total number of L3 bytes */ u_int32_t firsttime; /* sysuptime at start of flow */ u_int32_t lasttime; /* sysuptime at last packet of flow */ u_int16_t src_port; /* source port number */ u_int16_t dst_port; /* destination port number */ u_int16_t pad1; /* unused (zero) bytes */ u_int8_t proto; /* IP protocol */ u_int8_t tos; /* type of service */ u_int8_t flags; /* cumulative OR of TCP flags */ u_int8_t tcp_retx_cnt; /* Number of mis-sequenced packets with delay >1sec */ u_int8_t tcp_retx_secs; /* Cumulative seconds between mis-sequenced packets */ u_int8_t tcp_misseq_cnt; /* Number of mis-sequenced packets seen */ u_int8_t reserved[4]; /* unused (zero) bytes */ } CNF_DATA_V1; /* * Version 5 Header Format */ typedef struct cnf_hdr_v5 { u_int16_t version; /* version number=5 */ u_int16_t counter; /* number of exported flows (1-30) */ u_int32_t sysuptime; /* milliseconds since router booted */ u_int32_t unix_secs; /* current seconds since UTC */ u_int32_t unix_nsecs; /* current nanoseconds since UTC */ u_int32_t sequence; /* sequence counter of total flows seen */ u_int8_t engine_type; /* switching engine type (RP,VIP) */ u_int8_t engine_id; /* switching engine slot number */ u_int16_t sampling_interval; /* see bellow */ /* * Sampling mode and the sampling interval information. * The first two bits of this field indicates the sampling mode: * 00 = No sampling mode is configured * 01 = `Packet Interval' sampling mode is configured. * (One of every x packet is selected and placed in the NetFlow cache). * 10 = Reserved * 11 = Reserved * The remaining 14 bits hold the value of the sampling interval. * The sampling interval can have any value in the range of 10 to 16382 * (for example, 0x000A to 0x3FFE). */ } CNF_HDR_V5; /* * Version 5 Flow Record Format */ typedef struct cnf_data_v5 { u_int32_t src_addr; /* source IP address */ u_int32_t dst_addr; /* destination IP address */ u_int32_t nexthop; /* next hop router's IP address */ u_int16_t ifin; /* input interface's SNMP index */ u_int16_t ifout; /* output interface's SNMP index */ u_int32_t dpkts; /* packets in the flow */ u_int32_t doctets; /* total number of L3 bytes */ u_int32_t firsttime; /* sysuptime at start of flow */ u_int32_t lasttime; /* sysuptime at last packet of flow */ u_int16_t src_port; /* source port number */ u_int16_t dst_port; /* destination port number */ u_int8_t pad1; /* unused (zero) byte */ u_int8_t flags; /* cumulative OR of TCP flags */ u_int8_t proto; /* IP protocol */ u_int8_t tos; /* type of service */ u_int16_t src_as; /* AS of the source (origin or peer) */ u_int16_t dst_as; /* AS of the destination */ u_int8_t src_mask; /* source address prefix mask bits */ u_int8_t dst_mask; /* dest address prefix mask bits */ u_int16_t pad2; /* unused (zero) bytes */ } CNF_DATA_V5; /* * Version 7 Header Format */ typedef struct cnf_hdr_v7 { u_int16_t version; /* version number=7 */ u_int16_t counter; /* number of exported flows (1-27) */ u_int32_t sysuptime; /* milliseconds since router booted */ u_int32_t unix_secs; /* current seconds since UTC */ u_int32_t unix_nsecs; /* current nanoseconds since UTC */ u_int32_t sequence; /* sequence counter of total flows */ u_int32_t reserved; /* unused (zero) bytes */ } CNF_HDR_V7; /* * Version 7 Flow Record Format */ typedef struct cnf_data_v7 { u_int32_t src_addr; /* source IP address */ u_int32_t dst_addr; /* destination IP address */ u_int32_t nexthop; /* next hop router's IP address */ u_int16_t ifin; /* input interface's SNMP index */ u_int16_t ifout; /* output interface's SNMP index */ u_int32_t dpkts; /* packets in the flow */ u_int32_t doctets; /* total number of L3 bytes */ u_int32_t firsttime; /* sysuptime at start of flow */ u_int32_t lasttime; /* sysuptime at last packet of flow */ u_int16_t src_port; /* source port number */ u_int16_t dst_port; /* destination port number */ u_int8_t pad1; /* unused (zero) byte */ u_int8_t flags; /* cumulative OR of TCP flags */ u_int8_t proto; /* IP protocol */ u_int8_t tos; /* type of service */ u_int32_t src_as; /* AS of the source (origin of peer) */ u_int32_t dst_as; /* AS of the destination */ u_int8_t src_mask; /* source address prefix mask bits */ u_int8_t dst_mask; /* dest address prefix mask bits */ u_int16_t pad2; /* unused (zero) bytes */ u_int32_t router_sc; /* router which is shortcut by switch */ } CNF_DATA_V7; struct pcap_handler; int cisco_netflow_init(struct pcap_handler **ph_list, int port); #endif /* !_CISCO_NETFLOW_H_ */ netdiag-1.2/trafshow-5.2.3/colormask.c000066400000000000000000000325631323731111400174320ustar00rootroot00000000000000/* * Copyright (c) 1993-1997,2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * Redistribution in binary form may occur without any restrictions. * * THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_HAS_COLORS #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "colormask.h" #include "trafshow.h" #include "netstat.h" #ifdef DEBUG #include "show_stat.h" /* just for hdr2str() */ #endif /* mask entry */ struct cm_entry { struct internet_header in_hdr; int src_mask; /* source ip address mask */ int dst_mask; /* destination ip address mask */ short pair; /* color-pair */ int attr; /* video attributes; bold, blink, etc */ }; static struct cm_entry *color_mask = NULL; static int n_masks = 0; static int n_pairs = 0; static const char *rc_file = 0; static int rc_line; /* SLcurses can't handle attributes as well; so hack it */ #ifdef HAVE_SLCURSES static void slang_init_pair(short pair, short fc, short bc, int at) { SLtt_set_color_object(pair, ((fc | (bc << 8)) << 8) | at); } static int slang_pair_content(short pair, short *fc, short *bc) { int attr; SLtt_Char_Type at; at = SLtt_get_color_object(pair); attr = at & (A_BOLD | A_BLINK); at &= ~(A_BOLD | A_BLINK); at >>= 8; *fc = at & 0xff; *bc = (at >> 8) & 0xff; return attr; } #endif /* HAVE_SLCURSES */ static short findpair(short f, short b, int a) { int i; short f1 = -1, b1 = -1; struct cm_entry *cm; for (cm = color_mask, i = 0; cm != NULL && i < n_masks-1; cm++, i++) { #ifdef HAVE_SLCURSES int a1 = slang_pair_content(cm->pair, &f1, &b1); if (f1 >= COLORS) f1 = -1; if (b1 >= COLORS) b1 = -1; if (f == f1 && b == b1 && a == a1) return cm->pair; #else pair_content(cm->pair, &f1, &b1); if (f1 >= COLORS) f1 = -1; if (b1 >= COLORS) b1 = -1; if (f == f1 && b == b1) return cm->pair; #endif } return 0; } static int add_colormask(const char *s, struct cm_entry *m) { int i, attr = 0; short fc, bc; char f[100], *b; static char *ctab[8] = { "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white" }; #ifdef HAVE_USE_DEFAULT_COLORS static short fc_def = -1, bc_def = -1; #else static short fc_def = COLOR_WHITE, bc_def = COLOR_BLACK; #endif if ((b = strchr(strcpy(f, s), ':')) != NULL) *b++ = '\0'; if (*f) { for (i = 0; i < 8; i++) if (!strcasecmp(ctab[i], f)) break; if (i < 8) fc = i; else { fc = atoi(f); if (fc < 1 || fc > COLORS) { fprintf(stderr, "%s: line %d: Unknown color `%s'\n", rc_file, rc_line, f); return -1; } } if (isupper((int)*f)) attr |= A_BOLD; } else fc = fc_def; if (b && *b) { for (i = 0; i < 8; i++) if (!strcasecmp(ctab[i], b)) break; if (i < 8) bc = i; else { bc = atoi(b); if (bc < 1 || bc > COLORS) { fprintf(stderr, "%s: line %d: Unknown color `%s'\n", rc_file, rc_line, b); return -1; } } if (isupper((int)*b)) attr |= A_BLINK; } else bc = bc_def; if (m != NULL) { if ((color_mask = realloc(color_mask, ++n_masks * sizeof(struct cm_entry))) == NULL) { fprintf(stderr, "add_colormask: realloc: Out of memory?\n"); return -1; } if ((m->pair = findpair(fc, bc, attr)) == 0) { if (++n_pairs < COLOR_PAIRS-1) { #ifdef HAVE_SLCURSES slang_init_pair(n_pairs, fc, bc, attr); #else init_pair(n_pairs, fc, bc); #endif } else { fprintf(stderr, "%s: line %d: Max %d color-pairs can be used\n", rc_file, rc_line, COLOR_PAIRS-1); return -1; } m->pair = n_pairs; } m->attr = attr; memcpy(color_mask + (n_masks-1), m, sizeof(struct cm_entry)); } else { /* default colors */ #ifdef HAVE_SLCURSES slang_init_pair(0, fc, bc, attr); #else #ifdef HAVE_BKGD init_pair(COLOR_PAIRS-1, fc, bc); bkgd(COLOR_PAIR(COLOR_PAIRS-1) | attr); #elif HAVE_WBKGD init_pair(COLOR_PAIRS-1, fc, bc); wbkgd(stdscr, COLOR_PAIR(COLOR_PAIRS-1) | attr); #else /* assume the color-pair 0 is background for whole screen */ init_pair(0, fc, bc); #endif #endif fc_def = fc; bc_def = bc; } return 0; } static int is_any(const char *s) { if (!s || !*s) return 0; return (!strcmp(s, "*") || !strcasecmp(s, "any") || !strcasecmp(s, "all")); } static int is_number(const char *s) { if (!s || !*s) return 0; for (; *s; s++) { if (!isdigit((int)*s)) return 0; } return 1; } static char * str2proto(const char *str, int *proto) { int num; struct protoent *pe; if (is_any(str)) { *proto = 0; return ""; } if (is_number(str)) { num = atoi(str); if (num > 0 && num <= 0xff) { if ((pe = getprotobynumber(num)) != 0) { *proto = pe->p_proto; return pe->p_name; } *proto = num; return ""; } } if ((pe = getprotobyname(str)) != 0) { *proto = pe->p_proto; return pe->p_name; } fprintf(stderr, "%s: line %d: Unknown protocol `%s'\n", rc_file, rc_line, str); return 0; } static int str2port(const char *str, const char *proto) { int num; struct servent *se; if (is_any(str)) return 0; num = atoi(str); if (num > 0 && num <= 0xffff) return htons((u_int16_t)num); if ((se = getservbyname(str, (proto && *proto) ? proto : 0)) != 0) return se->s_port; if (proto && *proto) { fprintf(stderr, "%s: line %d: Unknown port `%s' at protocol `%s'\n", rc_file, rc_line, str, proto); } else { fprintf(stderr, "%s: line %d: Unknown port `%s'\n", rc_file, rc_line, str); } return -1; } static int str2addr(const char *str, const char *proto, struct ip_address *addr, int *mask) { int op, ver = 0; char buf[256], *cp, *mp, *pp; if (proto && !strcasecmp(proto, "IPv6")) { #ifdef INET6 ver = 6; #else fprintf(stderr, "%s: line %d: IPv6 is unsupported at this system\n", rc_file, rc_line); return -1; #endif } cp = strcpy(buf, str); if ((mp = strchr(cp, '/')) != 0) { *mp++ = '\0'; cp = mp; } if ((pp = strchr(cp, ',')) != 0) { *pp++ = '\0'; } if (mp && !is_number(mp)) { fprintf(stderr, "%s: line %d: %s: Mask must be number of bits\n", rc_file, rc_line, mp); return -1; } if (!is_any(buf)) { op = 0; #ifdef INET6 if (ver == 6 || strchr(buf, ':')) { ver = 6; op = inet_pton(AF_INET6, buf, &addr->ip6_addr); if (op < 0) { fprintf(stderr, "%s: line %d: %s: %s\n", rc_file, rc_line, buf, strerror(errno)); return -1; } } #endif if (!op) { ver = 4; op = inet_pton(AF_INET, buf, &addr->ip_addr); if (op < 0) { fprintf(stderr, "%s: line %d: %s: %s\n", rc_file, rc_line, buf, strerror(errno)); return -1; } } if (!op) { struct hostent *he; if ((he = gethostbyname(buf)) == 0) { fprintf(stderr, "%s: line %d: %s: Unknown host\n", rc_file, rc_line, buf); return -1; } if (he->h_addrtype == AF_INET) { ver = 4; memcpy(&addr->ip_addr, he->h_addr, MIN(sizeof(addr->ip_addr), he->h_length)); } #ifdef INET6 else if (he->h_addrtype == AF_INET6) { ver = 6; memcpy(&addr->ip6_addr, he->h_addr, MIN(sizeof(addr->ip6_addr), he->h_length)); } #endif else { fprintf(stderr, "%s: line %d: %s: Unknown address family\n", rc_file, rc_line, buf); return -1; } } } if (pp) { if ((op = str2port(pp, proto)) == -1) return -1; addr->ip_port = op; } if (mask) { if (mp) { op = atoi(mp); if (op < 8 || op > 128) { fprintf(stderr, "%s: line %d: %d: Wrong mask\n", rc_file, rc_line, op); return -1; } *mask = op; } else *mask = 0; } return ver; } int init_colormask() { FILE *fp; int num; struct cm_entry me, *cm; char *cp, buf[1024]; char s1[256], s2[256], s3[256], s4[256]; if (rc_file) { free((char *)rc_file); rc_file = 0; } if (!color_conf) { if ((cp = getenv("HOME")) != 0) { (void)strcpy(buf, cp); (void)strcat(buf, "/"); } else buf[0] = '\0'; (void)strcat(buf, "."); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) { (void)strcpy(buf, "/etc/"); (void)strcat(buf, progname); if ((fp = fopen(buf, "r")) == NULL) return 0; } rc_file = strdup(buf); } else { if ((fp = fopen(color_conf, "r")) == NULL) { fprintf(stderr, "%s: %s\n", color_conf, strerror(errno)); return -1; } rc_file = strdup(color_conf); } if (!rc_file) { fprintf(stderr, "init_colormask: strdup: Out of memory?\n"); (void)fclose(fp); return -1; } rc_line = 0; cm = &me; #ifdef HAVE_USE_DEFAULT_COLORS use_default_colors(); #endif while (fgets(buf, sizeof(buf), fp) != NULL) { rc_line++; if (buf[0] == '\n' || buf[0] == '#') continue; if ((cp = strchr(buf, '#')) != NULL) { *cp++ = '\n'; *cp = '\0'; } memset(cm, 0, sizeof(struct cm_entry)); num = sscanf(buf, "%s %s %s %s\n", s1, s2, s3, s4); if (num == 2) { if (strcasecmp(s1, "default")) { if ((cp = strchr(s1, '/')) != 0) { *cp++ = '\0'; if ((cp = str2proto(cp, &num)) == 0) { (void)fclose(fp); return -1; } cm->in_hdr.proto = num; } if ((num = str2port(s1, cp)) == -1) { (void)fclose(fp); return -1; } cm->in_hdr.src.ip_port = num; cm->in_hdr.dst.ip_port = 0; if (add_colormask(s2, cm) < 0) { (void)fclose(fp); return -1; } cm->in_hdr.src.ip_port = 0; cm->in_hdr.dst.ip_port = num; if (add_colormask(s2, cm) < 0) { (void)fclose(fp); return -1; } } else if (add_colormask(s2, 0) < 0) { (void)fclose(fp); return -1; } } else if (num == 3) { num = str2addr(s1, 0, &cm->in_hdr.src, &cm->src_mask); if (num == -1) { (void)fclose(fp); return -1; } cm->in_hdr.ver = num; num = str2addr(s2, 0, &cm->in_hdr.dst, &cm->dst_mask); if (num == -1) { (void)fclose(fp); return -1; } if (!cm->in_hdr.ver) { cm->in_hdr.ver = num; } else if (num && num != cm->in_hdr.ver) { fprintf(stderr, "%s: line %d: Addresses family mismatch\n", rc_file, rc_line); (void)fclose(fp); return -1; } if (add_colormask(s3, cm) < 0) { (void)fclose(fp); return -1; } } else if (num == 4) { if ((cp = str2proto(s1, &num)) == 0) { (void)fclose(fp); return -1; } cm->in_hdr.proto = num; num = str2addr(s2, cp, &cm->in_hdr.src, &cm->src_mask); if (num == -1) { (void)fclose(fp); return -1; } cm->in_hdr.ver = num; num = str2addr(s3, cp, &cm->in_hdr.dst, &cm->dst_mask); if (num == -1) { (void)fclose(fp); return -1; } if (!cm->in_hdr.ver) { cm->in_hdr.ver = num; } else if (num && num != cm->in_hdr.ver) { fprintf(stderr, "%s: line %d: Addresses family mismatch\n", rc_file, rc_line); (void)fclose(fp); return -1; } if (add_colormask(s4, cm) < 0) { (void)fclose(fp); return -1; } } else { fprintf(stderr, "%s: line %d: Bad format\n", rc_file, rc_line); (void)fclose(fp); return -1; } } (void)fclose(fp); #ifdef DEBUG for (cm = color_mask, num = 0; cm && num < n_masks; cm++, num++) { struct netstat_header nh; memset(&nh, 0, sizeof(nh)); nh.in_hdr = cm->in_hdr; hdr2str(&nh, s1, sizeof(s1), s2, sizeof(s2), s3, sizeof(s3)); fprintf(stderr, "%d:", num+1); fprintf(stderr, " proto=%s", s3); fprintf(stderr, " src=%s", s1); fprintf(stderr, " src_mask=%d", cm->src_mask); fprintf(stderr, " dst=%s", s2); fprintf(stderr, " dst_mask=%d", cm->dst_mask); fprintf(stderr, " color_pair=%d\r\n", (int)cm->pair); } fflush(stderr); pause(); #endif return n_masks; } static u_int32_t netmask(int bits) { register u_int32_t mask = 0; int i; for (i = 0; i < bits; i++) { mask >>= 1; mask |= 0x80000000L; } return (u_int32_t)htonl(mask); } int colormask(nh) const struct netstat_header *nh; { /* sanity check */ if (!nh) return A_NORMAL; if (nh->in_hdr.ver) { register const struct cm_entry *cm; int i; for (cm = color_mask, i = 0; cm && i < n_masks; cm++, i++) { /* IP version */ if (cm->in_hdr.ver) { if (nh->in_hdr.ver != cm->in_hdr.ver) continue; } /* IP protocol */ if (cm->in_hdr.proto) { if (nh->in_hdr.proto != cm->in_hdr.proto) continue; } /* IP source address */ if (cm->in_hdr.src.ip_addr.s_addr) { if (cm->src_mask) { u_int32_t mask = netmask(cm->src_mask); if ((nh->in_hdr.src.ip_addr.s_addr & mask) ^ (cm->in_hdr.src.ip_addr.s_addr & mask)) continue; } else if (nh->in_hdr.src.ip_addr.s_addr != cm->in_hdr.src.ip_addr.s_addr) continue; } /* IP source port */ if (cm->in_hdr.src.ip_port) { if (nh->in_hdr.src.ip_port != cm->in_hdr.src.ip_port) continue; } /* IP destination address */ if (cm->in_hdr.dst.ip_addr.s_addr) { if (cm->dst_mask) { u_int32_t mask = netmask(cm->dst_mask); if ((nh->in_hdr.dst.ip_addr.s_addr & mask) ^ (cm->in_hdr.dst.ip_addr.s_addr & mask)) continue; } else if (nh->in_hdr.dst.ip_addr.s_addr != cm->in_hdr.dst.ip_addr.s_addr) continue; } /* IP destination port */ if (cm->in_hdr.dst.ip_port) { if (nh->in_hdr.dst.ip_port != cm->in_hdr.dst.ip_port) continue; } #ifdef HAVE_SLCURSES return (COLOR_PAIR(cm->pair)); #else return (COLOR_PAIR(cm->pair) | cm->attr); #endif } } return A_NORMAL; } #endif /* HAVE_HAS_COLORS */ netdiag-1.2/trafshow-5.2.3/colormask.h000066400000000000000000000012731323731111400174310ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _COLORMASK_H_ #define _COLORMASK_H_ /* SLcurses can't handle attributes as well; so hack it */ #ifdef HAVE_SLCURSES #ifdef SLTT_BOLD_MASK #undef A_BOLD #define A_BOLD SLTT_BOLD_MASK #endif #ifdef SLTT_BLINK_MASK #undef A_BLINK #define A_BLINK SLTT_BLINK_MASK #endif #endif struct netstat_header; int init_colormask(void); int colormask(const struct netstat_header *nh); #endif /* !_COLORMASK_H_ */ netdiag-1.2/trafshow-5.2.3/config.guess000077500000000000000000000476221323731111400176160ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-cbm-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-atari-openbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-sun-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-apple-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >dummy.c int main (argc, argv) int argc; char **argv; { #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF ${CC-cc} dummy.c -o dummy \ && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[3478]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; hp3[0-9][05]:OpenBSD:*:*) echo m68k-hp-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo i386-pc-cygwin32 exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin32 exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then echo "powerpc-unknown-linux-gnu" ; exit 0 elif test "${UNAME_MACHINE}" = "alpha" ; then echo alpha-unknown-linux-gnu ; exit 0 elif test "${UNAME_MACHINE}" = "sparc" ; then echo sparc-unknown-linux-gnu ; exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. test ! -d /usr/lib/ldscripts/. \ && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 # Determine whether the default compiler is a.out or elf cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 netdiag-1.2/trafshow-5.2.3/config.h.in000066400000000000000000000056411323731111400173140ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * Redistribution in binary form may occur without any restrictions. * * THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _CONFIG_H_ #define _CONFIG_H_ /* * This file contain compile-time options and system-depended definitions. * Please edit config.h after `./configure' before `make' (if required). */ /* * The curses library definition. */ /* Define if you have the slang curses library (-lslang) */ #undef HAVE_SLCURSES /* Define if you have the ncurses library (-lncurses) */ #undef HAVE_NCURSES /* Define if you have the curses library (-lcurses) */ #undef HAVE_CURSES /* Define if your curses has a colors functions such as has_colors(), start_color(), init_pair(), and so on */ #undef HAVE_HAS_COLORS /* Define if your curses has the bkgd() function */ #undef HAVE_BKGD /* Define if your curses has the wbkgd() function */ #undef HAVE_WBKGD /* Define if your curses has the wredrawln() function */ #undef HAVE_WREDRAWLN /* Define if your curses has the resizeterm() function */ #undef HAVE_RESIZETERM /* Define if your curses has the use_default_colors() function */ #undef HAVE_USE_DEFAULT_COLORS /* * System-depended definition. */ /* Define to `unsigned char' if doesn't define */ #undef u_int8_t /* Define to `unsigned short' if doesn't define */ #undef u_int16_t /* Define to `unsigned int' if doesn't define */ #undef u_int32_t /* Define to `unsigned long long' if doesn't define */ #undef u_int64_t /* Define to `unsigned int' if doesn't define */ #undef in_addr_t /* Define to `int' if or doesn't define */ #undef socklen_t /* Define if has declared `struct sockaddr_storage' */ #undef HAVE_SOCKADDR_STORAGE /* Define if has declared `struct ether_addr' */ #undef HAVE_ETHER_ADDR /* Define if your libpcap has the pcap_dump_flush() function */ #undef HAVE_PCAP_DUMP_FLUSH /* Define if your libpcap has the pcap_get_selectable_fd() function */ #undef HAVE_PCAP_GET_SELECTABLE_FD /* Define if you have the siginterrupt() function */ #undef HAVE_SIGINTERRUPT /* Define if you have the strcasecmp() function */ #undef HAVE_STRCASECMP /* Define if you have the strftime() function */ #undef HAVE_STRFTIME /* Define if you have POSIX threads libraries and header files */ #undef HAVE_PTHREAD /* Define if you have the header file */ #undef HAVE_SYS_TERMIOS_H /* Define if you have the header file */ #undef HAVE_NET_IF_DL_H /* Define if you have the header file */ #undef HAVE_RESOLV_H /* Define to empty if the keyword does not work */ #undef const /* fake for osf */ #undef __STDC__ #endif /* !_CONFIG_H */ netdiag-1.2/trafshow-5.2.3/config.sub000077500000000000000000000454441323731111400172610ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ | arme[lb] | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | i370 | sh \ | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ | pdp11 | mips64el | mips64orion | mips64orionel \ | sparc | sparclet | sparclite | sparc64) basic_machine=$basic_machine-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[3456]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigados) basic_machine=m68k-cbm os=-amigados ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[3456]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[3456]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[3456]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[3456]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; np1) basic_machine=np1-gould ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5) basic_machine=i586-intel ;; pentiumpro | p6) basic_machine=i686-intel ;; pentium-* | p5-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; k5) # We don't have specific support for AMD's K5 yet, so just call it a Pentium basic_machine=i586-amd ;; nexen) # We don't have specific support for Nexgen yet, so just call it a Pentium basic_machine=i586-nexgen ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; symmetry) basic_machine=i386-sequent os=-dynix ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) basic_machine=mips-mips ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware* | svr4*) os=-sysv4 ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -xenix) os=-xenix ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-ibm) os=-aix ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigados ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os netdiag-1.2/trafshow-5.2.3/configure000077500000000000000000006211031323731111400171750ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="trafshow.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_join (); int main () { pthread_join (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6 ;; -*) echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6 PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 echo "${ECHO_T}$acx_pthread_config" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_JOINABLE else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_UNDETACHED; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_UNDETACHED else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<\_ACEOF #define PTHREAD_CREATE_JOINABLE $ok _ACEOF fi echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6 if test x"$ok" = xunknown; then { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6 flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris*) flag="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";; *-osf* | *-hpux*) flag="-D_REENTRANT";; esac echo "$as_me:$LINENO: result: ${flag}" >&5 echo "${ECHO_T}${flag}" >&6 if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="cc_r" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 echo "${ECHO_T}$PTHREAD_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD 1 _ACEOF : else acx_pthread_ok=no { { echo "$as_me:$LINENO: error: cannot find pthread; see the INSTALL notes" >&5 echo "$as_me: error: cannot find pthread; see the INSTALL notes" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/termios.h net/if_dl.h paths.h resolv.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for u_int8_t" >&5 echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6 if test "${ac_cv_type_u_int8_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((u_int8_t *) 0) return 0; if (sizeof (u_int8_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int8_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_u_int8_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5 echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6 if test $ac_cv_type_u_int8_t = yes; then : else cat >>confdefs.h <<_ACEOF #define u_int8_t unsigned char _ACEOF fi echo "$as_me:$LINENO: checking for u_int16_t" >&5 echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6 if test "${ac_cv_type_u_int16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((u_int16_t *) 0) return 0; if (sizeof (u_int16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_u_int16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6 if test $ac_cv_type_u_int16_t = yes; then : else cat >>confdefs.h <<_ACEOF #define u_int16_t unsigned short _ACEOF fi echo "$as_me:$LINENO: checking for u_int32_t" >&5 echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6 if test "${ac_cv_type_u_int32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((u_int32_t *) 0) return 0; if (sizeof (u_int32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_u_int32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6 if test $ac_cv_type_u_int32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define u_int32_t unsigned int _ACEOF fi echo "$as_me:$LINENO: checking for u_int64_t" >&5 echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6 if test "${ac_cv_type_u_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((u_int64_t *) 0) return 0; if (sizeof (u_int64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_u_int64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6 if test $ac_cv_type_u_int64_t = yes; then : else cat >>confdefs.h <<_ACEOF #define u_int64_t unsigned long long _ACEOF fi echo "$as_me:$LINENO: checking for in_addr_t" >&5 echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6 if test "${ac_cv_type_in_addr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { in_addr_t ipaddr ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_in_addr_t="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_in_addr_t="unsigned int" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6 if test "$ac_cv_type_in_addr_t" != yes; then cat >>confdefs.h <<_ACEOF #define in_addr_t $ac_cv_type_in_addr_t _ACEOF fi echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { socklen_t slen ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_socklen_t="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t="int" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 if test "$ac_cv_type_socklen_t" != yes; then cat >>confdefs.h <<_ACEOF #define socklen_t $ac_cv_type_socklen_t _ACEOF fi echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6 if test "${ac_cv_sockaddr_storage+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { struct sockaddr_storage ss ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sockaddr_storage="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_sockaddr_storage="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_sockaddr_storage" >&5 echo "${ECHO_T}$ac_cv_sockaddr_storage" >&6 if test "$ac_cv_sockaddr_storage" != no; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_STORAGE 1 _ACEOF fi echo "$as_me:$LINENO: checking for struct ether_addr" >&5 echo $ECHO_N "checking for struct ether_addr... $ECHO_C" >&6 if test "${ac_cv_ether_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { struct ether_addr ea ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_ether_addr="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_ether_addr="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_ether_addr" >&5 echo "${ECHO_T}$ac_cv_ether_addr" >&6 if test "$ac_cv_ether_addr" != no; then cat >>confdefs.h <<\_ACEOF #define HAVE_ETHER_ADDR 1 _ACEOF fi echo "$as_me:$LINENO: checking for main in -lresolv" >&5 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6 if test "${ac_cv_lib_resolv_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_resolv_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6 if test $ac_cv_lib_resolv_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi echo "$as_me:$LINENO: checking for main in -linet" >&5 echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet_main=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF LIBS="-linet $LIBS" fi echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi for ac_func in siginterrupt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in snprintf strftime strcasecmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case $LIBOBJS in "$ac_func.$ac_objext" | \ *" $ac_func.$ac_objext" | \ "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done echo "$as_me:$LINENO: checking for pcap_findalldevs in -lpcap" >&5 echo $ECHO_N "checking for pcap_findalldevs in -lpcap... $ECHO_C" >&6 if test "${ac_cv_lib_pcap_pcap_findalldevs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pcap_findalldevs (); int main () { pcap_findalldevs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pcap_pcap_findalldevs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pcap_pcap_findalldevs=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_pcap_pcap_findalldevs" >&5 echo "${ECHO_T}$ac_cv_lib_pcap_pcap_findalldevs" >&6 if test $ac_cv_lib_pcap_pcap_findalldevs = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" else { { echo "$as_me:$LINENO: error: at least libpcap 0.7 is required; see the INSTALL notes" >&5 echo "$as_me: error: at least libpcap 0.7 is required; see the INSTALL notes" >&2;} { (exit 1); exit 1; }; } fi for ac_func in pcap_dump_flush do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in pcap_get_selectable_fd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); int main () { tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 if test $ac_cv_lib_termcap_tgetent = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTERMCAP 1 _ACEOF LIBS="-ltermcap $LIBS" fi echo "$as_me:$LINENO: checking for curses library" >&5 echo $ECHO_N "checking for curses library... $ECHO_C" >&6 if test "${ac_cv_have_curses+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_save_CFLAGS="$CFLAGS" ac_cv_save_LIBS="$LIBS" LIBS="-lslang $ac_cv_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { initscr(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_curses="slang" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-lncurses $ac_cv_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { initscr(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_curses="ncurses" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="-I/usr/include/ncurses $ac_cv_save_CFLAGS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { initscr(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_curses="n_curses" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-lcurses $ac_cv_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { initscr(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_have_curses="curses" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_curses="none" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_cv_save_CFLAGS" fi echo "$as_me:$LINENO: result: $ac_cv_have_curses" >&5 echo "${ECHO_T}$ac_cv_have_curses" >&6 case "$ac_cv_have_curses" in slang) cat >>confdefs.h <<\_ACEOF #define HAVE_SLCURSES 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_HAS_COLORS 1 _ACEOF ;; ncurses) cat >>confdefs.h <<\_ACEOF #define HAVE_NCURSES 1 _ACEOF for ac_func in has_colors do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; n_curses) CFLAGS="-I/usr/include/ncurses $CFLAGS" cat >>confdefs.h <<\_ACEOF #define HAVE_NCURSES 1 _ACEOF for ac_func in has_colors do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; curses) cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES 1 _ACEOF for ac_func in has_colors do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; *) { { echo "$as_me:$LINENO: error: cannot find curses; see the INSTALL notes" >&5 echo "$as_me: error: cannot find curses; see the INSTALL notes" >&2;} { (exit 1); exit 1; }; } ;; esac for ac_func in bkgd wbkgd wredrawln resizeterm use_default_colors do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@target@,$target,;t t s,@target_cpu@,$target_cpu,;t t s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@YACC@,$YACC,;t t s,@LEX@,$LEX,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@acx_pthread_config@,$acx_pthread_config,;t t s,@PTHREAD_CC@,$PTHREAD_CC,;t t s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi netdiag-1.2/trafshow-5.2.3/configure.in000066400000000000000000000103441323731111400175760ustar00rootroot00000000000000dnl dnl Copyright (c) 2003 Rinet Corp., Novosibirsk, Russia dnl dnl Redistribution and use in source forms, with and without modification, dnl are permitted provided that this entire comment appears intact. dnl Redistribution in binary form may occur without any restrictions. dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. dnl dnl dnl configure.in -- template for ./configure dnl Process this file with `autoconf' to produce a configure script dnl remember to edit configure.in, not ./configure dnl AC_INIT(trafshow.c) AC_CONFIG_HEADER(config.h) AC_CANONICAL_SYSTEM dnl Checks for misc required programs. AC_PROG_CC AC_PROG_YACC AC_PROG_LEX AC_REQUIRE_CPP AC_AIX ACX_PTHREAD(, AC_MSG_ERROR(cannot find pthread; see the INSTALL notes)) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_TIME AC_CHECK_HEADERS(sys/termios.h net/if_dl.h paths.h resolv.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_CHECK_TYPE(u_int8_t, unsigned char) AC_CHECK_TYPE(u_int16_t, unsigned short) AC_CHECK_TYPE(u_int32_t, unsigned int) AC_CHECK_TYPE(u_int64_t, unsigned long long) dnl AC_CHECK_TYPE(in_addr_t, unsigned int) dnl Some OS keeps in_addr_t in netinet/in.h not in sys/types.h AC_CACHE_CHECK(for in_addr_t, ac_cv_type_in_addr_t, AC_TRY_COMPILE([ #include #include ],[in_addr_t ipaddr], ac_cv_type_in_addr_t="yes", ac_cv_type_in_addr_t="unsigned int" ) ) if test "$ac_cv_type_in_addr_t" != yes; then AC_DEFINE_UNQUOTED(in_addr_t, $ac_cv_type_in_addr_t) fi AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, AC_TRY_COMPILE([ #include #include #include ],[socklen_t slen], ac_cv_type_socklen_t="yes", ac_cv_type_socklen_t="int" ) ) if test "$ac_cv_type_socklen_t" != yes; then AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_type_socklen_t) fi AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_sockaddr_storage, AC_TRY_COMPILE([ #include #include #include ],[struct sockaddr_storage ss], ac_cv_sockaddr_storage="yes", ac_cv_sockaddr_storage="no" ) ) if test "$ac_cv_sockaddr_storage" != no; then AC_DEFINE(HAVE_SOCKADDR_STORAGE) fi AC_CACHE_CHECK(for struct ether_addr, ac_cv_ether_addr, AC_TRY_COMPILE([ #include #include #include #include ],[struct ether_addr ea], ac_cv_ether_addr="yes", ac_cv_ether_addr="no" ) ) if test "$ac_cv_ether_addr" != no; then AC_DEFINE(HAVE_ETHER_ADDR) fi dnl Check for network system libraries. AC_CHECK_LIB(resolv, main) AC_CHECK_LIB(inet, main) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, connect) dnl Checks for library functions. AC_CHECK_FUNCS(siginterrupt) AC_REPLACE_FUNCS(snprintf strftime strcasecmp) dnl Check for pcap libraries. AC_CHECK_LIB(pcap, pcap_findalldevs,, AC_MSG_ERROR(at least libpcap 0.7 is required; see the INSTALL notes)) AC_CHECK_FUNCS(pcap_dump_flush) AC_CHECK_FUNCS(pcap_get_selectable_fd) dnl termcap library may be required. AC_CHECK_LIB(termcap, tgetent) AC_MSG_CHECKING(for curses library) AC_CACHE_VAL(ac_cv_have_curses, ac_cv_save_CFLAGS="$CFLAGS" ac_cv_save_LIBS="$LIBS" LIBS="-lslang $ac_cv_save_LIBS" AC_TRY_LINK([#include ],[initscr();], ac_cv_have_curses="slang", LIBS="-lncurses $ac_cv_save_LIBS" AC_TRY_LINK([#include ], [initscr();], ac_cv_have_curses="ncurses", CFLAGS="-I/usr/include/ncurses $ac_cv_save_CFLAGS" AC_TRY_LINK([#include ], [initscr();], ac_cv_have_curses="n_curses", LIBS="-lcurses $ac_cv_save_LIBS" AC_TRY_LINK([#include ], [initscr();], ac_cv_have_curses="curses", ac_cv_have_curses="none" ) ) ) ) CFLAGS="$ac_cv_save_CFLAGS" ) AC_MSG_RESULT($ac_cv_have_curses) case "$ac_cv_have_curses" in slang) AC_DEFINE(HAVE_SLCURSES) AC_DEFINE(HAVE_HAS_COLORS) ;; ncurses) AC_DEFINE(HAVE_NCURSES) AC_CHECK_FUNCS(has_colors) ;; n_curses) CFLAGS="-I/usr/include/ncurses $CFLAGS" AC_DEFINE(HAVE_NCURSES) AC_CHECK_FUNCS(has_colors) ;; curses) AC_DEFINE(HAVE_CURSES) AC_CHECK_FUNCS(has_colors) ;; *) AC_MSG_ERROR(cannot find curses; see the INSTALL notes) ;; esac AC_CHECK_FUNCS(bkgd wbkgd wredrawln resizeterm use_default_colors) AC_OUTPUT(Makefile) netdiag-1.2/trafshow-5.2.3/domain_resolver.c000066400000000000000000000525241323731111400206270ustar00rootroot00000000000000/* * Copyright (c) 1999-2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_PATHS_H #include #endif #ifdef HAVE_RESOLV_H #include #endif #include "domain_resolver.h" #include "session.h" #include "util.h" #include "trafshow.h" /* just for dprintf() */ #ifndef _PATH_RESCONF #define _PATH_RESCONF "/etc/resolv.conf" #endif #ifndef NAMESERVER_TOKEN #define NAMESERVER_TOKEN "nameserver" #endif #ifndef NAMESERVER_PORT #define NAMESERVER_PORT 53 /* nameserver port */ #endif #ifndef PACKETSZ #define PACKETSZ 512 /* maximum packet size */ #endif static struct sockaddr_in *primary = 0, *secondary = 0; /* currently we handle only following types of nameserver requests */ typedef enum { IpAddress, /* get A resource records */ DomainName, /* get PTR resource records */ MailExchanger /* get MX resource records */ } DomainType; #define MAX_EXPAND_TRIES 3 /* to resolve MX pointing to CNAME */ typedef struct domain_transact_ent { /* caller supplied data */ char *name; /* original requested name (or ip address) */ SESSION *sd; void (*callback)(SESSION *sd, DOMAIN_DATA *dd); /* request */ u_short reqid; /* request id */ u_short expand; /* expand MX pointing to CNAME */ int retry; /* retry counter */ char *domain; /* actual domain name requested */ DomainType type; /* type of request */ /* response */ int rcode; /* nameserver reply code */ DOMAIN_DATA *data; /* list of answered data */ struct domain_transact_ent *next; } DOMAIN_TRANSACT; #define TRANSACT(sd) ((DOMAIN_TRANSACT *)session_cookie(sd)) static DOMAIN_TRANSACT *first_transact = 0; static DOMAIN_TRANSACT *new_transact(); static DOMAIN_TRANSACT *find_transact(u_short reqid); static void free_transact(DOMAIN_TRANSACT *dt); static DOMAIN_TRANSACT *parse_packet(const unsigned char *data, int len); static void nameserver_error(SESSION *sd, int error); static void nameserver_close(SESSION *sd); static void nameserver_reply(SESSION *sd, const unsigned char *data, int len); static int nameserver_request(const char *domain, DomainType type, SESSION *org, void (*notify)(SESSION *sd, DOMAIN_DATA *dd)); static int nameserver_send(SESSION *sd); static void discard_request(void *arg); /* (DOMAIN_TRANSACT *) */ static u_short unique_reqid(); #ifdef HAVE_REPORT_FUNC static const char *rcode2text[6] = { "No error", /* 0 - NOERROR */ "Format error", /* 1 - FORMERR */ "Server failure", /* 2 - SERVFAIL */ "Non existend domain", /* 3 - NXDOAMIN */ "Not implemented", /* 4 - NOTIMP */ "Query refused" /* 5 - REFUSED */ }; #endif #ifdef DEBUG void dump_reply(dt) DOMAIN_TRANSACT *dt; { DOMAIN_DATA *dd; char ipaddr[50]; if (!dt) { printf("REPLY: domain transaction is null\n"); return; } printf("REPLY: reqid=%d retry=%d domain=\"%s\" type=%d rcode=\"%s\"\n", dt->reqid, dt->retry, dt->domain, dt->type, rcode2text[dt->rcode]); for (dd = dt->data; dd; dd = dd->next) { printf("REPLY:\tttl=%u\tpref=%u\tname=\"%s\"\taddr=%s\n", dd->ttl, dd->pref, dd->name, intoa(ipaddr, dd->addr)); } } #endif int domain_resolver_init() { FILE *fp; int ns_cnt = 0; char *cp, buf[1024]; if (!primary) { primary = (struct sockaddr_in *)malloc(sizeof(struct sockaddr_in)); if (!primary) return -1; } memset(primary, 0, sizeof(struct sockaddr_in)); primary->sin_family = AF_INET; primary->sin_port = htons(NAMESERVER_PORT); primary->sin_addr.s_addr = htonl(0x7f000001);/* 127.0.0.1 by default */ if (secondary) { free(secondary); secondary = 0; } if ((fp = fopen(_PATH_RESCONF, "r")) != 0) { while (fgets(buf, sizeof(buf), fp) != 0) { buf[sizeof(buf)-1] = '\0'; for (cp = buf; *cp; cp++) { if (*cp == '#' || *cp == '\r' || *cp == '\n') { *cp = '\0'; break; } if (*cp < ' ') *cp = ' '; } if (buf[0] == '\0') continue; /* skip empty lines and commentary */ if (!strncasecmp(buf, NAMESERVER_TOKEN, sizeof(NAMESERVER_TOKEN)-1)) { cp = strip_blanks(buf + sizeof(NAMESERVER_TOKEN)-1); if (!ns_cnt++) { primary->sin_addr.s_addr = inet_addr(cp); } else if (!secondary) { secondary = (struct sockaddr_in *)malloc(sizeof(struct sockaddr_in)); if (secondary) { memset(secondary, 0, sizeof(struct sockaddr_in)); secondary->sin_family = AF_INET; secondary->sin_port = htons(NAMESERVER_PORT); secondary->sin_addr.s_addr = inet_addr(cp); } } } } (void)fclose(fp); } return ns_cnt; } int domain_resolve_addr(domain, sd, notify) const char *domain; SESSION *sd; void (*notify)(SESSION *sd, DOMAIN_DATA *dd); { return nameserver_request(domain, IpAddress, sd, notify); } int domain_resolve_mxlist(domain, sd, notify) const char *domain; SESSION *sd; void (*notify)(SESSION *sd, DOMAIN_DATA *dd); { return nameserver_request(domain, MailExchanger, sd, notify); } int domain_resolve_name(ipaddr, sd, notify) in_addr_t ipaddr; SESSION *sd; void (*notify)(SESSION *sd, DOMAIN_DATA *dd); { return nameserver_request((char *)&ipaddr, DomainName, sd, notify); } /* * Callback function: catch all errors during nameserver request. */ static void nameserver_error(sd, error) SESSION *sd; int error; { DOMAIN_TRANSACT *dt = TRANSACT(sd); if (sd && dt) { if (error != ETIMEDOUT) { #ifdef HAVE_REPORT_FUNC report(Warn, 0, error, "%lu: domain_resolver: %s (try=%d)", sd->sid, peertoa(0, session_peer(sd)), dt->retry + 1); #endif } else if (++dt->retry < NAMESERVER_RETRIES) { nameserver_send(sd); return; } } nameserver_close(sd); } /* * Normal close nameserver request. */ static void nameserver_close(sd) SESSION *sd; { DOMAIN_TRANSACT *dt = TRANSACT(sd); session_free(sd); if (dt) { if (dt->data) { /* purge unresolved names */ if (dt->type != DomainName) domain_data_free(&dt->data, ""); else if (dt->data->addr == 0 || dt->data->addr == -1) memcpy(&dt->data->addr, dt->name, sizeof(dt->data->addr)); } #ifdef DEBUG dump_reply(dt); #endif if (dt->callback) { (*dt->callback)(dt->sd, dt->data); dt->data = 0; /* received data dispatched */ } free_transact(dt); } } static void discard_request(arg) void *arg; { DOMAIN_TRANSACT *dt = (DOMAIN_TRANSACT *)arg; if (dt) { dt->sd = 0; dt->callback = 0; } } static u_short unique_reqid() { static u_short reqid = 0; if (++reqid == 0) reqid++; /* prevent 0 reqid */ return reqid; } static DOMAIN_TRANSACT * new_transact() { DOMAIN_TRANSACT *curr; if ((curr = (DOMAIN_TRANSACT *)malloc(sizeof(DOMAIN_TRANSACT))) == 0) return 0; memset(curr, 0, sizeof(DOMAIN_TRANSACT)); if (first_transact) { DOMAIN_TRANSACT *prev = first_transact; while (prev->next) prev = prev->next; prev->next = curr; } else first_transact = curr; return curr; } static DOMAIN_TRANSACT * find_transact(reqid) u_short reqid; { DOMAIN_TRANSACT *curr; for (curr = first_transact; curr; curr = curr->next) { if (curr->reqid && curr->reqid == reqid) return curr; } return 0; } static void free_transact(dt) DOMAIN_TRANSACT *dt; { DOMAIN_TRANSACT *curr, *prev, *next; curr = first_transact; prev = 0; while (curr) { if (!dt || curr == dt) { next = curr->next; if (prev) prev->next = next; else first_transact = next; if (curr->sd) session_unbind(curr->sd, discard_request, curr); if (curr->name) free(curr->name); if (curr->domain) free(curr->domain); domain_data_free(&curr->data, 0); free(curr); curr = next; } else { prev = curr; curr = curr->next; } } } DOMAIN_DATA * domain_data_add(list, name, pref) DOMAIN_DATA **list; const char *name; int pref; { DOMAIN_DATA *curr, *last, *prev; int insert; char *cp; /* sanity check */ if (!list || !name || !*name) { errno = EINVAL; return 0; } /* sort it by pref ascending (bigger pref farther) */ last = prev = 0; insert = 0; for (curr = *list; curr; curr = curr->next) { /* prevent duplicates */ if (curr->name && !strcasecmp(curr->name, name)) return curr; if (!insert && pref < curr->pref) { insert++; prev = last; } last = curr; } if ((curr = (DOMAIN_DATA *)malloc(sizeof(DOMAIN_DATA))) == 0) return 0; memset(curr, 0, sizeof(DOMAIN_DATA)); if ((curr->name = strdup(name)) == 0) { int save_errno = errno; free(curr); save_errno = errno; return 0; } /* make all lowercase */ for (cp = curr->name; *cp; cp++) { if (*cp >= 'A' && *cp <= 'Z') *cp = *cp + 32; } curr->pref = pref; if (insert) { if (prev) { curr->next = prev->next; prev->next = curr; } else { curr->next = *list; *list = curr; } } else if (last) { last->next = curr; } else { *list = curr; } return curr; } DOMAIN_DATA * domain_data_find(list, name) DOMAIN_DATA **list; const char *name; { DOMAIN_DATA *curr; /* sanity check */ if (!list || !name || !*name) return 0; for (curr = *list; curr; curr = curr->next) { if (!strcasecmp(curr->name, name)) return curr; } return 0; } void domain_data_free(list, name) DOMAIN_DATA **list; const char *name; { DOMAIN_DATA *curr, *prev, *next; /* sanity check */ if (!list) return; curr = *list; prev = 0; while (curr) { if (!name || (*name == '\0' && curr->addr == 0) || curr->name == name || !strcasecmp(curr->name, name)) { next = curr->next; if (prev) prev->next = next; else *list = next; if (curr->name) free(curr->name); free(curr); curr = next; } else { prev = curr; curr = curr->next; } } } static int nameserver_request(domain, type, org, notify) const char *domain; DomainType type; SESSION *org; void (*notify)(SESSION *sd, DOMAIN_DATA *dd); { SESSION *sd; DOMAIN_TRANSACT *dt; char buf[MAXDNAME]; const u_char *cp; /* sanity check */ if (!domain || !*domain) { errno = EINVAL; return -1; } if (!primary && domain_resolver_init() < 0) return -1; if ((sd = session_open(-1, (struct sockaddr *)primary, DataSequence)) == 0) return -1; if ((dt = new_transact()) == 0) { int save_errno = errno; session_free(sd); errno = save_errno; return -1; } switch (type) { case IpAddress: case MailExchanger: dt->name = strdup(domain); (void)strncpy(buf, domain, sizeof(buf)); buf[sizeof(buf)-1] = '\0'; dt->domain = strdup(buf); break; case DomainName: if ((dt->name = (char *)malloc(sizeof(in_addr_t))) == 0) break; memcpy(dt->name, domain, sizeof(in_addr_t)); cp = (u_char *)domain; snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa", cp[3], cp[2], cp[1], cp[0]); dt->domain = strdup(buf); break; } if (!dt->name || !dt->domain) { int save_errno = errno; session_free(sd); free_transact(dt); errno = save_errno; return -1; } dt->reqid = unique_reqid(); dt->type = type; session_setcallback(sd, 0, nameserver_error, nameserver_reply); session_setcookie(sd, dt); session_settimeout(sd, NAMESERVER_TIMEOUT); if (nameserver_send(sd) < 0) { int save_errno = errno; #ifdef HAVE_REPORT_FUNC char ipaddr[50]; report(Warn, 0, errno, "%lu: nameserver_send: %s", sd->sid, peertoa(ipaddr, session_peer(sd))); #endif session_free(sd); free_transact(dt); errno = save_errno; return -1; } if (org && session_bind(org, discard_request, dt) != -1) dt->sd = org; dt->callback = notify; return 0; } static int nameserver_send(sd) SESSION *sd; { DOMAIN_TRANSACT *dt = TRANSACT(sd); u_char buf[PACKETSZ]; HEADER *hp = (HEADER *)buf; int len; u_char *cp, *dnptrs[50], **dpp, **lastdnptr; /* sanity check */ if (!dt) { errno = EINVAL; return -1; } memset(hp, 0, HFIXEDSZ); hp->id = htons(dt->reqid); hp->rd = 1; /* recursion desired */ hp->qdcount = htons(1); /* we allways utilize one query per packet */ cp = buf + HFIXEDSZ; len = PACKETSZ - (HFIXEDSZ + QFIXEDSZ); dpp = dnptrs; *dpp++ = buf; *dpp = 0; lastdnptr = dnptrs + sizeof(dnptrs) / sizeof(dnptrs[0]); if ((len = dn_comp(dt->domain, cp, len, dnptrs, lastdnptr)) < 0) return -1; cp += len; /* translate our type into appropriate NS opcode && type */ switch (dt->type) { case IpAddress: PUTSHORT(T_A, cp); break; case DomainName: PUTSHORT(T_PTR, cp); break; case MailExchanger: PUTSHORT(T_MX, cp); break; } PUTSHORT(C_IN, cp); len = cp - buf; dprintf(("nameserver_send: \"%s\"", dt->domain)); return session_send(sd, buf, len); } static void nameserver_reply(sd, data, len) SESSION *sd; const unsigned char *data; int len; { DOMAIN_TRANSACT *dt; /* sanity check */ if (!sd) return; if ((dt = parse_packet(data, len)) == 0) { #ifdef HAVE_REPORT_FUNC char ipaddr[50]; report(Info, 0, 0, "%lu: nameserver_reply: %s: unexpected packet (len=%d)", sd->sid, peertoa(ipaddr, session_peer(sd)), len); #endif return; } if (dt->rcode < 0) { #ifdef HAVE_REPORT_FUNC char ipaddr[50]; report(Info, 0, 0, "%lu: nameserver_reply: %s: broken packet (len=%d try=%d err=%d)", sd->sid, peertoa(ipaddr, session_peer(sd)), len, dt->retry + 1, -dt->rcode); #endif return; } #ifdef HAVE_REPORT_FUNC if (dt->rcode != NOERROR && dt->rcode != SERVFAIL && dt->rcode != NXDOMAIN) { char ipaddr[50]; report(Crit, 0, 0, "%lu: nameserver_reply: %s: %s (try=%d)", sd->sid, peertoa(ipaddr, session_peer(sd)), rcode2text[dt->rcode], dt->retry + 1); } #endif #ifdef DEBUG dump_reply(dt); #endif if (dt->rcode == NOERROR && (dt->type == MailExchanger || (dt->type == IpAddress && dt->expand && dt->expand < MAX_EXPAND_TRIES))) { DOMAIN_DATA *dd; for (dd = dt->data; dd; dd = dd->next) { /* it was CNAME -- expand it */ if (dd->name && !dd->addr) { if (dt->domain) { if (!strcasecmp(dd->name, dt->domain)) break; /* to prevent looping */ free(dt->domain); } if ((dt->domain = strdup(dd->name)) == 0) break; dt->reqid = unique_reqid(); dt->expand++; dt->retry = 0; dt->type = IpAddress; if (nameserver_send(sd) < 0) break; return; } } } nameserver_close(sd); /* caller notified inside */ } static DOMAIN_TRANSACT * parse_packet(data, len) const unsigned char *data; int len; { const u_char *pkt = data; HEADER *hp = (HEADER *)pkt; const u_char *cp = pkt + HFIXEDSZ; int qdcount, ancount, nscount, arcount, nb; DOMAIN_TRANSACT *dt; DOMAIN_DATA *dd; u_short type, class, rdlen, pref; u_int ttl; char name[MAXDNAME+1]; /* * first check the response Header. */ if (!hp || len < HFIXEDSZ) { dprintf(("parse_packet: undersized packet, len=%d", len)); return 0; } if (!hp->qr) { dprintf(("parse_packet: not a response")); return 0; } if (hp->opcode) { dprintf(("parse_packet: response not a QUERY")); return 0; } if (hp->rcode < NOERROR || hp->rcode > REFUSED) { dprintf(("parse_packet: bad reply code %d", (int)hp->rcode)); return 0; } if ((dt = find_transact(ntohs(hp->id))) == 0) { dprintf(("parse_packet: invalid reqid")); return 0; } dt->rcode = hp->rcode; /* Header is OK; reply code fixed */ qdcount = ntohs(hp->qdcount); ancount = ntohs(hp->ancount); nscount = ntohs(hp->nscount); arcount = ntohs(hp->arcount); dprintf(("parse_packet: rcode=%d qdcount=%d ancount=%d nscount=%d arcount=%d", hp->rcode, qdcount, ancount, nscount, arcount)); /* * check Question section. */ while (qdcount-- > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of question")); dt->rcode = -1; return dt; } if (strcasecmp(name, dt->domain)) { dprintf(("parse_packet: question name mismatch transaction")); dt->rcode = -2; return dt; } cp += nb; if (cp + 2 * INT16SZ > pkt + len) { dprintf(("parse_packet: unexpected end of question")); dt->rcode = -3; return dt; } GETSHORT(type, cp); GETSHORT(class, cp); if (class != C_IN) { dprintf(("parse_packet: question class mismatch transaction")); dt->rcode = -4; return dt; } if ((type == T_A && dt->type == IpAddress) || (type == T_PTR && dt->type == DomainName) || (type == T_MX && dt->type == MailExchanger)) continue; dprintf(("parse_packet: question type mismatch transaction")); dt->rcode = -5; return dt; } /* * parse Answer section. */ while (ancount-- > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of answer")); dt->rcode = -10; return dt; } dprintf(("parse_packet: answer name \"%s\"", name)); cp += nb; if (cp + 3 * INT16SZ + INT32SZ > pkt + len) { dprintf(("parse_packet: unexpected end of answer")); dt->rcode = -11; return dt; } GETSHORT(type, cp); GETSHORT(class, cp); GETLONG(ttl, cp); GETSHORT(rdlen, cp); if (cp + rdlen > pkt + len) { dprintf(("parse_packet: unexpected end of answer")); dt->rcode = -12; return dt; } if (class != C_IN) { dprintf(("parse_packet: answer class mismatch transaction")); dt->rcode = -13; return dt; } dprintf(("parse_packet: answer rdlen=%d", rdlen)); if (type == T_A && dt->type == IpAddress) { /* XXX IPv6 incompatible yet */ if (rdlen % sizeof(in_addr_t)) { dprintf(("parse_packet: unexpected rdlen in A RR")); dt->rcode = -14; return dt; } while (rdlen > 0) { dprintf(("parse_packet: A %d.%d.%d.%d (ttl=%d)", cp[0], cp[1], cp[2], cp[3], ttl)); if ((dd = domain_data_add(&dt->data, name, 0)) != 0) { if (!dd->ttl || !ttl || dd->ttl > ttl) dd->ttl = ttl; if (dd->addr == 0 || dd->addr == -1) dd->addr = *((in_addr_t *)cp); } cp += sizeof(in_addr_t); rdlen -= sizeof(in_addr_t); } continue; } if (type == T_MX && dt->type == MailExchanger) { if (rdlen < INT16SZ) { dprintf(("parse_packet: unexpected rdlen in MX RR")); dt->rcode = -15; return dt; } GETSHORT(pref, cp); rdlen -= INT16SZ; while (rdlen > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of answer")); dt->rcode = -16; return dt; } dprintf(("parse_packet: MX %d \"%s\" (ttl=%d)", pref, name, ttl)); if ((dd = domain_data_add(&dt->data, name, pref)) != 0) { if (!dd->ttl || !ttl || dd->ttl > ttl) dd->ttl = ttl; } cp += nb; rdlen -= nb; } continue; } if (type == T_PTR && dt->type == DomainName) { while (rdlen > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of answer")); dt->rcode = -17; return dt; } dprintf(("parse_packet: PTR \"%s\" (ttl=%d)", name, ttl)); if ((dd = domain_data_add(&dt->data, name, 0)) != 0) { if (!dd->ttl || !ttl || dd->ttl > ttl) dd->ttl = ttl; } cp += nb; rdlen -= nb; } continue; } if (type == T_CNAME) { dprintf(("parse_packet: CNAME \"%s\" removed", name)); domain_data_free(&dt->data, name); cp += rdlen; continue; } /* simply skip it */ dprintf(("parse_packet: answer name \"%s\" type %d", name, type)); cp += rdlen; } if (dt->type != MailExchanger) return dt; /* * skip Authority section. */ while (nscount-- > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of authority")); dt->rcode = -20; return dt; } cp += nb; if (cp + 3 * INT16SZ + INT32SZ > pkt + len) { dprintf(("parse_packet: unexpected end of authority")); dt->rcode = -21; return dt; } GETSHORT(type, cp); GETSHORT(class, cp); GETLONG(ttl, cp); GETSHORT(rdlen, cp); if (cp + rdlen > pkt + len) { dprintf(("parse_packet: unexpected end of authority")); dt->rcode = -22; return dt; } /* simply skip it */ dprintf(("parse_packet: authority name \"%s\" type %d", name, type)); cp += rdlen; } /* * parse Additional section. */ while (arcount-- > 0) { if ((nb = dn_expand(pkt, pkt + len, cp, name, sizeof(name))) < 0) { dprintf(("parse_packet: dn_expand: unexpected end of answer")); dt->rcode = -30; return dt; } dprintf(("parse_packet: additional name \"%s\"", name)); cp += nb; if (cp + 3 * INT16SZ + INT32SZ > pkt + len) { dprintf(("parse_packet: unexpected end of additional")); dt->rcode = -31; return dt; } GETSHORT(type, cp); GETSHORT(class, cp); GETLONG(ttl, cp); GETSHORT(rdlen, cp); if (cp + rdlen > pkt + len) { dprintf(("parse_packet: unexpected end of additional")); dt->rcode = -32; return dt; } if (class == C_IN && type == T_A) { /* XXX IPv6 incompatible yet */ if (rdlen % sizeof(in_addr_t)) { dprintf(("parse_packet: unexpected rdlen in A RR")); dt->rcode = -33; return dt; } while (rdlen > 0) { dprintf(("parse_packet: A %d.%d.%d.%d (ttl=%d)", cp[0], cp[1], cp[2], cp[3], ttl)); if ((dd = domain_data_find(&dt->data, name)) != 0) { if (!dd->ttl || !ttl || dd->ttl > ttl) dd->ttl = ttl; if (dd->addr == 0 || dd->addr == -1) dd->addr = *((in_addr_t *)cp); } cp += sizeof(in_addr_t); rdlen -= sizeof(in_addr_t); } continue; } /* simply skip it */ dprintf(("parse_packet: additional name \"%s\" type %d", name, type)); cp += rdlen; } return dt; } netdiag-1.2/trafshow-5.2.3/domain_resolver.h000066400000000000000000000041131323731111400206230ustar00rootroot00000000000000/* * Copyright (c) 2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _DOMAIN_RESOLVER_H_ #define _DOMAIN_RESOLVER_H_ /* * Domain Name Service support. */ #include #include #define NAMESERVER_TIMEOUT 10 /* awaiting reply in seconds */ #define NAMESERVER_RETRIES 3 /* max number of retries */ typedef struct domain_data_ent { u_int ttl; /* max seconds may be cached */ u_int pref; /* preference if any (for ex. in MX list) */ char *name; /* domain name */ in_addr_t addr; /* ip address */ struct domain_data_ent *next; } DOMAIN_DATA; struct session_ent; /* * [Re]initialize nameservers (probably using /etc/resolv.conf). * Public just for nameservers to be reconfigured by outside signals. */ int domain_resolver_init(); /* * Get IP address at the domain asynchronously. * If return -1 (an error) requester of this function will not be notified. */ int domain_resolve_addr(const char *domain, struct session_ent *sd, void (*notify)(struct session_ent *sd, DOMAIN_DATA *dd)); /* * Get MX list at the domain asynchronously. * If return -1 (an error) requester of this function will not be notified. */ int domain_resolve_mxlist(const char *domain, struct session_ent *sd, void (*notify)(struct session_ent *sd, DOMAIN_DATA *dd)); /* * Get domain name at the IP address asynchronously. * If return -1 (an error) requester of this function will not be notified. */ int domain_resolve_name(in_addr_t ipaddr, /* Network Byte Order */ struct session_ent *sd, void (*notify)(struct session_ent *sd, DOMAIN_DATA *dd)); /* * Domain data container utilities. */ DOMAIN_DATA *domain_data_add(DOMAIN_DATA **list, const char *name, int pref); DOMAIN_DATA *domain_data_find(DOMAIN_DATA **list, const char *name); void domain_data_free(DOMAIN_DATA **list, const char *name); /* null to all */ #endif /* !_DOMAIN_RESOLVER_H_ */ netdiag-1.2/trafshow-5.2.3/ethertype.h000066400000000000000000000073471323731111400174600ustar00rootroot00000000000000/* * Copyright (c) 1993, 1994, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.20 2003/07/01 19:10:26 guy Exp $ (LBL) */ /* * Ethernet types. * * We wrap the declarations with #ifdef, so that if a file includes * , which may declare some of these, we don't * get a bunch of complaints from the C compiler about redefinitions * of these values. * * We declare all of them here so that no file has to include * if all it needs are ETHERTYPE_ values. */ #ifndef ETHERTYPE_PUP #define ETHERTYPE_PUP 0x0200 /* PUP protocol */ #endif #ifndef ETHERTYPE_IP #define ETHERTYPE_IP 0x0800 /* IP protocol */ #endif #ifndef ETHERTYPE_ARP #define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ #endif #ifndef ETHERTYPE_REVARP #define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ #endif #ifndef ETHERTYPE_NS #define ETHERTYPE_NS 0x0600 #endif #ifndef ETHERTYPE_SPRITE #define ETHERTYPE_SPRITE 0x0500 #endif #ifndef ETHERTYPE_TRAIL #define ETHERTYPE_TRAIL 0x1000 #endif #ifndef ETHERTYPE_CDP #define ETHERTYPE_CDP 0x2000 /* Cisco Discovery Protocol */ #endif #ifndef ETHERTYPE_MOPDL #define ETHERTYPE_MOPDL 0x6001 #endif #ifndef ETHERTYPE_MOPRC #define ETHERTYPE_MOPRC 0x6002 #endif #ifndef ETHERTYPE_DN #define ETHERTYPE_DN 0x6003 #endif #ifndef ETHERTYPE_LAT #define ETHERTYPE_LAT 0x6004 #endif #ifndef ETHERTYPE_SCA #define ETHERTYPE_SCA 0x6007 #endif #ifndef ETHERTYPE_LANBRIDGE #define ETHERTYPE_LANBRIDGE 0x8038 #endif #ifndef ETHERTYPE_DECDNS #define ETHERTYPE_DECDNS 0x803c #endif #ifndef ETHERTYPE_DECDTS #define ETHERTYPE_DECDTS 0x803e #endif #ifndef ETHERTYPE_VEXP #define ETHERTYPE_VEXP 0x805b #endif #ifndef ETHERTYPE_VPROD #define ETHERTYPE_VPROD 0x805c #endif #ifndef ETHERTYPE_ATALK #define ETHERTYPE_ATALK 0x809b #endif #ifndef ETHERTYPE_AARP #define ETHERTYPE_AARP 0x80f3 #endif #ifndef ETHERTYPE_8021Q #define ETHERTYPE_8021Q 0x8100 #endif #ifndef ETHERTYPE_IPX #define ETHERTYPE_IPX 0x8137 #endif #ifndef ETHERTYPE_IPV6 #define ETHERTYPE_IPV6 0x86dd #endif #ifndef ETHERTYPE_PPP #define ETHERTYPE_PPP 0x880b #endif #ifndef ETHERTYPE_MPLS #define ETHERTYPE_MPLS 0x8847 #endif #ifndef ETHERTYPE_MPLS_MULTI #define ETHERTYPE_MPLS_MULTI 0x8848 #endif #ifndef ETHERTYPE_PPPOED #define ETHERTYPE_PPPOED 0x8863 #endif #ifndef ETHERTYPE_PPPOES #define ETHERTYPE_PPPOES 0x8864 #endif #ifndef ETHERTYPE_LOOPBACK #define ETHERTYPE_LOOPBACK 0x9000 #endif #ifndef ETHERTYPE_VMAN #define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */ #endif #ifndef ETHERTYPE_ISO #define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */ #endif netdiag-1.2/trafshow-5.2.3/events.c000066400000000000000000000132501323731111400167340ustar00rootroot00000000000000/* * Copyright (c) 1999-2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "events.h" #define dprintf(x) /* nope */ static EVENT *first_event = 0; /* first system event in table */ /* * Subtract 2 timeval structs: out = out - in. Out result always greater 0. */ void tv_sub(out, in) struct timeval *out; const struct timeval *in; { if (out->tv_sec > in->tv_sec) { out->tv_sec -= in->tv_sec; if (out->tv_usec >= in->tv_usec) { out->tv_usec -= in->tv_usec; } else { out->tv_sec--; out->tv_usec += 1000000L - in->tv_usec; } } else if (out->tv_sec == in->tv_sec) { out->tv_sec = 0L; out->tv_usec -= in->tv_usec; if (out->tv_usec < 1) out->tv_usec = 100L; /* not zero anyway */ } else { out->tv_sec = 0L; out->tv_usec = 100L; /* not zero anyway */ } } void tv_add(out, in) struct timeval *out; const struct timeval *in; { out->tv_sec += in->tv_sec; out->tv_usec += in->tv_usec; if (out->tv_usec >= 1000000L) { out->tv_sec++; out->tv_usec -= 1000000L; } } /* * Round timeval to seconds. */ u_long tv_round(in) const struct timeval *in; { u_long sec = in->tv_sec; if (in->tv_usec >= 500000L) sec++; return sec; } /* * Return time difference in milliseconds. */ u_long tv_diff(tvp1, tvp2) const struct timeval *tvp1, *tvp2; { struct timeval diff; if (!timerisset(tvp1) || !timerisset(tvp2)) return 0; if (timercmp(tvp1, tvp2, >)) { diff = *tvp1; tv_sub(&diff, tvp2); } else { diff = *tvp2; tv_sub(&diff, tvp1); } return (diff.tv_sec * 1000 + diff.tv_usec / 1000); } /* * Shift the time to be sharp at (12am + N * period), local time. */ void tv_sharp(tvp, period) struct timeval *tvp; int period; { time_t defect; struct tm *tm; if (!tvp) return; tm = localtime((time_t *)&tvp->tv_sec); defect = tm->tm_sec + 60 * tm->tm_min + 3600 * tm->tm_hour; defect %= period; period -= defect; if (period < 1) period = 1; tvp->tv_sec += period; tvp->tv_usec = (long)random() % 1000000L; } /* * Execute pending event and schedule the next nearest. */ int select_event(tvp) struct timeval *tvp; { EVENT *ep, *next_event; struct timeval now, gap, earliest; gettimeofday(&now, 0); gap.tv_sec = 0; gap.tv_usec = 1000L; /* 0.001sec grip */ tv_add(&gap, &now); again: next_event = 0; timerclear(&earliest); for (ep = first_event; ep; ep = ep->next) { /* skip over the empty slots */ if (!ep->func) continue; if (timercmp(&gap, &ep->tv, >)) { void (*func)() = ep->func; ep->func = 0; /* free event slot before */ dprintf(("-call_event(%p/%p)", func, ep->arg)); (*func)(ep->arg); /* call event function */ goto again; } else if (!timerisset(&earliest) || timercmp(&ep->tv, &earliest, <)) { earliest = ep->tv; next_event = ep; } } if (!next_event) { /* no more awaiting events */ dprintf(("select_event: no timeout")); return 1; /* timeout undefined */ } if (tvp) { tv_sub(&earliest, &now); *tvp = earliest; dprintf(("=wait_event(%p/%p): timeout=%u.%03d", next_event->func, next_event->arg, (unsigned)tvp->tv_sec, (int)(tvp->tv_usec / 1000))); } return 0; /* timeout defined */ } /* * Add the new system event to be executed at the given time. */ int add_event(tvp, func, arg) struct timeval *tvp; void (*func)(void *); void *arg; { EVENT *ep, *prev = 0, *next = 0; struct timeval now, gap; if (!tvp) { gettimeofday(&now, 0); gap.tv_sec = 0; gap.tv_usec = 250000L; /* 0.25sec mean a bit later */ tv_add(&gap, &now); tvp = ⪆ } /* * The same event in queue may cause a looping! Prevent it. */ for (ep = first_event; ep; ep = ep->next) { if (ep->func == func && ep->arg == arg) { ep->tv = *tvp; dprintf(("=add_event(%p/%p): modify time", func, arg)); return 0; } } /* * Search for first empty or last event slot. */ for (ep = first_event; ep; ep = ep->next) { if (!ep->func) { next = ep->next; break; } prev = ep; } if (!ep && (ep = (EVENT *)malloc(sizeof(EVENT))) == 0) return -1; memset(ep, 0, sizeof(EVENT)); ep->tv = *tvp; ep->func = func; ep->arg = arg; if (next) ep->next = next; else if (prev) prev->next = ep; if (!first_event) first_event = ep; #ifdef notdef { char at_time[50]; strftime(at_time, sizeof(at_time), "%T", localtime((time_t *)&ep->tv.tv_sec)); dprintf(("+add_event(%p/%p): schedule=%s.%03d", func, arg, at_time, (int)(tvp->tv_usec / 1000))); } #endif return 0; } /* * Remove system event from queue if any. */ int remove_event(func, arg) void (*func)(void *); void *arg; { int found = 0; EVENT *ep; for (ep = first_event; ep; ep = ep->next) { if ((!func || ep->func == func) && ep->arg == arg) { ep->func = 0; found++; } } return found; } /* * Modify existing system event in queue for the new function argument. */ int change_event(func, arg, new_arg) void (*func)(void *); void *arg, *new_arg; { int found = 0; EVENT *ep; for (ep = first_event; ep; ep = ep->next) { if ((!func || ep->func == func) && ep->arg == arg) { ep->arg = new_arg; found++; } } return found; } EVENT * find_event(func, arg) void (*func)(void *); void *arg; { EVENT *ep; for (ep = first_event; ep; ep = ep->next) { if (ep->func == func && ep->arg == arg) return ep; } return 0; } void free_events() { EVENT *ep, *next; ep = first_event; while (ep) { next = ep->next; free(ep); ep = next; } first_event = 0; } netdiag-1.2/trafshow-5.2.3/events.h000066400000000000000000000040461323731111400167440ustar00rootroot00000000000000/* * Copyright (c) 2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _EVENTS_H_ #define _EVENTS_H_ #include #include /* * Event scheduler. */ typedef struct event_ent { struct timeval tv; /* system time in [micro]seconds from UTC */ void (*func)(void *); /* function to call at the time */ void *arg; /* function argument pointer */ struct event_ent *next; } EVENT; /* * Subtract or add two timeval structs: * out = out - in * out = out + in * result always greater 0. */ void tv_sub(struct timeval *out, const struct timeval *in); void tv_add(struct timeval *out, const struct timeval *in); /* * Round timeval to seconds. */ u_long tv_round(const struct timeval *tvp); /* * Return difference of time in milliseconds. */ u_long tv_diff(const struct timeval *tvp1, const struct timeval *tvp2); /* * Shift the time to be sharp at (12am + N * period), local time. */ void tv_sharp(struct timeval *tvp, int period); /* * Execute pending event and schedule the next nearest. * Return 0 if timeval was modified. */ int select_event(struct timeval *tvp); /* * Add the new system event (or modify) to be executed at the given time. * Return 0 on success, -1 for error. */ int add_event(struct timeval *tvp, void (*func)(void *), void *arg); /* * Remove system event from queue if any. * Null func pointer may be used as wildcard ANY. * Return number of removed events. */ int remove_event(void (*func)(void *), void *arg); /* * Modify existing system event in queue for the new function argument. * Null func pointer may be used as wildcard ANY. * Return number of removed events. */ int change_event(void (*func)(void *), void *arg, void *new_arg); EVENT *find_event(void (*func)(void *), void *arg); /* * Clear/free all system events. */ void free_events(); #endif /* _EVENTS_H_ */ netdiag-1.2/trafshow-5.2.3/getkey.c000066400000000000000000000356541323731111400167340ustar00rootroot00000000000000/* * Copyright (c) 1998,2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #include #include #include "getkey.h" #include "screen.h" #include "session.h" #include "trafshow.h" #include "selector.h" #include "show_if.h" #include "show_stat.h" #include "show_dump.h" #include "events.h" #include "netstat.h" #include "help_page.h" static void read_key(SESSION *sd, const unsigned char *data, int len); static int scan_key(const unsigned char *buf, int len); static void parse_key(int key, PCAP_HANDLER *ph); static void init_edit_string(const char *prompter, const char *charset, int size); static int edit_string(int ch); /* edit string stuff */ static const char *numbers = "1234567890"; static const char *spaces = " ,.;@/\\"; static char prompt_buf[MAX_PARAM_LEN], cut_buf[MAX_PARAM_LEN]; static const char *char_set; static int buf_size, cur, nb, win, scr, bartop, barlen, touch, show_win; void getkey_init(ph) PCAP_HANDLER *ph; { SESSION *sd; if ((sd = session_open(0, 0, PlainFile)) == 0) { perror("session_open 0"); /* should not happen */ exit(1); } session_setcallback(sd, 0, 0, read_key); session_setcookie(sd, ph); prompt_mode = 0; } static void read_key(sd, data, len) SESSION *sd; const unsigned char *data; int len; { /* sanity check */ if (sd && data && len > 0) { int key = scan_key(data, len); if (key != -1) parse_key(key, (PCAP_HANDLER *)session_cookie(sd)); } } static SELECTOR * get_selector(ph_list) PCAP_HANDLER *ph_list; { /* return current selector */ switch (show_mode) { case Interfaces: return show_if_selector(); case NetStat: return show_stat_selector(pcap_get_selected(ph_list)); case FlowDump: /* nope */ break; case HelpPage: return help_page_selector(); } return 0; } static void parse_key(key, ph_list) int key; PCAP_HANDLER *ph_list; { int ch = key; PCAP_HANDLER *ph = 0; SELECTOR *sp = 0; struct timeval now; if (prompt_mode) { const char *txt = 0; int redraw = 1; if ((ch = edit_string(ch)) == 0) /* still edit */ return; if (ch > 0) { switch (prompt_mode) { case 'r': /* end of getting refresh time */ case 'R': ch = atoi(prompt_buf); if (ch > 0 && ch != refresh_time) { if (ch < purge_time) refresh_time = ch; else txt = "Refresh Time must be less than Purge Time"; } break; case 'p': /* end of getting purge time */ case 'P': ch = atoi(prompt_buf); if (ch > 0 && ch != purge_time) { if (ch > refresh_time) { purge_time = ch; add_event(0, pcap_purge, ph_list); redraw = 0; } else txt = "Purge Time must be bigger than Refresh Time"; } break; case 'f': /* end of getting filter expression */ case 'F': if (!expression || strcmp(prompt_buf, expression)) { if (expression) free(expression); expression = strdup(prompt_buf); if ((txt = pcap_setexpr(ph_list, expression)) == 0) { if (prompt_mode == 'F') { add_event(0, pcap_clear, ph_list); redraw = 0; } } } break; case '/': /* end of getting search string */ if (prompt_buf[0] == '\0') { if (search) { free(search); search = 0; txt = "Search mode turned Off"; } } else if (!search || strcmp(prompt_buf, search)) { if (search) free(search); search = strdup(prompt_buf); } break; case 'a': /* end of getting aggregation masklen */ case 'A': if (prompt_buf[0]) { ch = atoi(prompt_buf); if (ch < 0 || ch > ADDRBITLEN) { txt = "Wrong netmask length"; break; } } else ch = -1; if (show_mode == NetStat && (ph = pcap_get_selected(ph_list)) != 0) { if (ph->masklen != ch) { ph->masklen = ch; if (prompt_mode == 'A') netstat_purge(ph, 0); } } else { aggregate = ch; for (ph = ph_list; ph; ph = ph->next) { if (ph->masklen != aggregate) { ph->masklen = aggregate; if (prompt_mode == 'A') netstat_purge(ph, 0); } } } break; } } prompt_mode = 0; if (redraw) add_event(0, pcap_show, ph_list); if (txt) screen_status(txt); else screen_update(); return; } /* try global operation keys */ switch (ch) { case K_ESC: /* get back show mode */ case 'q': case 'Q': switch (show_mode) { case Interfaces: exit(0); case NetStat: if ((ph = pcap_get_selected(ph_list)) != 0 && ph->top) pcaph_close(ph); else show_mode = Interfaces; pcap_show(ph_list); return; case FlowDump: show_dump_close(); show_mode = NetStat; pcap_show(ph_list); return; case HelpPage: show_mode = help_page_mode(); pcap_show(ph_list); return; } break; case K_CTRL('L'): /* refresh screen */ clear(); refresh(); pcap_show(ph_list); return; case 'h': /* help page if any */ case 'H': case '?': case K_F1: if (help_page_list(show_mode)) { show_mode = HelpPage; pcap_show(ph_list); return; } break; case 'r': /* start to get refresh time */ case 'R': if (show_mode != FlowDump) { prompt_mode = ch; snprintf(prompt_buf, sizeof(prompt_buf), "%d", refresh_time); init_edit_string("Refresh seconds: ", numbers, 5); selector_withdraw(get_selector(ph_list)); screen_update(); return; } break; case 'p': /* start to get purge time */ case 'P': if (show_mode != FlowDump) { prompt_mode = ch; snprintf(prompt_buf, sizeof(prompt_buf), "%d", purge_time); init_edit_string("Purge seconds: ", numbers, 5); selector_withdraw(get_selector(ph_list)); screen_update(); return; } break; case 'f': /* start to get filter expression */ case 'F': if (show_mode != FlowDump) { prompt_mode = ch; prompt_buf[0] = '\0'; if (expression) { (void)strncpy(prompt_buf, expression, sizeof(prompt_buf)); prompt_buf[sizeof(prompt_buf)-1] = '\0'; } init_edit_string("Filter expression: ", 0, sizeof(prompt_buf)); selector_withdraw(get_selector(ph_list)); screen_update(); return; } break; case '/': /* start to get search string */ if (show_mode != FlowDump) { prompt_mode = ch; prompt_buf[0] = '\0'; if (search) { (void)strncpy(prompt_buf, search, sizeof(prompt_buf)); prompt_buf[sizeof(prompt_buf)-1] = '\0'; } init_edit_string("Search string: ", 0, sizeof(prompt_buf)); selector_withdraw(get_selector(ph_list)); screen_update(); return; } break; case K_CTRL('_'): /* turn off search mode */ if (show_mode != FlowDump) { if (search) { free(search); search = 0; screen_status("Search mode turned Off"); } return; } break; case 'a': /* start to get aggregation masklen */ case 'A': if (show_mode != FlowDump) { char buf[100]; prompt_mode = ch; prompt_buf[0] = '\0'; if (show_mode == NetStat && (ph = pcap_get_selected(ph_list)) != 0) { if (ph->masklen >= 0) snprintf(prompt_buf, sizeof(prompt_buf), "%d", ph->masklen); snprintf(buf, sizeof(buf), "%s aggregation netmask length: ", ph->name); } else { if (aggregate >= 0) snprintf(prompt_buf, sizeof(prompt_buf), "%d", aggregate); (void)strcpy(buf, "Aggregation netmask length: "); } init_edit_string(buf, numbers, 5); selector_withdraw(get_selector(ph_list)); screen_update(); return; } break; case K_CTRL('R'): /* reset all netstat hash */ if (show_mode == Interfaces) { add_event(0, pcap_clear, ph_list); screen_status("Resetting all flows"); return; } break; case 'n': /* toggle numeric values to names conversion */ case 'N': if (show_mode != FlowDump) { nflag ^= 1; if (ch == 'N') { add_event(0, pcap_show, ph_list); } else { screen_status("Numeric values turned %s", nflag ? "On" : "Off"); } return; } break; } /* prevent screen refresh overhead */ gettimeofday(&now, 0); now.tv_sec += refresh_time; add_event(&now, pcap_show, ph_list); /* get current selector */ switch (show_mode) { case Interfaces: sp = show_if_selector(); break; case NetStat: if ((ph = pcap_get_selected(ph_list)) == 0) return; sp = show_stat_selector(ph); /* try special input for the show mode */ if (show_stat_input(ph, ch)) { selector_redraw(sp); return; } break; case FlowDump: /* special input only for the show mode */ show_dump_input(ch); return; case HelpPage: sp = help_page_selector(); break; } /* try special input for the selecting */ ch = selector_move(ch, sp); if (ch < 0) { selector_redraw(sp); return; } /* something selected */ switch (show_mode) { case Interfaces: if ((ph = pcap_set_selected(ph_list, ch)) == 0) return; /* should not happen */ /*selector_withdraw(sp);*/ show_mode = NetStat; pcap_show(ph_list); return; case NetStat: /*selector_withdraw(sp);*/ if (ph->masklen == -1) { if (show_dump_open(ph, show_stat_get(ph, ch)) == 0) show_mode = FlowDump; } else if (pcaph_create(ph, (struct netstat_header *)show_stat_get(ph, ch))) { pcap_show(ph_list); } return; case FlowDump: /* not reached; just to avoid compiler warning */ return; case HelpPage: key = help_page_key(ch); if (key != -1 && key != 0) { show_mode = help_page_mode(); /* get back show mode */ pcap_show(ph_list); parse_key(key, ph_list); } return; } } static int scan_key(buf, len) const unsigned char *buf; int len; { int i; if (buf[0] != ESCAPE) return buf[0]; if (len == 1) return K_ESC; i = 1; if (buf[i] == '[' || buf[i] == 'O') if (++i >= len) return -1; switch (buf[i]) { case '\0': /* xterm */ return K_HOME; case 'A': case 'i': return K_UP; case 'B': return K_DOWN; case 'D': return K_LEFT; case 'C': return K_RIGHT; case 'I': /* ansi PgUp */ case 'V': /* at386 PgUp */ case 'S': /* 97801 PgUp */ case 'v': /* emacs style */ return K_PAGEUP; case 'G': /* ansi PgDn */ case 'U': /* at386 PgDn */ case 'T': /* 97801 PgDn */ return K_PAGEDOWN; case 'H': /* at386 Home */ return K_HOME; case 'F': /* ansi End */ case 'Y': /* at386 End */ return K_END; case '5': /* vt200 PgUp */ return K_PAGEUP; case '6': /* vt200 PgUp */ return K_PAGEDOWN; case '1': /* vt200 PgUp */ if (++i >= len) return -1; switch(buf[i]) { /* xterm */ case '1': return K_F1; case '2': return K_F2; case '3': return K_F3; case '4': return K_F4; case '5': /* RS/6000 PgUp is 150g, PgDn is 154g */ if (++i >= len) return -1; if (buf[i] == '0') return K_PAGEUP; if (buf[i] == '4') return K_PAGEDOWN; } return K_HOME; case '4': /* vt200 PgUp */ return K_END; case '2': /* xterm */ case 'L': return K_INS; case 'M': return K_F1; case 'N': return K_F2; case 'O': return K_F3; case 'P': return K_F4; } return -1; } static void init_edit_string(prompter, charset, size) const char *prompter, *charset; int size; { int i; char_set = charset; touch = 0; show_win = 0; *cut_buf = '\0'; bartop = strlen(prompter); i = COLS - (bartop + 3); barlen = buf_size = size; if (barlen < 1 || barlen > i) { barlen = i; show_win = 1; } attrset(A_NORMAL); move(LINES-1, 0); clrtoeol(); addstr(prompter); nb = strlen(prompt_buf); if (nb >= buf_size) nb = buf_size - 1; prompt_buf[nb] = '\0'; cur = nb; win = cur / barlen; /* window number */ scr = cur % barlen; /* screen position */ if (show_win) mvprintw(LINES-1, COLS-2, "%-2d", win+1); attrset(A_STANDOUT); mvprintw(LINES-1, bartop, "%-*.*s", barlen, barlen, &prompt_buf[win * barlen]); screen_dock_cursor(LINES-1, bartop + scr); } static int edit_string(ch) int ch; { int i; switch (ch) { case K_ESC: case K_CR: case K_NL: prompt_buf[nb] = '\0'; attrset(A_NORMAL); move(LINES-1, 0); clrtoeol(); screen_dock_cursor(0, 0); return (ch == K_ESC ? -1 : 1); case K_PAGEUP: /* move to begin of window */ cur -= cur % barlen; break; case K_PAGEDOWN:/* move to end of window */ if (strlen(&prompt_buf[cur]) < barlen) cur = nb; else cur += barlen - cur % barlen - 1; break; case K_UP: /* skip to previous word */ case K_CTRL('P'): ch = 0; for (i = cur; i > 0; i--) { if (!ch) { if (strchr(spaces, prompt_buf[i-1])) ch++; } else if (!strchr(spaces, prompt_buf[i-1])) break; } cur = i; break; case K_DOWN: /* skip to next word */ case K_CTRL('N'): ch = 0; for (i = cur; i < nb; i++) { if (!ch) { if (strchr(spaces, prompt_buf[i])) ch++; } else if (!strchr(spaces, prompt_buf[i])) break; } cur = i; break; case K_HOME: /* move to begin of line */ case K_CTRL('A'): cur = 0; break; case K_END: /* move to end of line */ case K_CTRL('E'): cur = nb; break; case K_LEFT: /* move cursor left */ case K_CTRL('B'): if (cur > 0) cur--; break; case K_RIGHT: /* move cursor right */ case K_CTRL('F'): if (cur < nb) cur++; break; case K_BS: /* backspace */ if (nb && cur) { memmove(&prompt_buf[cur-1], &prompt_buf[cur], nb - cur); cur--; nb--; } break; case K_DEL: /* delete */ case K_CTRL('D'): if (nb && cur < nb) { memmove(&prompt_buf[cur], &prompt_buf[cur+1], nb - cur); nb--; } break; case K_CTRL('U'): /* erase entire line */ (void)strcpy(cut_buf, prompt_buf); nb = 0; cur = 0; break; case K_CTRL('W'): /* erase last word */ ch = 0; for (i = cur; i > 0; i--) { if (!ch) { if (strchr(spaces, prompt_buf[i-1])) ch++; } else if (!strchr(spaces, prompt_buf[i-1])) break; } if (cur > i) { memcpy(cut_buf, &prompt_buf[i], cur - i); cut_buf[cur - i] = '\0'; memmove(&prompt_buf[i], &prompt_buf[cur], cur - i); nb -= cur - i; cur = i; } break; case K_CTRL('K'): /* erase end of line */ if (prompt_buf[cur] != '\0') (void)strcpy(cut_buf, &prompt_buf[cur]); nb = cur; break; case K_TAB: /* insert cut_buf */ i = strlen(cut_buf); if (i && (buf_size - 1) - strlen(prompt_buf) >= i) { memmove(&prompt_buf[cur+i], &prompt_buf[cur], nb - cur); memmove(&prompt_buf[cur], cut_buf, i); nb += i; cur += i; } break; default: if (ch < 32 || ch > 126) return 0; /* skip garbage chars */ if (char_set && !strchr(char_set, ch)) { beep(); return 0; } if (!touch) { nb = 0; cur = 0; } if (nb >= buf_size - 1) { /* no more space available */ beep(); return 0; } if (nb > cur) memmove(&prompt_buf[cur+1], &prompt_buf[cur], nb - cur); prompt_buf[cur++] = ch; nb++; } touch = 1; prompt_buf[nb] = '\0'; win = cur / barlen; /* window number */ scr = cur % barlen; /* screen position */ attrset(A_STANDOUT); mvprintw(LINES-1, bartop, "%-*.*s", barlen, barlen, &prompt_buf[win * barlen]); if (show_win) { attrset(A_NORMAL); mvprintw(LINES-1, COLS-2, "%-2d", win+1); } screen_dock_cursor(LINES-1, bartop + scr); screen_update(); return 0; } netdiag-1.2/trafshow-5.2.3/getkey.h000066400000000000000000000022441323731111400167260ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _GETKEY_H_ #define _GETKEY_H_ #define MAX_PARAM_LEN 512 #define ESCAPE '\033' #define K_CTRL(c) ((c) & 0x1f) #define K_DEL 0x7f #define K_CR '\r' #define K_NL '\n' #define K_BS '\b' #define K_TAB '\t' /* arrow keys */ #define K_ARROW(c) ((c) & 0x0f00) #define K_ESC 0x0100 #define K_UP 0x0200 #define K_DOWN 0x0300 #define K_LEFT 0x0400 #define K_RIGHT 0x0500 #define K_PAGEUP 0x0600 #define K_PAGEDOWN 0x0700 #define K_HOME 0x0800 #define K_END 0x0900 #define K_INS 0x0a00 /* func keys */ #define K_FUNC(c) ((c) & 0xf000) #define K_F1 0x1000 #define K_F2 0x2000 #define K_F3 0x3000 #define K_F4 0x4000 #define K_F5 0x5000 #define K_F6 0x6000 #define K_F7 0x7000 #define K_F8 0x8000 #define K_F9 0x9000 #define K_F10 0xa000 #define K_F11 0xb000 #define K_F12 0xc000 struct pcap_handler; void getkey_init(struct pcap_handler *ph_list); #endif /* !_GETKEY_H_ */ netdiag-1.2/trafshow-5.2.3/hashtab.c000066400000000000000000000215571323731111400170530ustar00rootroot00000000000000/* -------------------------------------------------------------------- By Bob Jenkins, 1996. hashtab.c. Public Domain. This implements a hash table. * Keys are unique. Adding an item fails if the key is already there. * Keys and items are pointed at, not copied. If you change the value of the key after it is inserted then hfind will not be able to find it. * The hash table maintains a position that can be set and queried. * The table length doubles dynamically and never shrinks. The insert that causes table doubling may take a long time. * The table length splits when the table length equals the number of items Comparisons usually take 7 instructions. Computing a hash value takes 35+6n instructions for an n-byte key. hcreate - create a hash table hdestroy - destroy a hash table hcount - The number of items in the hash table hkey - key at the current position hkeyl - key length at the current position hstuff - stuff at the current position hfind - find an item in the table hadd - insert an item into the table hdel - delete an item from the table hstat - print statistics about the table hfirst - position at the first item in the table hnext - move the position to the next item in the table -------------------------------------------------------------------- */ #include #include #ifndef STANDARD #include "standard.h" #endif #ifndef LOOKUPA #include "lookupa.h" #endif #ifndef HASHTAB #include "hashtab.h" #endif #ifndef RECYCLE #include "recycle.h" #endif #ifdef DEBUG /* sanity check -- make sure ipos, apos, and count make sense */ static void hsanity(t) htab *t; { ub4 i, end, counter; hitem *h; /* test that apos makes sense */ end = (ub4)1<<(t->logsize); if (end < t->apos) fprintf(stderr, "hsanity: end %ld, apos %ld\n", end, t->apos); /* test that ipos is in bucket apos */ if (t->ipos) { for (h=t->table[t->apos]; h && h != t->ipos; h = h->next) ; if (h != t->ipos) fprintf(stderr, "hsanity: ipos not in apos, apos is %ld\n", t->apos); } /* test that t->count is the number of elements in the table */ counter=0; for (counter=0, i=0; itable[i]; h; h=h->next) ++counter; if (counter != t->count) fprintf(stderr, "hsanity: counter %ld, t->count %ld\n", counter, t->count); } #endif /* DEBUG */ /* * hgrow - Double the size of a hash table. * Allocate a new, 2x bigger array, * move everything from the old array to the new array, * then free the old array. */ static void hgrow( t) htab *t; /* table */ { register ub4 newsize = (ub4)1<<(++t->logsize); register ub4 newmask = newsize-1; register ub4 i; register hitem **oldtab = t->table; register hitem **newtab = (hitem **)malloc(newsize*sizeof(hitem *)); if (!newtab) return; /* make sure newtab is cleared */ for (i=0; itable = newtab; t->mask = newmask; /* Walk through old table putting entries in new table */ for (i=newsize>>1; i--;) { register hitem *this, *that, **newplace; for (this = oldtab[i]; this;) { that = this; this = this->next; newplace = &newtab[(that->hval & newmask)]; that->next = *newplace; *newplace = that; } } /* position the hash table on some existing item */ hfirst(t); /* free the old array */ free((char *)oldtab); } /* hcreate - create a hash table initially of size power(2,logsize) */ htab *hcreate(logsize) word logsize; /* log base 2 of the size of the hash table */ { ub4 i,len; htab *t = (htab *)malloc(sizeof(htab)); if (!t) return 0; len = ((ub4)1<table = (hitem **)malloc(sizeof(hitem *)*(ub4)len); if (!t->table) return 0; for (i=0; itable[i] = (hitem *)0; t->logsize = logsize; t->mask = len-1; t->count = 0; t->apos = (ub4)0; t->ipos = (hitem *)0; t->space = remkroot(sizeof(hitem)); if (!t->space) return 0; t->bcount = 0; return t; } /* hdestroy - destroy the hash table and free all its memory */ void hdestroy( t) htab *t; /* the table */ { refree(t->space); free((char *)t->table); free((char *)t); } /* hcount() is a macro, see hashtab.h */ /* hkey() is a macro, see hashtab.h */ /* hkeyl() is a macro, see hashtab.h */ /* hstuff() is a macro, see hashtab.h */ /* hfind - find an item with a given key in a hash table */ word hfind( t, key, keyl ) htab *t; /* table */ ub1 *key; /* key to find */ ub4 keyl; /* key length */ { hitem *h; ub4 x = lookup(key,keyl,0); ub4 y; for (h = t->table[y=(x&t->mask)]; h; h = h->next) { if ((x == h->hval) && (keyl == h->keyl) && !memcmp(key, h->key, keyl)) { t->apos = y; t->ipos = h; return TRUE; } } return FALSE; } /* * hadd - add an item to a hash table. * return FALSE if the key is already there, otherwise TRUE. */ word hadd( t, key, keyl, stuff) htab *t; /* table */ ub1 *key; /* key to add to hash table */ ub4 keyl; /* key length */ void *stuff; /* stuff to associate with this key */ { register hitem *h,**hp; register ub4 y, x = lookup(key,keyl,0); /* make sure the key is not already there */ for (h = t->table[(y=(x&t->mask))]; h; h = h->next) { if ((x == h->hval) && (keyl == h->keyl) && !memcmp(key, h->key, keyl)) { t->apos = y; t->ipos = h; return FALSE; } } /* find space for a new item */ h = (hitem *)renew(t->space); if (!h) return -1; /* make the hash table bigger if it is getting full */ if (++t->count > (ub4)1<<(t->logsize)) { hgrow(t); y = (x&t->mask); } /* add the new key to the table */ h->key = key; h->keyl = keyl; h->stuff = stuff; h->hval = x; hp = &t->table[y]; h->next = *hp; *hp = h; t->ipos = h; t->apos = y; #ifdef DEBUG hsanity(t); #endif /* DEBUG */ return TRUE; } /* hdel - delete the item at the current position */ word hdel(t) htab *t; /* the hash table */ { hitem *h; /* item being deleted */ hitem **ip; /* a counter */ /* check for item not existing */ if (!(h = t->ipos)) return FALSE; /* remove item from its list */ for (ip = &t->table[t->apos]; *ip != h; ip = &(*ip)->next) ; *ip = (*ip)->next; --(t->count); /* adjust position to something that exists */ if (!(t->ipos = h->next)) hnbucket(t); /* recycle the deleted hitem node */ redel(t->space, h); #ifdef DEBUG hsanity(t); #endif /* DEBUG */ return TRUE; } /* hfirst - position on the first element in the table */ word hfirst(t) htab *t; /* the hash table */ { t->apos = t->mask; (void)hnbucket(t); return (t->ipos != (hitem *)0); } /* hnext() is a macro, see hashtab.h */ /* * hnbucket - Move position to the first item in the next bucket. * Return TRUE if we did not wrap around to the beginning of the table */ word hnbucket(t) htab *t; { ub4 oldapos = t->apos; ub4 end = (ub4)1<<(t->logsize); ub4 i; /* see if the element can be found without wrapping around */ for (i=oldapos+1; itable[i&t->mask]) { t->apos = i; t->ipos = t->table[i]; return TRUE; } } /* must have to wrap around to find the last element */ for (i=0; i<=oldapos; ++i) { if (t->table[i]) { t->apos = i; t->ipos = t->table[i]; return FALSE; } } return FALSE; } void hstat(fp, t) FILE *fp; htab *t; { ub4 i,j; double total = 0.0; hitem *h; hitem *walk, *walk2, *stat = (hitem *)0; /* in stat, keyl will store length of list, hval the number of buckets */ for (i=0; i<=t->mask; ++i) { for (h=t->table[i], j=0; h; ++j, h=h->next) ; for (walk=stat; walk && (walk->keyl != j); walk=walk->next) ; if (walk) { ++(walk->hval); } else { walk = (hitem *)renew(t->space); if (!walk) { fprintf(fp, "renew: Can't allocate memory?\n"); return; } walk->keyl = j; walk->hval = 1; if (!stat || stat->keyl > j) {walk->next=stat; stat=walk;} else { for (walk2=stat; walk2->next && (walk2->next->keylnext) ; walk->next = walk2->next; walk2->next = walk; } } } /* figure out average list length for existing elements */ for (walk=stat; walk; walk=walk->next) { total+=(double)walk->hval*(double)walk->keyl*(double)walk->keyl; } if (t->count) total /= (double)t->count; else total = (double)0; /* print statistics */ fprintf(fp, "\n"); for (walk=stat; walk; walk=walk->next) { fprintf(fp, "items %ld: %ld buckets\n", walk->keyl, walk->hval); } fprintf(fp, "\nbuckets: %ld items: %ld existing: %g\n\n", ((ub4)1<logsize), t->count, total); /* clean up */ while (stat) { walk = stat->next; redel(t->space, stat); stat = walk; } } netdiag-1.2/trafshow-5.2.3/hashtab.h000066400000000000000000000142271323731111400170540ustar00rootroot00000000000000/* -------------------------------------------------------------------- By Bob Jenkins, 1996. hash.h. Public Domain. This implements a hash table. * Keys are unique. Adding an item fails if the key is already there. * Keys and items are pointed at, not copied. If you change the value of the key after it is inserted then hfind will not be able to find it. * The hash table maintains a position that can be set and queried. * The table length doubles dynamically and never shrinks. The insert that causes table doubling may take a long time. * The table length splits when the table length equals the number of items Comparisons usually take 7 instructions. Computing a hash value takes 35+6n instructions for an n-byte key. hcreate - create a hash table hdestroy - destroy a hash table hcount - The number of items in the hash table hkey - key at the current position hkeyl - key length at the current position hstuff - stuff at the current position hfind - find an item in the table hadd - insert an item into the table hdel - delete an item from the table hstat - print statistics about the table hfirst - position at the first item in the table hnext - move the position to the next item in the table -------------------------------------------------------------------- */ #ifndef STANDARD #include "standard.h" #endif #ifndef HASHTAB #define HASHTAB /* PRIVATE TYPES AND DEFINITIONS */ struct hitem { ub1 *key; /* key that is hashed */ ub4 keyl; /* length of key */ void *stuff; /* stuff stored in this hitem */ ub4 hval; /* hash value */ struct hitem *next; /* next hitem in list */ }; typedef struct hitem hitem; struct htab { struct hitem **table; /* hash table, array of size 2^logsize */ word logsize; /* log of size of table */ size_t mask; /* (hashval & mask) is position in table */ ub4 count; /* how many items in this hash table so far? */ ub4 apos; /* position in the array */ struct hitem *ipos; /* current item in the array */ struct reroot *space; /* space for the hitems */ ub4 bcount; /* # hitems useable in current block */ }; typedef struct htab htab; /* PUBLIC FUNCTIONS */ /* hcreate - create a hash table ARGUMENTS: logsize - 1<count) #define hkey(t) ((t)->ipos->key) #define hkeyl(t) ((t)->ipos->keyl) #define hstuff(t) ((t)->ipos->stuff) /* hfind - move the current position to a given key ARGUMENTS: t - the hash table key - the key to look for keyl - length of the key RETURNS: TRUE if the item exists, FALSE if it does not. If the item exists, moves the current position to that item. */ word hfind(htab *t, ub1 *key, ub4 keyl); /* hadd - add a new item to the hash table change the position to point at the item with the key ARGUMENTS: t - the hash table key - the key to look for keyl - length of the key stuff - other stuff to be stored in this item RETURNS: FALSE if the operation fails (because that key is already there). */ word hadd(htab *t, ub1 *key, ub4 keyl, void *stuff); /* hdel - delete the item at the current position change the position to the following item ARGUMENTS: t - the hash table RETURNS: FALSE if there is no current item (meaning the table is empty) NOTE: This frees the item, but not the key or stuff stored in the item. If you want these then deal with them first. For example: if (hfind(tab, key, keyl)) { free(hkey(tab)); free(hstuff(tab)); hdel(tab); } */ word hdel(htab *t); /* hfirst - move position to the first item in the table ARGUMENTS: t - the hash table RETURNS: FALSE if there is no current item (meaning the table is empty) NOTE: */ word hfirst(htab *t); /* hnext - move position to the next item in the table ARGUMENTS: t - the hash table RETURNS: FALSE if the position wraps around to the beginning of the table NOTE: To see every item in the table, do if (hfirst(t)) do { key = hkey(t); stuff = hstuff(t); } while (hnext(t)); */ /* word hnext(htab *t); */ #define hnext(t) \ ((!(t)->ipos) ? FALSE : \ ((t)->ipos=(t)->ipos->next) ? TRUE : hnbucket(t)) /* hnbucket - PRIVATE - move to first item in the next nonempty bucket ARGUMENTS: t - the hash table RETURNS: FALSE if the position wraps around to the beginning of the table NOTE: This is private to hashtab; do not use it externally. */ word hnbucket(htab *t); /* hstat - print statistics about the hash table ARGUMENTS: t - the hash table NOTE: items <0>: <#buckets with zero items> buckets items <1>: <#buckets with 1 item> buckets ... buckets: #buckets items: #items existing: x ( x is the average length of the list when you look for an item that exists. When the item does not exists, the average length is #items/#buckets. ) If you put n items into n buckets, expect 1/(n!)e buckets to have n items. That is, .3678 0, .3678 1, .1839 2, ... Also expect "existing" to be about 2. */ void hstat(FILE *fp, htab *t); #endif /* HASHTAB */ netdiag-1.2/trafshow-5.2.3/help_page.c000066400000000000000000000117361323731111400173630ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #include "trafshow.h" #include "help_page.h" #include "getkey.h" #include "screen.h" #include "selector.h" static ShowMode help_mode = HelpPage; struct help_page_entry { int key; const char *name; const char *descr; }; static struct help_page_entry Interfaces_help[] = { { 'q', " Esc", "Quit the program" }, { K_CR, " Enter", "Use Arrow-Keys to select Interface to show" }, { K_CTRL('L'), " Ctrl-L", "Refresh screen from scratch" }, { 'r', " R", "Set the screen refresh-period.." }, { 'p', " P", "Set the expired data purge-period.." }, { 'f', " F", "Set the filter expression (empty to reset).." }, { '/', " /", "To search & follow for string in the list.." }, { K_CTRL('_'), " Ctrl-/", "Turn off search & follow mode" }, { 'a', " A", "To aggregate/summarize flows totally.." }, { K_CTRL('R'), " Ctrl-R", "Reset all flow cache totally" }, { 'n', " N", "Toggle numeric values to names conversion" }, { 0,0,0 } }; static struct help_page_entry NetStat_help[] = { { 'q', " Esc", "Return to previous page" }, { K_CR, " Enter", "Use Arrow-Keys to select Flow for detail" }, { K_LEFT, " Left", "Rotate show mode left" }, { K_RIGHT, " Right", "Rotate show mode right" }, { K_TAB, " Tab", "Move cursor to backflow if any" }, { K_CTRL('L'), " Ctrl-L", "Refresh screen from scratch" }, { 'r', " R", "Set the screen refresh-period.." }, { 'p', " P", "Set the expired data purge-period.." }, { 'f', " F", "Set the filter expression (empty to reset).." }, { '/', " /", "To search & follow for string in the list.." }, { K_CTRL('_'), " Ctrl-/", "Turn off search & follow mode" }, { 'a', " A", "To aggregate/summarize flows in the list.." }, { K_CTRL('R'), " Ctrl-R", "Reset flow cache on the Interface" }, { 'n', " N", "Toggle numeric values to names conversion" }, { 0,0,0 } }; ShowMode help_page_mode() { return help_mode; } static void scale_size(name, descr) int *name, *descr; { *name = line_factor * (double)HELP_PAGE_NAME; *descr = line_factor * (double)HELP_PAGE_DESCR; } static int help_page_header(dst, size, unused) char *dst; int size; const void *unused; { int name_sz, desc_sz; /* sanity check */ if (!dst || size < 1 || unused) return 0; scale_size(&name_sz, &desc_sz); snprintf(dst, size, "%-*.*s %-*.*s", name_sz, name_sz, " KeyPress", desc_sz, desc_sz, "Action"); return 0; } static int help_page_line(dst, size, hp, idx) char *dst; int size; const struct help_page_entry *hp; int idx; { int name_sz, desc_sz; /* sanity check */ if (!dst || size < 1 || !hp) return 0; scale_size(&name_sz, &desc_sz); snprintf(dst, size, "%-*.*s %-*.*s", name_sz, name_sz, hp[idx].name, desc_sz, desc_sz, hp[idx].descr); return 0; } static int help_page_footer(dst, size, topic) char *dst; int size; const char *topic; { int i, len; SELECTOR *sp = help_page_selector(); /* sanity check */ if (!dst || size < 1 || !topic || !sp) return 0; i = 0; len = strlen(topic); if (len > 0 && len < sp->COLS) { len = sp->COLS/2 - len/2; while (i < len) dst[i++] = ' '; } (void)strncpy(dst + i, topic, size - i); dst[size-1] = '\0'; return 0; } SELECTOR * help_page_selector() { static SELECTOR *sp = 0; if (!sp && (sp = selector_init()) != 0) { int name_sz, desc_sz; scale_size(&name_sz, &desc_sz); sp->window_color = A_REVERSE; sp->cursor_color = A_NORMAL; sp->COLS = MIN(name_sz + desc_sz, COLS); sp->LINES = MIN(sp->COLS/3, LINES); sp->COL = COLS/2 - sp->COLS/2; sp->LINE = LINES/2 - sp->LINES/2; sp->get_header = help_page_header; sp->get_line = help_page_line; sp->get_footer = help_page_footer; } return sp; } int help_page_key(idx) int idx; { int i; SELECTOR *sp; const struct help_page_entry *hp; if ((sp = help_page_selector()) == 0) return -1; hp = (const struct help_page_entry *)sp->list; for (i = 0; hp; hp++) { if (i++ == idx) break; } return (hp ? hp->key : -1); } SELECTOR * help_page_list(mode) ShowMode mode; { struct help_page_entry *hp = 0; char *topic = 0; SELECTOR *sp; switch (mode) { case Interfaces: hp = Interfaces_help; topic = "Interface selection Help"; break; case NetStat: hp = NetStat_help; topic = "Network Flow selection Help"; break; case FlowDump: /* no help available */ case HelpPage: /* help on help?? */ return 0; } if ((sp = help_page_selector()) != 0) { help_mode = mode; sp->header = 0; /* unused */ sp->footer = topic; sp->list = hp; sp->items = 0; for (; hp && hp->name; hp++) sp->items++; } return sp; } netdiag-1.2/trafshow-5.2.3/help_page.h000066400000000000000000000010771323731111400173650ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _HELP_PAGE_H_ #define _HELP_PAGE_H_ #define HELP_PAGE_NAME 10 #define HELP_PAGE_DESCR 50 struct selector; struct selector *help_page_selector(); struct selector *help_page_list(ShowMode mode); ShowMode help_page_mode(); int help_page_key(int idx); #endif /* !_HELP_PAGE_H_ */ netdiag-1.2/trafshow-5.2.3/install-sh000077500000000000000000000127211323731111400172720ustar00rootroot00000000000000#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in 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. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 netdiag-1.2/trafshow-5.2.3/lookupa.c000066400000000000000000000204461323731111400171070ustar00rootroot00000000000000/* -------------------------------------------------------------------- lookupa.c, by Bob Jenkins, December 1996. Same as lookup2.c Use this code however you wish. Public Domain. No warranty. Source is http://burtleburtle.net/bob/c/lookupa.c -------------------------------------------------------------------- */ #ifndef STANDARD #include "standard.h" #endif #ifndef LOOKUPA #include "lookupa.h" #endif /* -------------------------------------------------------------------- mix -- mix 3 32-bit values reversibly. For every delta with one or two bit set, and the deltas of all three high bits or all three low bits, whether the original value of a,b,c is almost all zero or is uniformly distributed, * If mix() is run forward or backward, at least 32 bits in a,b,c have at least 1/4 probability of changing. * If mix() is run forward, every bit of c will change between 1/3 and 2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.) mix() was built out of 36 single-cycle latency instructions in a structure that could supported 2x parallelism, like so: a -= b; a -= c; x = (c>>13); b -= c; a ^= x; b -= a; x = (a<<8); c -= a; b ^= x; c -= b; x = (b>>13); ... Unfortunately, superscalar Pentiums and Sparcs can't take advantage of that parallelism. They've also turned some of those single-cycle latency instructions into multi-cycle latency instructions. Still, this is the fastest good hash I could find. There were about 2^^68 to choose from. I only looked at a billion or so. -------------------------------------------------------------------- */ #define mix(a,b,c) \ { \ a -= b; a -= c; a ^= (c>>13); \ b -= c; b -= a; b ^= (a<<8); \ c -= a; c -= b; c ^= (b>>13); \ a -= b; a -= c; a ^= (c>>12); \ b -= c; b -= a; b ^= (a<<16); \ c -= a; c -= b; c ^= (b>>5); \ a -= b; a -= c; a ^= (c>>3); \ b -= c; b -= a; b ^= (a<<10); \ c -= a; c -= b; c ^= (b>>15); \ } /* -------------------------------------------------------------------- lookup() -- hash a variable-length key into a 32-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes level : can be any 4-byte value Returns a 32-bit value. Every bit of the key affects every bit of the return value. Every 1-bit and 2-bit delta achieves avalanche. About 6len+35 instructions. The best hash table sizes are powers of 2. There is no need to do mod a prime (mod is sooo slow!). If you need less than 32 bits, use a bitmask. For example, if you need only 10 bits, do h = (h & hashmask(10)); In which case, the hash table should have hashsize(10) elements. If you are hashing n strings (ub1 **)k, do it like this: for (i=0, h=0; i= 12) { a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24)); b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24)); c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24)); mix(a,b,c); k += 12; len -= 12; } /*------------------------------------- handle the last 11 bytes */ c += length; switch(len) /* all the case statements fall through */ { case 11: c+=((ub4)k[10]<<24); case 10: c+=((ub4)k[9]<<16); case 9 : c+=((ub4)k[8]<<8); /* the first byte of c is reserved for the length */ case 8 : b+=((ub4)k[7]<<24); case 7 : b+=((ub4)k[6]<<16); case 6 : b+=((ub4)k[5]<<8); case 5 : b+=k[4]; case 4 : a+=((ub4)k[3]<<24); case 3 : a+=((ub4)k[2]<<16); case 2 : a+=((ub4)k[1]<<8); case 1 : a+=k[0]; /* case 0: nothing left to add */ } mix(a,b,c); /*-------------------------------------------- report the result */ return c; } /* -------------------------------------------------------------------- mixc -- mixc 8 4-bit values as quickly and thoroughly as possible. Repeating mix() three times achieves avalanche. Repeating mix() four times eliminates all funnels and all characteristics stronger than 2^{-11}. -------------------------------------------------------------------- */ #define mixc(a,b,c,d,e,f,g,h) \ { \ a^=b<<11; d+=a; b+=c; \ b^=c>>2; e+=b; c+=d; \ c^=d<<8; f+=c; d+=e; \ d^=e>>16; g+=d; e+=f; \ e^=f<<10; h+=e; f+=g; \ f^=g>>4; a+=f; g+=h; \ g^=h<<8; b+=g; h+=a; \ h^=a>>9; c+=h; a+=b; \ } /* -------------------------------------------------------------------- checksum() -- hash a variable-length key into a 256-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes state : an array of CHECKSTATE 4-byte values (256 bits) The state is the checksum. Every bit of the key affects every bit of the state. There are no funnels. About 112+6.875len instructions. If you are hashing n strings (ub1 **)k, do it like this: for (i=0; i<8; ++i) state[i] = 0x9e3779b9; for (i=0, h=0; i= 32) { a += (k[0] +(k[1]<<8) +(k[2]<<16) +(k[3]<<24)); b += (k[4] +(k[5]<<8) +(k[6]<<16) +(k[7]<<24)); c += (k[8] +(k[9]<<8) +(k[10]<<16)+(k[11]<<24)); d += (k[12]+(k[13]<<8)+(k[14]<<16)+(k[15]<<24)); e += (k[16]+(k[17]<<8)+(k[18]<<16)+(k[19]<<24)); f += (k[20]+(k[21]<<8)+(k[22]<<16)+(k[23]<<24)); g += (k[24]+(k[25]<<8)+(k[26]<<16)+(k[27]<<24)); h += (k[28]+(k[29]<<8)+(k[30]<<16)+(k[31]<<24)); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); k += 32; len -= 32; } /*------------------------------------- handle the last 31 bytes */ h += length; switch(len) { case 31: h+=(k[30]<<24); case 30: h+=(k[29]<<16); case 29: h+=(k[28]<<8); case 28: g+=(k[27]<<24); case 27: g+=(k[26]<<16); case 26: g+=(k[25]<<8); case 25: g+=k[24]; case 24: f+=(k[23]<<24); case 23: f+=(k[22]<<16); case 22: f+=(k[21]<<8); case 21: f+=k[20]; case 20: e+=(k[19]<<24); case 19: e+=(k[18]<<16); case 18: e+=(k[17]<<8); case 17: e+=k[16]; case 16: d+=(k[15]<<24); case 15: d+=(k[14]<<16); case 14: d+=(k[13]<<8); case 13: d+=k[12]; case 12: c+=(k[11]<<24); case 11: c+=(k[10]<<16); case 10: c+=(k[9]<<8); case 9 : c+=k[8]; case 8 : b+=(k[7]<<24); case 7 : b+=(k[6]<<16); case 6 : b+=(k[5]<<8); case 5 : b+=k[4]; case 4 : a+=(k[3]<<24); case 3 : a+=(k[2]<<16); case 2 : a+=(k[1]<<8); case 1 : a+=k[0]; } mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); /*-------------------------------------------- report the result */ state[0]=a; state[1]=b; state[2]=c; state[3]=d; state[4]=e; state[5]=f; state[6]=g; state[7]=h; } netdiag-1.2/trafshow-5.2.3/lookupa.h000066400000000000000000000012441323731111400171070ustar00rootroot00000000000000/* ------------------------------------------------------------------------------ By Bob Jenkins, September 1996. lookupa.h, a hash function for table lookup, same function as lookup.c. Use this code in any way you wish. Public Domain. It has no warranty. Source is http://burtleburtle.net/bob/c/lookupa.h ------------------------------------------------------------------------------ */ #ifndef STANDARD #include "standard.h" #endif #ifndef LOOKUPA #define LOOKUPA #define CHECKSTATE 8 #define hashsize(n) ((ub4)1<<(n)) #define hashmask(n) (hashsize(n)-1) ub4 lookup(ub1 *k, ub4 length, ub4 level); void checksum(ub1 *k, ub4 length, ub4 *state); #endif /* LOOKUPA */ netdiag-1.2/trafshow-5.2.3/netstat.c000066400000000000000000000171441323731111400171200ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "netstat.h" #include "hashtab.h" #include "trafshow.h" #include "events.h" /* just for tv_diff() */ #include "colormask.h" #include "addrtoname.h" int netstat_count(ph) const PCAP_HANDLER *ph; { /* sanity check */ if (!ph || !ph->ns_hash) return 0; return hcount(ph->ns_hash); } static void maskit(bp, len, bits) u_int8_t *bp; int len, bits; { register u_int8_t mask; register int i, j; for (i = 0; i < len; i++) { mask = 0; for (j = 0; j < 8 && bits > 0; j++, bits--) { mask >>= 1; mask |= 0x80; } bp[i] &= mask; } } void netstat_aggregate(nh, bits) struct netstat_header *nh; int bits; { /* sanity check */ if (!nh || bits < 0) return; memset(&nh->en_hdr.src, 0, sizeof(nh->en_hdr.src)); memset(&nh->en_hdr.dst, 0, sizeof(nh->en_hdr.dst)); if (nh->in_hdr.ver) { struct ip_address *src = &nh->in_hdr.src; struct ip_address *dst = &nh->in_hdr.dst; maskit((u_int8_t *)&src->ipaddr, sizeof(src->ipaddr), bits); maskit((u_int8_t *)&dst->ipaddr, sizeof(dst->ipaddr), bits); /* guess server port */ if (src->ip_port && dst->ip_port) { u_int16_t sport = ntohs(src->ip_port); u_int16_t dport = ntohs(dst->ip_port); if (isservport(sport)) dst->ip_port = 0; else if (isservport(dport)) src->ip_port = 0; else if (sport < IPPORT_RESERVED) dst->ip_port = 0; else if (dport < IPPORT_RESERVED) src->ip_port = 0; else if (sport >= IPPORT_DYNAMIC) src->ip_port = 0; else if (dport >= IPPORT_DYNAMIC) dst->ip_port = 0; else if (sport > dport) src->ip_port = 0; else dst->ip_port = 0; } } } static int htab_insert(ht, ns) struct htab *ht; const NETSTAT *ns; { ub1 *key; ub4 keyl; int op; NETSTAT *dp; key = (ub1 *)&ns->ns_hdr; keyl = sizeof(ns->ns_hdr); if ((op = hadd(ht, key, keyl, 0)) < 0) return -1; if (op) { /* OK, new item inserted */ if ((dp = (NETSTAT *)malloc(sizeof(NETSTAT))) == 0) { hdel(ht); return -1; } memcpy(dp, ns, sizeof(NETSTAT)); dp->gain_pkt_cnt = ns->pkt_cnt; dp->gain_pkt_len = ns->pkt_len; dp->gain_data_len = ns->data_len; dp->attr = colormask(&dp->ns_hdr); hkey(ht) = (ub1 *)&dp->ns_hdr; hstuff(ht) = dp; return 1; } /* Failed because already in cache -- update it */ if ((dp = (NETSTAT *)hstuff(ht)) == 0) return 0; /* should not happen */ dp->pkt_cnt += ns->pkt_cnt; dp->pkt_len += ns->pkt_len; dp->data_len += ns->data_len; dp->gain_pkt_cnt += ns->pkt_cnt; dp->gain_pkt_len += ns->pkt_len; dp->gain_data_len += ns->data_len; if (ns->pkt_cnt_rate || ns->pkt_len_rate || ns->data_len_rate) { dp->mtime = ns->mtime; dp->pkt_cnt_rate = ns->pkt_cnt_rate; dp->pkt_len_rate = ns->pkt_len_rate; dp->data_len_rate = ns->data_len_rate; } else if ((op = tv_diff(&dp->mtime, &ns->mtime)) >= 1000) { dp->mtime = ns->mtime; dp->gain_pkt_cnt = dp->gain_pkt_cnt * 1000 / op; if (dp->gain_pkt_cnt) { dp->pkt_cnt_rate = dp->gain_pkt_cnt; dp->gain_pkt_cnt = 0; } dp->gain_pkt_len = dp->gain_pkt_len * 1000 / op; if (dp->gain_pkt_len) { dp->pkt_len_rate = dp->gain_pkt_len; dp->gain_pkt_len = 0; } dp->gain_data_len = dp->gain_data_len * 1000 / op; if (dp->gain_data_len) { dp->data_len_rate = dp->gain_data_len; dp->gain_data_len = 0; } } return 0; } int netstat_insert(ph, ns) PCAP_HANDLER *ph; const NETSTAT *ns; { int op; NETSTAT ns_buf; /* sanity check */ if (!ph || !ns) { errno = EINVAL; return -1; } if (!ph->ns_hash && (ph->ns_hash = hcreate(65536)) == 0) return -1; if (ph->masklen >= 0) { memcpy(&ns_buf, ns, sizeof(NETSTAT)); netstat_aggregate(&ns_buf.ns_hdr, ph->masklen); ns = &ns_buf; } if (ph->ns_mutex) pthread_mutex_lock(ph->ns_mutex); op = htab_insert(ph->ns_hash, ns); if (ph->ns_mutex) pthread_mutex_unlock(ph->ns_mutex); return op; } int netstat_find(ph, ns) PCAP_HANDLER *ph; NETSTAT *ns; /* IN/OUT */ { struct htab *ht; ub1 *key; ub4 keyl; NETSTAT *found; int ok = 0; /* sanity check */ if (!ph || !ns || netstat_count(ph) < 1) return 0; if (ph->ns_mutex) pthread_mutex_lock(ph->ns_mutex); ht = ph->ns_hash; key = (ub1 *)&ns->ns_hdr; keyl = sizeof(ns->ns_hdr); if (hfind(ht, key, keyl) && (found = hstuff(ht)) != 0) { ok = 1; *ns = *found; } if (ph->ns_mutex) pthread_mutex_unlock(ph->ns_mutex); return ok; } int netstat_purge(ph, at) PCAP_HANDLER *ph; const struct timeval *at; { struct htab *ht; int op, cnt = 0; NETSTAT *ns; /* sanity check */ if (!ph) { errno = EINVAL; return -1; } if (netstat_count(ph) < 1) return 0; if (ph->ns_mutex) pthread_mutex_lock(ph->ns_mutex); ht = ph->ns_hash; op = hfirst(ht); while (op && hcount(ht) > 0) { ns = hstuff(ht); if (!ns) { /* should not happen */ op = hdel(ht); } else if (!at || timercmp(&ns->mtime, at, <)) { free(ns); op = hdel(ht); cnt++; } else { op = hnext(ht); } } if (ph->ns_mutex) pthread_mutex_unlock(ph->ns_mutex); return cnt; } void netstat_free(ph) PCAP_HANDLER *ph; { struct htab *ht; /* sanity check */ if (!ph) return; netstat_purge(ph, 0); if (ph->ns_mutex) pthread_mutex_lock(ph->ns_mutex); ht = ph->ns_hash; ph->ns_hash = 0; if (ht) hdestroy(ht); if (ph->ns_mutex) pthread_mutex_unlock(ph->ns_mutex); } int netstat_match(p1, p2) register const NETSTAT *p1, *p2; { /* sanity check */ if (!p1 || !p2) return 0; return !memcmp(&p1->ns_hdr, &p2->ns_hdr, sizeof(struct netstat_header)); } int netstat_bidir(p1, p2) register const NETSTAT *p1, *p2; { /* sanity check */ if (!p1 || !p2) return 0; if (p1->ip_ver) { if (p1->ip_ver == p2->ip_ver && p1->ip_proto == p2->ip_proto && !memcmp(&p1->ip_src_addr, &p2->ip_dst_addr, sizeof(struct ip_address)) && !memcmp(&p2->ip_src_addr, &p1->ip_dst_addr, sizeof(struct ip_address))) return 1; } else if (!p2->ip_ver) { if (p1->eth_type == p2->eth_type && !memcmp(p1->eth_src_addr, p2->eth_dst_addr, ETHER_ADDR_LEN) && !memcmp(p2->eth_src_addr, p1->eth_dst_addr, ETHER_ADDR_LEN)) return 1; } return 0; } int netstat_fetch(list, ph) NETSTAT **list[]; PCAP_HANDLER *ph; { struct htab *ht; int op, cnt, i; NETSTAT *ns, **array; /* sanity check */ if (!list || !ph) { errno = EINVAL; return -1; } if ((cnt = netstat_count(ph)) < 1) { /* free previous */ if (*list) free(*list); *list = 0; return 0; } if ((array = (NETSTAT **)malloc(cnt * sizeof(NETSTAT *))) == 0) return -1; if (ph->ns_mutex) pthread_mutex_lock(ph->ns_mutex); ht = ph->ns_hash; /* reset total statistics */ ph->pkt_cnt = 0; ph->pkt_len = 0; ph->data_len = 0; ph->pkt_cnt_rate = 0; ph->pkt_len_rate = 0; ph->data_len_rate = 0; op = hfirst(ht); i = 0; while (op && i < cnt) { ns = hstuff(ht); if (ns) { array[i++] = ns; /* collect total statistics */ ph->pkt_cnt += ns->pkt_cnt; ph->pkt_len += ns->pkt_len; ph->data_len += ns->data_len; ph->pkt_cnt_rate += ns->pkt_cnt_rate; ph->pkt_len_rate += ns->pkt_len_rate; ph->data_len_rate += ns->data_len_rate; } op = hnext(ht); } /* free previous */ if (*list) free(*list); *list = array; if (ph->ns_mutex) pthread_mutex_unlock(ph->ns_mutex); return i; } netdiag-1.2/trafshow-5.2.3/netstat.h000066400000000000000000000071041323731111400171200ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _NETSTAT_H_ #define _NETSTAT_H_ #include #include #ifdef linux #include #else #include #endif #include #include #ifndef IPPORT_RESERVED #define IPPORT_RESERVED 1024 #endif #ifndef IPPORT_DYNAMIC #define IPPORT_DYNAMIC 49152 #endif /* * Any struct defined here is a storage contained all data. */ /* * Internet flow record address. */ struct ip_address { union { struct in_addr ipa4; #ifdef INET6 struct in6_addr ipa6; #endif } ipaddr; u_int16_t ip_port; }; #define ip_addr ipaddr.ipa4 #ifdef INET6 #define ip6_addr ipaddr.ipa6 #endif /* * Internet flow record header. */ struct internet_header { u_int8_t ver; /* ip version */ u_int8_t proto; /* ip protocol */ struct ip_address src; /* source ip address */ struct ip_address dst; /* destination ip address */ }; #ifndef ETHER_ADDR_LEN #ifdef HAVE_ETHER_ADDR #define ETHER_ADDR_LEN sizeof(struct ether_addr) #else #define ETHER_ADDR_LEN 6 #endif #endif /* * Ethernet flow record header. */ struct ethernet_header { u_char src[ETHER_ADDR_LEN]; /* source ether address */ u_char dst[ETHER_ADDR_LEN]; /* destination ether address */ u_int16_t type; /* ether type */ union { u_int16_t tag; /* ether dot1q tag */ struct { /* IEEE 802.3 LLC header */ u_char ssap; /* source SAP ID */ u_char dsap; /* destination SAP ID */ } llc; } param; }; #define ETH_VIDOFTAG(tag) ((tag) & 0xfff) #define ETH_PRIOFTAG(tag) (((tag) >> 13) & 7) #define ETH_CFIOFTAG(tag) (((tag) >> 12) & 1) struct netstat_header { struct ethernet_header en_hdr; /* ether flow record header */ struct internet_header in_hdr; /* inet flow record header */ }; typedef struct netstat { /* all header fields in network byte order */ struct netstat_header ns_hdr; /* must be first in struct netstat! */ #define eth_src_addr ns_hdr.en_hdr.src #define eth_dst_addr ns_hdr.en_hdr.dst #define eth_type ns_hdr.en_hdr.type #define eth_tag ns_hdr.en_hdr.param.tag #define eth_ssap ns_hdr.en_hdr.param.llc.ssap #define eth_dsap ns_hdr.en_hdr.param.llc.dsap #define ip_ver ns_hdr.in_hdr.ver #define ip_proto ns_hdr.in_hdr.proto #define ip_src_addr ns_hdr.in_hdr.src #define ip_dst_addr ns_hdr.in_hdr.dst /* all data fields in host byte order */ struct timeval mtime; /* last modification time */ u_int32_t pkt_cnt; /* packet counter */ u_int32_t pkt_len; /* length of ip packet */ u_int32_t data_len; /* length of ip data */ u_int32_t gain_pkt_cnt; u_int32_t gain_pkt_len; u_int32_t gain_data_len; u_int32_t pkt_cnt_rate; /* rate of packet counter */ u_int32_t pkt_len_rate; /* rate of packet length */ u_int32_t data_len_rate; /* rate of data length */ int attr; /* curses video attributes */ } NETSTAT; struct pcap_handler; void netstat_aggregate(struct netstat_header *nh, int bits); int netstat_count(const struct pcap_handler *ph); int netstat_insert(struct pcap_handler *ph, const NETSTAT *ns); int netstat_find(struct pcap_handler *ph, NETSTAT *ns); int netstat_purge(struct pcap_handler *ph, const struct timeval *at); void netstat_free(struct pcap_handler *ph); int netstat_match(const NETSTAT *ns1, const NETSTAT *ns2); int netstat_bidir(const NETSTAT *ns1, const NETSTAT *ns2); int netstat_fetch(NETSTAT **list[], struct pcap_handler *ph); #endif /* !_NETSTAT_H_ */ netdiag-1.2/trafshow-5.2.3/parse_dl.c000066400000000000000000000163571323731111400172340ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef linux #include #else #include #endif #include #include #include #include #include #include #include "parse_dl.h" #include "parse_ip.h" #include "netstat.h" #include "ethertype.h" #include "sll.h" #ifndef DLT_LINUX_SLL #define DLT_LINUX_SLL 113 #endif struct ether_dot1q_header { u_char dhost[ETHER_ADDR_LEN]; u_char shost[ETHER_ADDR_LEN]; u_int16_t encap_proto; u_int16_t tag; u_int16_t proto; }; int is_parse_dl(type) int type; { return (type == DLT_NULL || type == DLT_LOOP || type == DLT_EN10MB || type == DLT_SLIP || type == DLT_PPP_ETHER || type == DLT_PPP || type == DLT_RAW || type == DLT_C_HDLC || type == DLT_PPP_SERIAL || type == DLT_LINUX_SLL); } const char * parse_dl_name(type) int type; { switch (type) { case DLT_NULL: case DLT_LOOP: return "Loopback"; case DLT_EN10MB: return "Ethernet"; case DLT_SLIP: return "SLIP"; case DLT_PPP_ETHER: return "PPP over Ethernet"; case DLT_PPP: return "Async PPP"; case DLT_RAW: return "raw IP"; case DLT_C_HDLC: return "Cisco HDLC"; case DLT_PPP_SERIAL: return "Sync PPP"; case DLT_LINUX_SLL: return "Linux cooked socket"; } return "Unknown"; } int parse_dl(ns, dlt, caplen, pktlen, pkt) NETSTAT *ns; int dlt, caplen, pktlen; const u_char *pkt; { const struct ether_header *ether = 0; const struct ip *ip = 0; const u_char *p = pkt; u_int length = pktlen; u_int type, hdrlen; u_char dsap, ssap; /* sanity check */ if (!pkt) return -1; switch (dlt) { case DLT_NULL: case DLT_LOOP: if (caplen < 4) return -1; memcpy((u_char *)&type, p, sizeof(type)); if (type & 0xffff0000) { /* swap bytes */ type = (((type & 0xff) << 24) | ((type & 0xff00) << 8) | ((type & 0xff0000) >> 8) | ((type >> 24) & 0xff)); } if (type != AF_INET && type != AF_INET6) return -1; p += 4; ip = (const struct ip *)p; caplen -= 4; length -= 4; break; case DLT_EN10MB: hdrlen = sizeof(struct ether_header); if (caplen < hdrlen) return -1; ether = (struct ether_header *)p; if (ns) { #ifdef HAVE_ETHER_ADDR memcpy(ns->eth_src_addr, ðer->ether_shost, sizeof(struct ether_addr)); memcpy(ns->eth_dst_addr, ðer->ether_dhost, sizeof(struct ether_addr)); #else memcpy(ns->eth_src_addr, ether->ether_shost, ETHER_ADDR_LEN); memcpy(ns->eth_dst_addr, ether->ether_dhost, ETHER_ADDR_LEN); #endif ns->eth_type = ether->ether_type; } type = ntohs(ether->ether_type); if (type <= ETHERMTU) { /* IEEE 802.3 frame: the type is data length */ if (caplen < hdrlen + 3) return -1; /* extract SAP (Service Access Point) IDs */ dsap = p[hdrlen]; ssap = p[hdrlen + 1]; if (ns) { ns->eth_dsap = dsap; ns->eth_ssap = ssap; ns->data_len = type; } type = 0; /* no type known yet */ hdrlen += 3; /* skip 802.2 LLC header */ if (dsap == 0x06 && ssap == 0x06) { /* 802.3/802.2 encapsulated IP */ type = ETHERTYPE_IP; } else if (dsap == 0xAA && ssap == 0xAA) { if (caplen < hdrlen + 5) return -1; /* extract encap type after 3-bytes OUI */ type = *(u_int16_t *)(p + hdrlen + 3); if (ns) ns->eth_type = type; type = ntohs(type); hdrlen += 5; /* skip 802.2 SNAP header */ } } else if (type == ETHERTYPE_8021Q) { hdrlen = sizeof(struct ether_dot1q_header); if (caplen < hdrlen) return -1; if (ns) ns->eth_tag = ((struct ether_dot1q_header *)p)->tag; type = ntohs(((struct ether_dot1q_header *)p)->proto); } p += hdrlen; if (type == ETHERTYPE_IP || type == ETHERTYPE_IPV6) ip = (const struct ip *)p; caplen -= hdrlen; length -= hdrlen; break; case DLT_SLIP: if (caplen < 16) return -1; p += 16; ip = (const struct ip *)p; caplen -= 16; length -= 16; break; case DLT_PPP_ETHER: if (caplen < 6 || p[1]) return -1; p += 6; caplen -= 6; length -= 6; /* pass through */ case DLT_PPP: if (caplen < 4) return -1; hdrlen = 0; #ifdef SLC_BPFHDR if (dlt == DLT_PPP) { ip = (const struct ip *)(p + SLC_BPFHDR);/* skip bpf pseudo header */ p += SLC_BPFHDRLEN; /* now pointer to link level header */ } #endif /* PPP address and PPP control fields may be present (-acfc) */ if (p[0] == 0xff && p[1] == 0x03) { p += 2; hdrlen += 2; } /* retrive the protocol type */ if (*p & 01) { /* compressed protocol field (pfc) */ type = *p++; hdrlen++; } else { /* un-compressed protocol field (-pfc) */ type = ntohs(*(u_int16_t *)p); p += 2; hdrlen += 2; } /* check for IP or IPv6 */ if (type != 0x21 && type != 0x57 && type != ETHERTYPE_IP && type != ETHERTYPE_IPV6) return -1; #ifdef SLC_BPFHDR if (dlt == DLT_PPP) { caplen -= SLC_BPFHDR; length -= SLC_BPFHDR; } else { ip = (const struct ip *)p; caplen -= hdrlen; length -= hdrlen; } #else ip = (const struct ip *)p; caplen -= hdrlen; length -= hdrlen; #endif break; case DLT_RAW: ip = (const struct ip *)p; break; case DLT_C_HDLC: case DLT_PPP_SERIAL: if (caplen < 4) return -1; /* check for UNICAST or BCAST */ if (p[0] != 0x0f && p[0] != 0x8f) return -1; type = ntohs(*(u_int16_t *)&p[2]); if (type != ETHERTYPE_IP && type != ETHERTYPE_IPV6) return -1; p += 4; ip = (const struct ip *)p; caplen -= 4; length -= 4; break; case DLT_LINUX_SLL: if (caplen < SLL_HDR_LEN) return -1; if (ntohs(((struct sll_header *)p)->sll_halen) == ETHER_ADDR_LEN) { if (ns) { /* the source address is in the packet header */ memcpy(ns->eth_src_addr, ((struct sll_header *)p)->sll_addr, ETHER_ADDR_LEN); /* just a fake the destination address */ memset(ns->eth_dst_addr, 0, ETHER_ADDR_LEN); type = ntohs(((struct sll_header *)p)->sll_pkttype); if (type != LINUX_SLL_OUTGOING) { if (type == LINUX_SLL_BROADCAST) memset(ns->eth_dst_addr, 0xff, ETHER_ADDR_LEN); else if (type == LINUX_SLL_MULTICAST) ns->eth_dst_addr[0] = 1; else ns->eth_dst_addr[ETHER_ADDR_LEN-1] = 1; } ns->eth_type = ((struct sll_header *)p)->sll_protocol; } /* point somewhere to avoid return after switch() */ ether = (struct ether_header *)p; } type = ntohs(((struct sll_header *)p)->sll_protocol); p += SLL_HDR_LEN; caplen -= SLL_HDR_LEN; length -= SLL_HDR_LEN; if (type == ETHERTYPE_IP || type == ETHERTYPE_IPV6) ip = (const struct ip *)p; break; default: /* Unknown or unsupported data link type */ return -1; } if (!ether && !ip) return -1; if (caplen > length) caplen = length; if (ns) { if (!ns->pkt_cnt) ns->pkt_cnt = 1; if (!ns->pkt_len) ns->pkt_len = pktlen; if (!ns->data_len) ns->data_len = length; } hdrlen = (char *)p - (char *)pkt; if (ip && caplen >= sizeof(struct ip)) { int hlen = parse_ip(ns, caplen, ip); if (hlen > 0) hdrlen += hlen; } return hdrlen; } netdiag-1.2/trafshow-5.2.3/parse_dl.h000066400000000000000000000010171323731111400172240ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _PARSE_DL_H_ #define _PARSE_DL_H_ int is_parse_dl(int type); const char *parse_dl_name(int type); struct netstat; int parse_dl(struct netstat *ns, int dlt, int clen, int plen, const unsigned char *p); #endif /* !_PARSE_DL_H_ */ netdiag-1.2/trafshow-5.2.3/parse_ip.c000066400000000000000000000102721323731111400172330ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #ifdef INET6 #include #include #endif #include "parse_ip.h" #include "netstat.h" int parse_ip(ns, caplen, ip) NETSTAT *ns; int caplen; const struct ip *ip; { int hdrlen = 0, len; const u_char *p; /* sanity check */ if (!ip) return -1; if (ns) ns->ip_ver = ip->ip_v; if (ip->ip_v == 4) { struct ip_address *src = 0, *dst = 0; if (ns) { src = &ns->ip_src_addr; dst = &ns->ip_dst_addr; ns->ip_proto = ip->ip_p; src->ip_addr = ip->ip_src; dst->ip_addr = ip->ip_dst; ns->pkt_len = ntohs(ip->ip_len); } hdrlen = ip->ip_hl << 2; caplen -= hdrlen; if ((ntohs(ip->ip_off) & 0x1fff) == 0) { p = (const u_char *)ip + hdrlen; switch (ip->ip_p) { case IPPROTO_TCP: #if defined(linux) len = ((const struct tcphdr *)p)->doff << 2; #else len = ((const struct tcphdr *)p)->th_off << 2; #endif hdrlen += len; caplen -= len; if (caplen >= 0 && src && dst) { #if defined(linux) src->ip_port = ((const struct tcphdr *)p)->source; dst->ip_port = ((const struct tcphdr *)p)->dest; #else src->ip_port = ((const struct tcphdr *)p)->th_sport; dst->ip_port = ((const struct tcphdr *)p)->th_dport; #endif } break; case IPPROTO_UDP: len = sizeof(struct udphdr); hdrlen += len; caplen -= len; if (caplen >= 0 && src && dst) { #if defined(linux) src->ip_port = ((const struct udphdr *)p)->source; dst->ip_port = ((const struct udphdr *)p)->dest; #else src->ip_port = ((const struct udphdr *)p)->uh_sport; dst->ip_port = ((const struct udphdr *)p)->uh_dport; #endif } break; case IPPROTO_ICMP: len = (u_char *)((const struct icmp *)p)->icmp_data - p; hdrlen += len; caplen -= len; if (caplen >= 0 && src) { src->ip_port = ((((const struct icmp *)p)->icmp_type << 8) | ((const struct icmp *)p)->icmp_code) + 1; } break; } } } #ifdef INET6 else if (ip->ip_v == 6) { struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; struct ip_address *src = 0, *dst = 0; if (ns) { src = &ns->ip_src_addr; dst = &ns->ip_dst_addr; ns->ip_proto = ip6->ip6_nxt; src->ip6_addr = ip6->ip6_src; dst->ip6_addr = ip6->ip6_dst; ns->pkt_len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); } hdrlen = sizeof(struct ip6_hdr); caplen -= hdrlen; p = (const u_char *)ip6 + hdrlen; switch (ip6->ip6_nxt) { case IPPROTO_TCP: #if defined(linux) len = ((const struct tcphdr *)p)->doff << 2; #else len = ((const struct tcphdr *)p)->th_off << 2; #endif hdrlen += len; caplen -= len; if (caplen >= 0 && src && dst) { #if defined(linux) src->ip_port = ((const struct tcphdr *)p)->source; dst->ip_port = ((const struct tcphdr *)p)->dest; #else src->ip_port = ((const struct tcphdr *)p)->th_sport; dst->ip_port = ((const struct tcphdr *)p)->th_dport; #endif } break; case IPPROTO_UDP: len = sizeof(struct udphdr); hdrlen += len; caplen -= len; if (caplen >= 0 && src && dst) { #if defined(linux) src->ip_port = ((const struct udphdr *)p)->source; dst->ip_port = ((const struct udphdr *)p)->dest; #else src->ip_port = ((const struct udphdr *)p)->uh_sport; dst->ip_port = ((const struct udphdr *)p)->uh_dport; #endif } break; case IPPROTO_ICMPV6: len = sizeof(struct icmp6_hdr); hdrlen += len; caplen -= len; if (caplen >= 0 && src) { src->ip_port = ((((const struct icmp6_hdr *)p)->icmp6_type << 8) | ((const struct icmp6_hdr *)p)->icmp6_code) + 1; } break; } } #endif else { /* unknown IP version */ return -1; } if (ns) { ns->pkt_cnt = 1; if (ns->pkt_len >= hdrlen) ns->data_len = ns->pkt_len - hdrlen; } return hdrlen; } netdiag-1.2/trafshow-5.2.3/parse_ip.h000066400000000000000000000007051323731111400172400ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _PARSE_IP_H_ #define _PARSE_IP_H_ struct netstat; struct ip; int parse_ip(struct netstat *ns, int caplen, const struct ip *ip); #endif /* !_PARSE_IP_H_ */ netdiag-1.2/trafshow-5.2.3/recycle.c000066400000000000000000000035651323731111400170660ustar00rootroot00000000000000/* -------------------------------------------------------------------- By Bob Jenkins, September 1996. recycle.c You may use this code in any way you wish, and it is free. No warranty. This manages memory for commonly-allocated structures. It allocates RESTART to REMAX items at a time. Timings have shown that, if malloc is used for every new structure, malloc will consume about 90% of the time in a program. This module cuts down the number of mallocs by an order of magnitude. This also decreases memory fragmentation, and freeing structures only requires freeing the root. -------------------------------------------------------------------- */ #include #include #ifndef STANDARD # include "standard.h" #endif #ifndef RECYCLE # include "recycle.h" #endif reroot *remkroot(size) size_t size; { reroot *r = (reroot *)malloc(sizeof(reroot)); if (r) { r->list = (recycle *)0; r->trash = (recycle *)0; r->size = align(size); r->logsize = RESTART; r->numleft = 0; } return r; } void refree(r) struct reroot *r; { recycle *temp = r->list; if (temp) while (r->list) { temp = r->list->next; free((char *)r->list); r->list = temp; } free((char *)r); return; } /* to be called from the macro renew only */ char *renewx(r) struct reroot *r; { recycle *temp; if (r->trash) { /* pull a node off the trash heap */ temp = r->trash; r->trash = temp->next; (void)memset((void *)temp, 0, r->size); } else { /* allocate a new block of nodes */ r->numleft = r->size*((ub4)1<logsize); if (r->numleft < REMAX) ++r->logsize; temp = (recycle *)malloc(sizeof(recycle) + r->numleft); if (!temp) return 0; temp->next = r->list; r->list = temp; r->numleft-=r->size; temp = (recycle *)((char *)(r->list+1)+r->numleft); } return (char *)temp; } netdiag-1.2/trafshow-5.2.3/recycle.h000066400000000000000000000034471323731111400170720ustar00rootroot00000000000000/* -------------------------------------------------------------------- By Bob Jenkins, September 1996. recycle.h You may use this code in any way you wish, and it is free. No warranty. This manages memory for commonly-allocated structures. It allocates RESTART to REMAX items at a time. Timings have shown that, if malloc is used for every new structure, malloc will consume about 90% of the time in a program. This module cuts down the number of mallocs by an order of magnitude. This also decreases memory fragmentation, and freeing all structures only requires freeing the root. -------------------------------------------------------------------- */ #ifndef STANDARD #include "standard.h" #endif #ifndef RECYCLE #define RECYCLE #define RESTART 0 #define REMAX 32000 struct recycle { struct recycle *next; }; typedef struct recycle recycle; struct reroot { struct recycle *list; /* list of malloced blocks */ struct recycle *trash; /* list of deleted items */ size_t size; /* size of an item */ size_t logsize; /* log_2 of number of items in a block */ word numleft; /* number of items left in this block */ }; typedef struct reroot reroot; /* make a new recycling root */ reroot *remkroot(size_t mysize); /* free a recycling root and all the items it has made */ void refree(struct reroot *r); /* get a new (cleared) item from the root */ #define renew(r) ((r)->numleft ? \ (((char *)((r)->list+1))+((r)->numleft-=(r)->size)) : renewx(r)) char *renewx(struct reroot *r); /* delete an item; let the root recycle it */ /* void redel(/o_ struct reroot *r, struct recycle *item _o/); */ #define redel(root,item) { \ ((recycle *)item)->next=(root)->trash; \ (root)->trash=(recycle *)(item); \ } #endif /* RECYCLE */ netdiag-1.2/trafshow-5.2.3/screen.c000066400000000000000000000064361323731111400167170ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #ifdef HAVE_SYS_TERMIOS_H #include #endif #include #include #include #include #include #include #include "screen.h" #include "colormask.h" #ifndef TIOCGWINSZ #define TIOCGWINSZ 104 #endif int use_colors = 0; int prompt_mode = 0; double line_factor = 1; /* * Initialize curses. */ int screen_open(resize) int resize; { if (!resize) { if (initscr() == (WINDOW *)ERR) { fprintf(stderr, "Can't initialize terminal -- unknown terminal type?\n"); return -1; } #ifdef HAVE_HAS_COLORS use_colors = has_colors(); #ifdef HAVE_SLCURSES SLtt_Use_Ansi_Colors = 1; /* force color mode */ use_colors = 1; #endif if (use_colors) { start_color(); if (init_colormask() < 0) { endwin(); return -1; } } #endif /* HAVE_HAS_COLORS */ cbreak(); noecho(); nonl(); } else { /* resize terminal */ int fd, new_rows = 0, new_cols = 0; struct winsize ws; char *cp; if ((fd = open("/dev/tty", 0)) != -1) { if (ioctl(fd, TIOCGWINSZ, &ws) != -1) { new_rows = ws.ws_row; new_cols = ws.ws_col; } close(fd); } if (!new_rows) { if ((cp = getenv("LINES")) != NULL) new_rows = atoi(cp); else new_rows = DEFAULT_LINES; } if (!new_cols) { if ((cp = getenv("COLUMNS")) != NULL) new_cols = atoi(cp); else new_cols = DEFAULT_COLUMNS; } #ifdef HAVE_RESIZETERM resizeterm(new_rows, new_cols); #elif HAVE_SLCURSES SLtt_Screen_Rows = new_rows; SLtt_Screen_Cols = new_cols; SLcurses_delwin(stdscr); SLsmg_reset_smg(); SLsmg_init_smg(); stdscr = SLcurses_newwin(0, 0, 0, 0); #else /* assume it work on all curses */ endwin(); initscr(); cbreak(); noecho(); nonl(); #endif } clear(); prompt_mode = 0; screen_dock_cursor(LINES-1, COLS-1); if (LINES < MINPAGESIZE) { screen_status("Too small LINES (%d) on screen", LINES); return -1; } if (COLS < MINPAGESIZE * 2) { screen_status("Too small COLUMNS (%d) on screen", COLS); return -1; } line_factor = (double)COLS / (double)DEFAULT_COLUMNS; return 0; } /* * Return terminal original settings. */ void screen_close() { attrset(A_NORMAL); move(LINES-1, 0); clrtoeol(); refresh(); endwin(); } void screen_clear() { attrset(A_NORMAL); clear(); refresh(); } static int curs_dock_x = 0, curs_dock_y = 0; void screen_update() { move(curs_dock_y, curs_dock_x); refresh(); } void screen_dock_cursor(y, x) int y, x; { curs_dock_x = x ? x : COLS - 1; curs_dock_y = y ? y : LINES - 1; } void screen_status(const char *fmt, ...) { va_list ap; char buf[1024]; va_start(ap, fmt); (void)strcpy(buf, "[ "); vsprintf(buf+2, fmt, ap); buf[COLS-4] = '\0'; (void)strcat(buf, " ]"); attrset(A_STANDOUT); mvaddstr(LINES-2, COLS/2 - strlen(buf)/2, buf); attrset(A_NORMAL); screen_update(); (void)sleep(1); } netdiag-1.2/trafshow-5.2.3/screen.h000066400000000000000000000013721323731111400167160ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SCREEN_H_ #define _SCREEN_H_ #define DEFAULT_COLUMNS 80 /* mandatory */ #define DEFAULT_LINES 24 #define MINPAGESIZE 20 #ifndef ACS_HLINE #define ACS_HLINE '-' #endif int screen_open(int resize); void screen_close(void); void screen_status(const char *fmt, ...); void screen_update(void); void screen_clear(void); void screen_dock_cursor(int y, int x); extern int use_colors; extern int prompt_mode; extern double line_factor; #endif /* !_SCREEN_H_ */ netdiag-1.2/trafshow-5.2.3/selector.c000066400000000000000000000172371323731111400172610ustar00rootroot00000000000000/* * Copyright (c) 1998,2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #include "selector.h" #include "screen.h" #include "getkey.h" #define BLANK ' ' #ifdef ACS_HLINE #define HLINE ACS_HLINE #else #define HLINE '-' #endif static void get_size(const SELECTOR *sp, int *lines, int *cols); static void get_colors(const SELECTOR *sp, int *foreground, int *cursor); static void get_size(sp, lines, cols) const SELECTOR *sp; int *lines, *cols; { int ln = LINES, cl = COLS; if (sp) { if (sp->LINES > 0 && sp->LINES < LINES) ln = sp->LINES; if (sp->get_header) ln -= 2; if (sp->get_footer) ln -= 2; if (ln < 1) ln = 1; if (sp->COLS > 0 && sp->COLS < COLS) cl = sp->COLS; if (cl < 1) cl = 1; } if (lines) *lines = ln; if (cols) *cols = cl; } static void get_colors(sp, fore, curs) const SELECTOR *sp; int *fore, *curs; { int fg = A_NORMAL, cr = A_REVERSE; if (sp && use_colors) { if (sp->window_color != -1) fg = sp->window_color; if (sp->cursor_color != -1) cr = sp->cursor_color; } if (prompt_mode) cr = fg; if (fore) *fore = fg; if (curs) *curs = cr; } /* * Allocate & initialize selector handler. */ SELECTOR * selector_init() { SELECTOR *sp = (SELECTOR *)malloc(sizeof(SELECTOR)); if (sp) { memset(sp, 0, sizeof(SELECTOR)); sp->window_color = -1; sp->cursor_color = -1; } return sp; } /* * Redraw selector region and refresh screen. */ void selector_redraw(sp) SELECTOR *sp; { int i, l, r, lines, cols, first_line, first_col; int fg_color, cr_color, attr; char *cp, buf[1024]; /* sanity check */ if (!sp) return; if (sp->index >= sp->items) selector_set(sp->items - 1, sp); get_size(sp, &lines, &cols); get_colors(sp, &fg_color, &cr_color); first_line = sp->LINE; first_col = sp->COL; attrset(A_NORMAL); #ifdef HAVE_WREDRAWLN wredrawln(stdscr, first_line, lines + 2); #endif /* draw header */ if (sp->get_header) { attr = fg_color; attr |= (*sp->get_header)(buf, sizeof(buf), sp->header); move(first_line, first_col); r = cols; for (cp = buf; *cp && r-- > 0; cp++) { if (*cp > ' ') addch(*cp | attr); else addch(BLANK | attr); } while (r-- > 0) addch(BLANK | attr); move(first_line + 1, first_col); r = cols; while (r-- > 0) addch(HLINE | attr); first_line += 2; } /* draw main area */ for (i = sp->fline, l = 0; l < lines; i++, l++) { attr = fg_color; move(first_line + l, first_col); r = cols; if (i < sp->items && sp->get_line) { attr |= (*sp->get_line)(buf, sizeof(buf), sp->list, i); if (i == sp->index) attr = cr_color; for (cp = buf; *cp && r-- > 0; cp++) { if (*cp > ' ') addch(*cp | attr); else addch(BLANK | attr); /* workaround -- last attr mustbe foreground */ if (r == 1 && i == sp->items - 1) attr = fg_color; } } while (r-- > 0) addch(BLANK | attr); } /* draw footer */ if (sp->get_footer) { attr = fg_color; attr |= (*sp->get_footer)(buf, sizeof(buf), sp->footer); first_line += l; move(first_line++, first_col); r = cols; while (r-- > 0) addch(HLINE | attr); if (!prompt_mode || first_line != LINES-1) { move(first_line, first_col); r = cols; for (cp = buf; *cp && r-- > 0; cp++) { if (*cp > ' ') addch(*cp | attr); else addch(BLANK | attr); } while (r-- > 0) addch(BLANK | attr); } } /* refresh screen */ screen_update(); } /* * Withdraw selector from the screen. */ void selector_withdraw(sp) SELECTOR *sp; { int i, l, r, lines, cols, first_line, first_col; int fg_color, attr; char *cp, buf[1024]; /* sanity check */ if (!sp || !sp->get_line) return; get_size(sp, &lines, &cols); get_colors(sp, &fg_color, 0); first_line = sp->LINE; first_col = sp->COL; attrset(A_NORMAL); if (sp->get_header) first_line += 2; #ifdef HAVE_WREDRAWLN wredrawln(stdscr, first_line, lines); #endif for (i = sp->fline, l = 0; l < lines; i++, l++) { if (i != sp->index) continue; attr = fg_color; move(first_line + l, first_col); r = cols; if (i < sp->items && sp->get_line) { attr |= (*sp->get_line)(buf, sizeof(buf), sp->list, i); for (cp = buf; *cp && r-- > 0; cp++) { if (*cp > ' ') addch(*cp | attr); else addch(BLANK | attr); /* workaround -- last attr mustbe foreground */ if (r == 1 && i == sp->items - 1) attr = fg_color; } while (r-- > 0) addch(BLANK | attr); } break; } } /* * Return current selector position or -1 if no selector present. */ int selector_get(sp) SELECTOR *sp; { /* sanity check */ if (!sp || !sp->list || sp->items < 1 || sp->index < 0 || sp->index >= sp->items) return -1; return sp->index; } /* * Set selector to requested position. */ void selector_set(new_index, sp) int new_index; SELECTOR *sp; { int lines; /* sanity check */ if (!sp) return; if (sp->items < 1) { sp->index = 0; sp->fline = 0; sp->cline = 0; return; } get_size(sp, &lines, 0); if (new_index >= sp->items) new_index = sp->items - 1; sp->fline = (new_index / lines) * lines; sp->cline = new_index % lines; if (sp->fline + lines >= sp->items) { sp->fline = sp->items - lines; if (sp->fline < 0) sp->fline = 0; sp->cline = new_index - sp->fline; } sp->index = new_index; } /* * Move selector on screen. * Return index selected or -1. */ int selector_move(ch, sp) int ch; SELECTOR *sp; { int lines; /* sanity check */ if (!sp) return -1; get_size(sp, &lines, 0); switch (ch) { case 'k': case K_CTRL('P'): case K_UP: /* line up */ if (sp->index - 1 < 0) break; sp->index--; if (--sp->cline < 0 && sp->fline) { sp->cline = 0; if (--sp->fline < 0) sp->fline = 0; } break; case 'j': case K_CTRL('N'): case K_DOWN: /* line down */ if (sp->index + 1 >= sp->items) break; sp->index++; if (++sp->cline >= lines) { sp->cline--; sp->fline = sp->index - sp->cline; } break; case K_BS: case K_CTRL('U'): case K_CTRL('B'): case K_PAGEUP: /* page up */ if (sp->cline > 0) { sp->index -= sp->cline; } else { sp->index -= lines; sp->fline -= lines; if (sp->index < 0 || sp->fline < 0) sp->index = sp->fline = 0; } sp->cline = 0; break; case ' ': case K_CTRL('D'): case K_CTRL('F'): case K_PAGEDOWN: /* page down */ if (sp->items <= lines) { sp->index = sp->cline = sp->items - 1; } else { if (sp->cline < lines - 1) { sp->index += lines - sp->cline - 1; } else { sp->index += lines; sp->fline = sp->index - lines + 1; } if (sp->index >= sp->items) { sp->index = sp->items - 1; sp->fline = sp->items - lines; } sp->cline = lines - 1; } break; case K_CTRL('A'): case K_HOME: /* home */ sp->index = 0; sp->fline = 0; sp->cline = 0; break; case K_CTRL('E'): case K_END: /* end */ if (sp->items <= lines) { sp->index = sp->cline = sp->items - 1; } else { sp->index = sp->items - 1; sp->fline = sp->items - lines; sp->cline = lines - 1; } break; case K_CR: /* select index */ case K_NL: return sp->index; case K_CTRL('G'): /* trace; for debug purpose only */ mvprintw(LINES-1, 0, "items=%d index=%d fline=%d cline=%d LINE=%d COL=%d LINES=%d func=%p", sp->items, sp->index, sp->fline, sp->cline, sp->LINE, sp->COL, lines, sp->get_line); clrtoeol(); break; } return -1; } netdiag-1.2/trafshow-5.2.3/selector.h000066400000000000000000000024421323731111400172560ustar00rootroot00000000000000/* * Copyright (c) 1999,2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SELECTOR_H_ #define _SELECTOR_H_ typedef struct selector { int window_color; int cursor_color; int LINE; /* first line on screen */ int COL; /* first column on screen */ int LINES; /* number of lines on screen */ int COLS; /* number of columns on screen */ int items; /* size of items array */ int (*get_header)(char *dst, int size, const void *header); void *header; /* header args pointer */ int (*get_line)(char *dst, int size, const void *list, int idx); void *list; /* list args pointer */ int (*get_footer)(char *dst, int size, const void *footer); void *footer; /* footer args pointer */ int index; /* array current index */ int fline; /* first displayed line */ int cline; /* current screen line */ } SELECTOR; SELECTOR *selector_init(); void selector_redraw(SELECTOR *sp); void selector_withdraw(SELECTOR *sp); int selector_get(SELECTOR *sp); void selector_set(int new_index, SELECTOR *sp); int selector_move(int ch, SELECTOR *sp); #endif /* !_SELECTOR_H_ */ netdiag-1.2/trafshow-5.2.3/session.c000066400000000000000000000375101323731111400171200ustar00rootroot00000000000000/* * Copyright (c) 1999-2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "session.h" #include "events.h" /* just for tv_sub() */ #define dprintf(x) /* nope */ #ifndef BUF_SIZE #define BUF_SIZE 8192 #endif #ifndef MAX_STR_LEN #define MAX_STR_LEN 1500 /* must be vastly smaller then BUF_SIZE */ #endif #ifdef O_NONBLOCK #define ASYNC_MODE O_NONBLOCK #elif O_NDELAY #define ASYNC_MODE O_NDELAY #elif FNDELAY #define ASYNC_MODE FNDELAY #elif O_ASYNC #define ASYNC_MODE O_ASYNC #elif #error the fcntl argument to turn ON/OFF non-blocking I/O is unknown #endif static int session_read(SESSION *sd); static SESSION *first_session = 0; /* first network session in table */ typedef struct session_binder_ent { void (*notify)(void *arg); /* call it before free */ void *arg; struct session_binder_ent *next; } SESSION_BINDER; SESSION * session_open(sock, peer, type) int sock; const struct sockaddr *peer; SessionType type; { SESSION *sd, *prev = 0, *next = 0; static u_long sid = 0; /* * Search for first empty or last session slot. */ for (sd = first_session; sd; sd = sd->next) { if (!sd->sid) { next = sd->next; break; } prev = sd; } if (!sd && (sd = (SESSION *)malloc(sizeof(SESSION))) == 0) return 0; memset(sd, 0, sizeof(SESSION)); if (++sid == 0) sid++; /* prevent 0 sid */ sd->sid = sid; sd->sock = sock; if (peer) memcpy(&sd->peer, peer, sizeof(struct sockaddr)); else memset(&sd->peer, 0, sizeof(sd->peer)); memset(&sd->from, 0, sizeof(sd->from)); sd->type = type; /* make chain */ if (next) sd->next = next; else if (prev) prev->next = sd; if (!first_session) first_session = sd; if (session_start(sd) < 0) { sd->sid = 0; /* this slot may be recycled later */ sd = 0; } return sd; } int session_start(sd) SESSION *sd; { int af; /* sanity check */ if (!sd) { errno = EINVAL; return -1; } errno = EBADF; if (sd->sock != -1 && (sd->type == PlainFile || socket_peer((struct sockaddr *)&sd->peer, sd->sock) != -1)) { /* already connected for example by accept() */ socket_nonblock(sd->sock, 0); if (sd->type == TextStream) socket_keepalive(sd->sock, 1); return 0; } af = sd->peer.ss_family; if (!af) af = AF_INET; /* by default */ if (errno == EBADF || errno == ENOTSOCK) { switch (sd->type) { case PlainFile: sd->sock = -1; errno = EINVAL; break; case TextStream: sd->sock = socket(af, SOCK_STREAM, 0); break; case DataSequence: sd->sock = socket(af, SOCK_DGRAM, 0); break; /* XXX other session types would be added here */ } if (sd->sock == -1) return -1; errno = ENOTCONN; } if (errno == ENOTCONN) { /* * Make socket `connected' for any type, so error on this * socket will be returned asynchronously without timing out. */ socket_nonblock(sd->sock, 1); if (!sd->peer.ss_family) { errno = 0; return 0; } if (connect(sd->sock, (struct sockaddr *)&sd->peer, sizeof(struct sockaddr)) != -1 || errno == EINPROGRESS) return 0; } /* prevent lost of unused socket */ session_stop(sd); return -1; } int session_sock(sd) SESSION *sd; { return (sd ? sd->sock : -1); } unsigned session_settimeout(sd, timeout) SESSION *sd; unsigned timeout; { unsigned prev; if (!sd || !sd->sid) return 0; prev = sd->timeout; sd->timeout = timeout; if (sd->timeout < 1) timerclear(&sd->expire); return prev; } void session_setcallback(sd, connected, read_error, read_data) SESSION *sd; void (*connected)(SESSION *sd); void (*read_error)(SESSION *sd, int error); void (*read_data)(SESSION *sd, const unsigned char *data, int len); { if (sd && sd->sid) { if (connected && sd->type == TextStream) { sd->connected = connected; } if (read_error) sd->read_error = read_error; if (read_data) sd->read_data = read_data; } } void session_setcookie(sd, cookie) SESSION *sd; const void *cookie; { if (sd && sd->sid) sd->cookie = cookie; } const void * session_cookie(sd) SESSION *sd; { return ((sd && sd->sid) ? sd->cookie : 0); } void session_stop(sd) SESSION *sd; { if (!sd) return; if (sd->sock != -1) { close(sd->sock); sd->sock = -1; } if (sd->buf) { free(sd->buf); sd->buf = 0; } timerclear(&sd->expire); } int session_idle(sd) SESSION *sd; { if (!sd || !sd->sid) return -1; return (sd->sock != -1 ? 0 : 1); } int session_bind(sd, notify, arg) SESSION *sd; void (*notify)(void *arg); void *arg; { SESSION_BINDER *curr, *last = 0; if (!sd || !notify || !arg) { errno = EINVAL; return -1; } /* prevent dups and find last */ for (curr = sd->sb; curr; curr = curr->next) { if (curr->notify == notify && curr->arg == arg) return 0; last = curr; } if ((curr = (SESSION_BINDER *)malloc(sizeof(SESSION_BINDER))) == 0) return -1; curr->notify = notify; curr->arg = arg; curr->next = 0; if (last) last->next = curr; else sd->sb = curr; return 0; } void session_unbind(sd, notify, arg) SESSION *sd; void (*notify)(void *arg); void *arg; { SESSION_BINDER *curr, *prev, *next; curr = (sd ? sd->sb : 0); prev = 0; while (curr) { if ((!notify && !arg) || (curr->notify == notify && curr->arg == arg)) { next = curr->next; if (prev) prev->next = next; else sd->sb = next; free(curr); curr = next; } else { prev = curr; curr = curr->next; } } } /* * This function free all memory only when free_sd = 0 else it just reset * session id and does not free memory. The mean of this behaving is to * reuse/recycle session slots without new malloc (avoiding it overhead). */ void session_free(free_sd) SESSION *free_sd; { SESSION *sd, *prev, *next; SESSION_BINDER *sb; sd = first_session; prev = next = 0; while (sd) { if (!free_sd || sd == free_sd) { if (!free_sd) { next = sd->next; if (prev) prev->next = next; else first_session = next; } for (sb = sd->sb; sb; sb = sb->next) { if (sb->notify && sb->arg) (*sb->notify)(sb->arg); } session_stop(sd); session_unbind(sd, 0, 0); /* to free all */ if (!free_sd) { free(sd); sd = next; continue; } sd->sid = 0; /* this slot may be recycled later */ } prev = sd; sd = sd->next; } } SESSION * session_find(peer, type) const struct sockaddr *peer; SessionType type; { SESSION *sd; /* sanity check */ if (!peer) return 0; for (sd = first_session; sd; sd = sd->next) { if (!sd->sid || sd->type != type || sd->peer.ss_family != peer->sa_family) continue; if (peer->sa_family == AF_INET) { struct sockaddr_in *sin = (struct sockaddr_in *)&sd->peer; if (sin->sin_port == ((struct sockaddr_in *)peer)->sin_port && !memcmp(&sin->sin_addr, &((struct sockaddr_in *)peer)->sin_addr, sizeof(sin->sin_addr))) return sd; } #ifdef INET6 else if (peer->sa_family == AF_INET6) { struct sockaddr_in6 *sin = (struct sockaddr_in6 *)&sd->peer; if (sin->sin6_port == ((struct sockaddr_in6 *)peer)->sin6_port && !memcmp(&sin->sin6_addr, &((struct sockaddr_in6 *)peer)->sin6_addr, sizeof(sin->sin6_addr))) return sd; } #endif } return 0; } int session_send(sd, data, len) SESSION *sd; const unsigned char *data; int len; { int wlen = 0; if (!sd || len < 0) { errno = EINVAL; return -1; } if (!sd->sid || sd->sock == -1) { errno = ENOTCONN; return -1; } if (data) { if (sd->type == PlainFile) { if (len) wlen = write(sd->sock, data, len); } else if (sd->type == TextStream) { char buf[BUF_SIZE]; if (!sd->peer.ss_family) { errno = ENOTCONN; return -1; } if (len > sizeof(buf)-2) len = sizeof(buf)-2; if (len) memcpy(buf, data, len); if (!len || buf[len-1] != '\n') { buf[len++] = '\r'; buf[len++] = '\n'; } wlen = write(sd->sock, buf, len); } else if (sd->type == DataSequence) { if (!sd->peer.ss_family) { errno = ENOTCONN; return -1; } if (len) wlen = send(sd->sock, data, len, 0); } else { /* XXX other session types must be added here */ wlen = -1; errno = ESOCKTNOSUPPORT; } } if (wlen == -1) { if (errno == EAGAIN || errno == EINPROGRESS) { errno = 0; wlen = 0; } else if (sd->read_error) { (*sd->read_error)(sd, errno); return wlen; } } if (sd->timeout > 0) { gettimeofday(&sd->expire, 0); sd->expire.tv_sec += sd->timeout; } return wlen; } static int session_read(sd) SESSION *sd; { int rlen = 0, rest = 0; char *cp, *line, buf[BUF_SIZE]; if (!sd) { errno = EINVAL; return -1; } if (!sd->sid || sd->sock == -1) { errno = ENOTCONN; return -1; } buf[0] = '\0'; if (sd->type == PlainFile) { rlen = read(sd->sock, buf, sizeof(buf)); } else if (sd->type == TextStream) { if (sd->buf) { /* previous line was truncated */ rest = strlen(strcpy(buf, sd->buf)); free(sd->buf); sd->buf = 0; } rlen = read(sd->sock, &buf[rest], (sizeof(buf)-1) - rest); } else if (sd->type == DataSequence) { struct sockaddr from; socklen_t slen = sizeof(from); rlen = recvfrom(sd->sock, buf, sizeof(buf), 0, &from, &slen); if (rlen != -1) { /* just for sanity */ if (slen < sizeof(struct sockaddr_in) || slen > sizeof(struct sockaddr)) return 0; /* should not happen */ if (sd->peer.ss_family && sd->peer.ss_family != from.sa_family) return 0; /* bad family */ /* save packet from */ memcpy(&sd->from, &from, slen); } else memset(&sd->from, 0, sizeof(sd->from)); } else { /* XXX other session types must be added here */ errno = ESOCKTNOSUPPORT; return -1; } if (rlen < 1) { if (!rlen || !errno) errno = ECONNRESET; return -1; } if (sd->type == PlainFile || sd->type == DataSequence) { if (!sd->sid || sd->sock == -1) return 0; if (sd->read_data) (*sd->read_data)(sd, (u_char *)buf, rlen); } else { /* TextStream */ buf[rest + rlen] = '\0'; for (cp = buf; (line = strchr(cp, '\n')) != 0; cp = line) { if (line > cp && line[-1] == '\r') line[-1] = '\0'; *line++ = '\0'; if (!sd->sid || sd->sock == -1) return 0; if (sd->read_data) { rest = strlen(cp); if (rest > MAX_STR_LEN) { errno = EMSGSIZE; return -1; } (*sd->read_data)(sd, (u_char *)cp, rest); } } if (cp && *cp) { /* truncated line, save it for next read */ if (strlen(cp) > MAX_STR_LEN) { errno = EMSGSIZE; return -1; } sd->buf = strdup(cp); } } return rlen; } int session_select(nfds, readfds, writefds, timeout, block) int *nfds; fd_set *readfds, *writefds; struct timeval *timeout; int *block; { SESSION *sd; struct timeval earliest, now; int active = 0, pending = 0; timerclear(&earliest); /* * For each request outstanding, add it's socket to the readfds, * and if it is the earliest timeout to expire, mark it as lowest. */ for (sd = first_session; sd; sd = sd->next) { if (!sd->sid || sd->sock == -1) { if (sd->sock != -1) /* lost session? free socket */ session_stop(sd); continue; } active++; if (sd->sock + 1 > *nfds) *nfds = sd->sock + 1; if (!sd->connected) { FD_SET(sd->sock, readfds); dprintf(("session_select: sock %d set for read", sd->sock)); } else { FD_SET(sd->sock, writefds); dprintf(("session_select: sock %d set for write", sd->sock)); } if (timerisset(&sd->expire)) { pending++; if (!timerisset(&earliest) || timercmp(&sd->expire, &earliest, <)) earliest = sd->expire; } } /*dprintf(("session_select: active=%d pending=%d", active, pending));*/ if (!pending) return active; /* * Transforms earliest from an absolute time into a delta time, the * time left until the select should timeout. */ gettimeofday(&now, 0); tv_sub(&earliest, &now); /* if it was blocking before or our delta time is less, reset timeout */ if (*block || timercmp(&earliest, timeout, <)) { *timeout = earliest; *block = 0; } return active; } /* * Checks to see if any of the fd's set in the readfds belong to a session. */ void session_operate(readfds, writefds) fd_set *readfds, *writefds; { SESSION *sd; int try_conn, error; for (sd = first_session; sd; sd = sd->next) { if (!sd->sid || sd->sock == -1) continue; try_conn = (sd->connected != 0); if (!try_conn && FD_ISSET(sd->sock, readfds)) { dprintf(("session_operate: sock %d ready to read", sd->sock)); if (sd->type == PlainFile) error = 0; else error = socket_error(sd->sock); if (!error && session_read(sd) < 0) error = errno; if (error && sd->sid && sd->read_error) (*sd->read_error)(sd, error); } if (try_conn && FD_ISSET(sd->sock, writefds)) { dprintf(("session_operate: sock %d ready to write", sd->sock)); error = socket_error(sd->sock); if (!error) { socket_peer((struct sockaddr *)&sd->peer, sd->sock); socket_nonblock(sd->sock, 0); if (sd->type == TextStream) socket_keepalive(sd->sock, 1); if (sd->sid && sd->connected) (*sd->connected)(sd); sd->connected = 0; /* fire a shot only once! */ } else if (sd->sid && sd->read_error) (*sd->read_error)(sd, error); } } } /* * Checks to see if any of the sessions have an outstanding request * that has timed out. */ void session_timeout() { SESSION *sd; struct timeval now; gettimeofday(&now, 0); for (sd = first_session; sd; sd = sd->next) { if (!sd->sid || sd->sock == -1) continue; if (timerisset(&sd->expire) && timercmp(&sd->expire, &now, <)) { if (sd->read_error) (*sd->read_error)(sd, ETIMEDOUT); } } } /* * Return session peer pointer. */ const struct sockaddr * session_peer(sd) SESSION *sd; { return ((sd && sd->peer.ss_family) ? (struct sockaddr *)&sd->peer : 0); } /* * Return session from pointer. */ const struct sockaddr * session_from(sd) SESSION *sd; { return ((sd && sd->from.ss_family) ? (struct sockaddr *)&sd->from : 0); } /* * Return connected socket peer ip address and port. */ int socket_peer(peer, sock) struct sockaddr *peer; int sock; { socklen_t arglen; if (!peer) { errno = EINVAL; return -1; } arglen = sizeof(struct sockaddr); return getpeername(sock, peer, &arglen); } /* * Return socket name ip address and port. */ int socket_name(name, sock) struct sockaddr *name; int sock; { socklen_t arglen; if (!name) { errno = EINVAL; return -1; } arglen = sizeof(*name); return getsockname(sock, name, &arglen); } /* * Return socket error (like errno) in the session or 0 if no errors. */ int socket_error(sock) int sock; { int argbuf; socklen_t arglen; struct sockaddr peer; arglen = sizeof(argbuf); if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &argbuf, &arglen) < 0) return errno; if (argbuf) return argbuf; arglen = sizeof(argbuf); if (getsockopt(sock, SOL_SOCKET, SO_TYPE, &argbuf, &arglen) < 0) return errno; if (argbuf == SOCK_STREAM) { arglen = sizeof(peer); if (getpeername(sock, &peer, &arglen) < 0) return errno; } return 0; } /* * Make socket blocked or non-blocked for sync/async I/O. */ int socket_nonblock(sock, on) int sock; int on; /* boolean */ { int mode; int prev; /* boolean */ /* get current value of I/O mode */ if ((mode = fcntl(sock, F_GETFL, 0)) < 0) return -1; prev = (mode & ASYNC_MODE) != 0; if (on != prev) { if (on) mode |= ASYNC_MODE; else mode &= ~ASYNC_MODE; if (fcntl(sock, F_SETFL, mode)) return -1; } return prev; } int socket_keepalive(sock, on) int sock, on; { #ifdef SO_KEEPALIVE int curr = 0; socklen_t slen = sizeof(curr); if (getsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &curr, &slen) < 0) return -1; curr = (curr != 0); if (on != curr) { if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0) return -1; } return 0; #else errno = ESOCKTNOSUPPORT; return -1; #endif } netdiag-1.2/trafshow-5.2.3/session.h000066400000000000000000000070211323731111400171170ustar00rootroot00000000000000/* * Copyright (c) 2003 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SESSION_H_ #define _SESSION_H_ #include #include #include #include #include /* * Session handler. */ /* currently supported session types */ typedef enum { PlainFile, /* simple I/O with a file descriptor */ TextStream, /* CRLFed text lines exchange through TCP */ DataSequence /* raw binary data exchange through UDP */ } SessionType; struct session_binder_ent; #ifndef HAVE_SOCKADDR_STORAGE /* * RFC 2553: protocol-independent placeholder for socket addresses */ #define _SS_MAXSIZE 128 #define _SS_ALIGNSIZE (sizeof(u_int64_t)) #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) * 2) #define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) * 2 - \ _SS_PAD1SIZE - _SS_ALIGNSIZE) struct sockaddr_storage { u_char ss_len; /* address length */ u_char ss_family; /* address family */ char __ss_pad1[_SS_PAD1SIZE]; u_int64_t __ss_align; /* force desired structure storage alignment */ char __ss_pad2[_SS_PAD2SIZE]; }; #endif /* HAVE_SOCKADDR_STORAGE */ typedef struct session_ent { u_long sid; /* session id (must not be zero!) */ /* user supplied parameters */ int sock; /* socket file descriptor */ struct sockaddr_storage peer; /* remote peer address and port */ struct sockaddr_storage from; /* recvfrom peer */ SessionType type; /* session type, see above */ unsigned timeout; /* reply timeout in seconds */ /* internal */ struct timeval expire; /* time until first timeout */ char *buf; /* temporary I/O buffer */ /* user callback functions */ void (*connected)(struct session_ent *sd); void (*read_error)(struct session_ent *sd, int error); void (*read_data)(struct session_ent *sd, const unsigned char *data, int len); const void *cookie; /* user defined container, cast it yourself */ struct session_binder_ent *sb; /* session binder container */ struct session_ent *next; } SESSION; SESSION *session_open(int sock, const struct sockaddr *peer, SessionType type); int session_sock(SESSION *sd); int session_start(SESSION *sd); void session_stop(SESSION *sd); int session_idle(SESSION *sd); void session_free(SESSION *sd); void session_setcallback(SESSION *sd, void (*connected)(SESSION *sd), void (*read_error)(SESSION *sd, int error), void (*read_data)(SESSION *sd, const unsigned char *data, int len)); void session_setcookie(SESSION *sd, const void *cookie); const void *session_cookie(SESSION *sd); unsigned session_settimeout(SESSION *sd, unsigned timeout); int session_send(SESSION *sd, const unsigned char *data, int len); int session_select(int *nfds, fd_set *readfds, fd_set *writefds, struct timeval *timeout, int *block); void session_operate(fd_set *readfds, fd_set *writefds); void session_timeout(); const struct sockaddr *session_peer(SESSION *sd); const struct sockaddr *session_from(SESSION *sd); SESSION *session_find(const struct sockaddr *peer, SessionType type); int session_bind(SESSION *sd, void (*notify)(void *arg), void *arg); void session_unbind(SESSION *sd, void (*notify)(void *arg), void *arg); int socket_nonblock(int sock, int on); int socket_keepalive(int sock, int on); int socket_error(int sock); int socket_peer(struct sockaddr *peer, int sock); int socket_name(struct sockaddr *name, int sock); #endif /* _SESSION_H_ */ netdiag-1.2/trafshow-5.2.3/show_dump.c000066400000000000000000000306131323731111400174370ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "show_dump.h" #include "show_stat.h" /* just for hdr2str() */ #include "parse_dl.h" #include "trafshow.h" #include "screen.h" #include "netstat.h" #include "getkey.h" #include "addrtoname.h" #include "util.h" NETSTAT *dump_match = 0; const char *cisco_netflow_dump = 0; const char *dump_file = 0; static char *build_filter_expr(char *dst, int size, const NETSTAT *ns); static void *live_pcap_dump(); static void live_pcap_parse(u_char *a, const struct pcap_pkthdr *h, const u_char *p); static void file_pcap_parse(u_char *a, const struct pcap_pkthdr *h, const u_char *p); static void show_header_dump(PCAP_HANDLER *ph, const NETSTAT *ns); static void show_ascii_dump(const u_char *p, int length); static void show_hex_dump(const u_char *p, int length); static pcap_t *live_pcap = 0; static pcap_dumper_t *live_dump = 0; static pthread_t *live_pcap_thr = 0; static pcap_t *file_pcap = 0; static FILE *file_netflow = 0; static int redraw_lines = 0; static void print_mode(void) { const char *cp = cisco_netflow_dump; char src_buf[100], dst_buf[100], proto_buf[20]; /* sanity check */ if (!dump_match) return; hdr2str(&dump_match->ns_hdr, src_buf, sizeof(src_buf), dst_buf, sizeof(dst_buf), proto_buf, sizeof(proto_buf)); if (!cisco_netflow_dump) { switch (show_stat_mode) { case Size: cp = "HexData"; break; case Data: cp = "AsciiData"; break; case Packets: cp = "Packets"; break; } } attrset(A_STANDOUT); printw("\n--- %s %s > %s %s flow ---", proto_buf, src_buf, dst_buf, cp); attrset(A_NORMAL); #ifdef HAVE_WREDRAWLN wredrawln(stdscr, 0, LINES); #endif refresh(); } #ifndef HAVE_PCAP_DUMP_FLUSH int pcap_dump_flush(pcap_dumper_t *p) { if (fflush((FILE *)p) == EOF) return (-1); else return (0); } #endif int show_dump_open(ph, ns) const PCAP_HANDLER *ph; const NETSTAT *ns; { int op; struct bpf_program filter; bpf_u_int32 net; bpf_u_int32 mask; char name[100], buf[256]; /* sanity check */ if (!ph || !ns) return -1; show_dump_close(); if (!dump_match && (dump_match = (NETSTAT *)malloc(sizeof(NETSTAT))) == 0) { screen_status("%s: malloc: Out of memory?", ph->name); show_dump_close(); return -1; } memcpy(dump_match, ns, sizeof(NETSTAT)); if (ph->pcap) { /* open live packet capture */ buf[0] = '\0'; live_pcap = pcap_open_live(strcpy(name, ph->name), DUMP_SNAPLEN, promisc, 1, buf); if (buf[0] != '\0') screen_status("%s: %s", ph->name, buf); if (!live_pcap) return -1; #ifdef notdef if (pcap_setnonblock(live_pcap, 1, buf) < 0) { screen_status("%s: %s", ph->name, buf); show_dump_close(); return -1; } #endif /* setup filter expression */ if (pcap_lookupnet(strcpy(name, ph->name), &net, &mask, buf) < 0) { /* ignore error */ net = 0; mask = 0; } if (!build_filter_expr(buf, sizeof(buf), ns)) { screen_status("%s: Can't build filter expression", ph->name); show_dump_close(); return -1; } if (pcap_compile(live_pcap, &filter, buf, Oflag, mask) < 0) { screen_status("%s: %s", ph->name, pcap_geterr(live_pcap)); show_dump_close(); return -1; } op = pcap_setfilter(live_pcap, &filter); pcap_freecode(&filter); if (op < 0) { screen_status("%s: %s", ph->name, pcap_geterr(live_pcap)); show_dump_close(); return -1; } } else if ((cisco_netflow_dump = strdup(ph->name)) == 0) { screen_status("%s: strdup: Out of memory?", ph->name); show_dump_close(); return -1; } /* open pcap dump file for writing */ snprintf(buf, sizeof(buf), "%s/%s.XXXXXX", TEMP_DIR, progname); if ((op = mkstemp(buf)) < 0) { screen_status("%s: %s: %s", ph->name, buf, strerror(errno)); show_dump_close(); return -1; } (void)close(op); if ((dump_file = strdup(buf)) == 0) { screen_status("%s: strdup: Out of memory?", ph->name); show_dump_close(); return -1; } if (!cisco_netflow_dump) { if ((live_dump = pcap_dump_open(live_pcap, dump_file)) == 0) { screen_status("%s: %s", ph->name, pcap_geterr(live_pcap)); show_dump_close(); return -1; } pcap_dump_flush(live_dump); /* write header right now */ /* spawn thread to dump live packet capture into the file */ if ((live_pcap_thr = (pthread_t *)malloc(sizeof(pthread_t))) == 0) { screen_status("%s: malloc: Out of memory?", ph->name); show_dump_close(); return -1; } if (pthread_create(live_pcap_thr, 0, live_pcap_dump, 0)) { screen_status("%s: pthread_create: Out of resources?", ph->name); show_dump_close(); return -1; } /* open pcap dump file for reading */ if ((file_pcap = pcap_open_offline(dump_file, buf)) == 0) { screen_status("%s: %s", ph->name, buf); show_dump_close(); return -1; } } else if ((file_netflow = fopen(dump_file, "r")) == 0) { screen_status("%s: %s: %s", ph->name, dump_file, strerror(errno)); show_dump_close(); return -1; } scrollok(stdscr, 1); screen_clear(); print_mode(); return 0; } static void * live_pcap_dump() { int op; while (live_pcap && live_dump) { op = pcap_dispatch(live_pcap, -1, live_pcap_parse, (u_char *)live_dump); if (op == -2 || (op == -1 && errno != EAGAIN)) break; if (op < 1) usleep(1000); /* 1ms idle to prevent deadloop */ } return 0; } static void live_pcap_parse(a, h, p) u_char *a; const struct pcap_pkthdr *h; const u_char *p; { NETSTAT ns; /* sanity check */ if (!a || !live_pcap) return; memset(&ns, 0, sizeof(NETSTAT)); if (parse_dl(&ns, pcap_datalink(live_pcap), h->caplen, h->len, p) < 0) return; if (!netstat_match(&ns, dump_match)) return; pcap_dump(a, h, p); pcap_dump_flush((pcap_dumper_t *)a); } void show_dump_close() { if (cisco_netflow_dump) { free((char *)cisco_netflow_dump); cisco_netflow_dump = 0; } if (file_netflow) { (void)fclose(file_netflow); file_netflow = 0; } if (live_pcap_thr) { pthread_cancel(*live_pcap_thr); free(live_pcap_thr); live_pcap_thr = 0; } if (live_dump) { pcap_dump_close(live_dump); live_dump = 0; } if (live_pcap) { pcap_close(live_pcap); live_pcap = 0; } if (file_pcap) { pcap_close(file_pcap); file_pcap = 0; } if (dump_file) { (void)unlink(dump_file); free((char *)dump_file); dump_file = 0; } scrollok(stdscr, 0); } void show_dump_print(ph) PCAP_HANDLER *ph; { if (!cisco_netflow_dump) { int op; /* sanity check */ if (!file_pcap) return; clearerr(pcap_file(file_pcap)); /* tail file */ while ((op = pcap_dispatch(file_pcap, -1, file_pcap_parse, (u_char *)ph)) > 0); if (op < 0) { if (op == -1) screen_status(pcap_geterr(file_pcap)); return; } } else { char *cp, buf[256]; /* sanity check */ if (!file_netflow) return; clearerr(file_netflow); /* tail file */ while (fgets(buf, sizeof(buf), file_netflow) != 0) { buf[sizeof(buf)-1] = '\0'; if ((cp = strpbrk(buf, "\r\n")) != '\0') *cp = '\0'; printw("%s\n", buf); redraw_lines++; } } if (redraw_lines) { #ifdef HAVE_WREDRAWLN wredrawln(stdscr, 0, LINES); #endif refresh(); redraw_lines = 0; } } static void file_pcap_parse(a, h, p) u_char *a; const struct pcap_pkthdr *h; const u_char *p; { PCAP_HANDLER *ph = (PCAP_HANDLER *)a; FILE *fp; long sz; int hdrlen; NETSTAT ns; /* sanity check */ if (!file_pcap) return; /* prevent huge output */ if ((fp = pcap_file(file_pcap)) == 0 || (sz = fd_size(fileno(fp))) < 0) return; if (sz - ftell(fp) > DUMP_SNAPLEN * LINES) return; memset(&ns, 0, sizeof(NETSTAT)); hdrlen = parse_dl(&ns, pcap_datalink(file_pcap), h->caplen, h->len, p); if (hdrlen < 0 || hdrlen > h->caplen) return; if (!netstat_match(&ns, dump_match)) return; ns.mtime = h->ts; switch (show_stat_mode) { case Size: show_hex_dump(p + hdrlen, h->caplen - hdrlen); break; case Data: show_ascii_dump(p + hdrlen, h->caplen - hdrlen); break; case Packets: show_header_dump(ph, &ns); break; } } void show_dump_input(ch) int ch; { if (ch == 'c' || ch == 'C' || ch == K_CTRL('R')) screen_clear(); else if (show_stat_input(0, ch)) print_mode(); } static char * build_filter_expr(dst, size, ns) char *dst; int size; const NETSTAT *ns; { char src_addr[100], dst_addr[100]; src_addr[0] = '\0'; dst_addr[0] = '\0'; if (ns->ip_ver == 4) { (void)strcpy(src_addr, intoa(ns->ip_src_addr.ip_addr.s_addr)); (void)strcpy(dst_addr, intoa(ns->ip_dst_addr.ip_addr.s_addr)); } #ifdef INET6 else if (ns->ip_ver == 6) { (void)inet_ntop(AF_INET6, &ns->ip_src_addr.ip6_addr, src_addr, sizeof(src_addr)); (void)inet_ntop(AF_INET6, &ns->ip_dst_addr.ip6_addr, dst_addr, sizeof(dst_addr)); } #endif else if (ns->eth_type) { (void)strcpy(src_addr, etheraddr_string(ns->eth_src_addr)); (void)strcpy(dst_addr, etheraddr_string(ns->eth_dst_addr)); } if (src_addr[0] == '\0' || dst_addr[0] == '\0') return 0; /* should not happen */ if (ns->ip_ver) { snprintf(dst, size, "src %s and dst %s", src_addr, dst_addr); } else if (!strcmp(dst_addr, "broadcast") || !strcmp(dst_addr, "multicast")) { snprintf(dst, size, "ether src %s and ether %s", src_addr, dst_addr); } else { snprintf(dst, size, "ether src %s and ether dst %s", src_addr, dst_addr); } return dst; } static void show_header_dump(ph, ns) PCAP_HANDLER *ph; const NETSTAT *ns; { char time_buf[100], src_buf[100], dst_buf[100], proto_buf[20]; #ifdef notdef NETSTAT find = *ns; if (netstat_find(ph, &find)) ns = &find; #endif (void)strftime(time_buf, sizeof(time_buf), "%T", localtime((time_t *)&ns->mtime.tv_sec)); hdr2str(&ns->ns_hdr, src_buf, sizeof(src_buf), dst_buf, sizeof(dst_buf), proto_buf, sizeof(proto_buf)); printw("\n%s.%03d %s %s > %s %d/%d bytes", time_buf, (int)(ns->mtime.tv_usec / 1000), proto_buf, src_buf, dst_buf, (int)ns->pkt_len, (int)ns->data_len); redraw_lines++; } static void show_ascii_dump(cp, length) const u_char *cp; int length; { /* sanity check */ if (!cp || length < 1) return; if (!redraw_lines) addch('\n'); while (--length >= 0) { if (*cp != '\r' && *cp != '\b') addch(*cp); cp++; } redraw_lines++; } #ifdef ACS_VLINE #define VLINE ACS_VLINE #else #define VLINE '|' #endif /* stolen from tcpdump's ascii-print() */ #define HEXDUMP_BYTES_PER_LINE 16 #define HEXDUMP_SHORTS_PER_LINE (HEXDUMP_BYTES_PER_LINE / 2) #define HEXDUMP_HEXSTUFF_PER_SHORT 5 /* 4 hex digits and a space */ #define HEXDUMP_HEXSTUFF_PER_LINE \ (HEXDUMP_HEXSTUFF_PER_SHORT * HEXDUMP_SHORTS_PER_LINE) static void show_hex_dump(cp, length) const u_char *cp; int length; { int oset = 0; register u_int i; register int s1, s2; register int nshorts; char hexstuff[HEXDUMP_SHORTS_PER_LINE*HEXDUMP_HEXSTUFF_PER_SHORT+1], *hsp; char asciistuff[100], *asp; u_int maxlength = HEXDUMP_SHORTS_PER_LINE; /* sanity check */ if (!cp || length < 1) return; nshorts = length / sizeof(u_short); i = 0; hsp = hexstuff; asp = asciistuff; while (--nshorts >= 0) { s1 = *cp++; s2 = *cp++; (void)snprintf(hsp, sizeof(hexstuff) - (hsp - hexstuff), " %02x%02x", s1, s2); hsp += HEXDUMP_HEXSTUFF_PER_SHORT; *(asp++) = (isgraph(s1) ? s1 : '.'); *(asp++) = (isgraph(s2) ? s2 : '.'); if (++i >= maxlength) { i = 0; *hsp = *asp = '\0'; printw("\n0x%04X ", oset); addch(VLINE); printw("%-*s ", HEXDUMP_HEXSTUFF_PER_LINE, hexstuff); addch(VLINE); addch(' '); addstr(asciistuff); hsp = hexstuff; asp = asciistuff; oset += HEXDUMP_BYTES_PER_LINE; redraw_lines++; } } if (length & 1) { s1 = *cp++; (void)snprintf(hsp, sizeof(hexstuff) - (hsp - hexstuff), " %02x", s1); hsp += 3; *(asp++) = (isgraph(s1) ? s1 : '.'); ++i; } if (i > 0) { *hsp = *asp = '\0'; printw("\n0x%04X ", oset); addch(VLINE); printw("%-*s ", HEXDUMP_HEXSTUFF_PER_LINE, hexstuff); addch(VLINE); addch(' '); addstr(asciistuff); redraw_lines++; } } netdiag-1.2/trafshow-5.2.3/show_dump.h000066400000000000000000000013121323731111400174360ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SHOW_DUMP_H_ #define _SHOW_DUMP_H_ #define DUMP_SNAPLEN 1536 struct pcap_handler; struct netstat; int show_dump_open(const struct pcap_handler *ph, const struct netstat *ns); void show_dump_print(struct pcap_handler *ph); void show_dump_close(void); void show_dump_input(int ch); extern const char *dump_file; extern const char *cisco_netflow_dump; extern struct netstat *dump_match; #endif /* !_SHOW_DUMP_H_ */ netdiag-1.2/trafshow-5.2.3/show_if.c000066400000000000000000000065441323731111400170760ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "show_if.h" #include "trafshow.h" #include "screen.h" #include "selector.h" #include "addrtoname.h" #ifdef notdef static void addr2str(const pcap_addr_t *ap, char *addr_buf, int addr_len); #endif static void scale_size(name, addr, descr) int *name, *addr, *descr; { *name = line_factor * (double)SHOW_IF_NAME; *addr = line_factor * (double)SHOW_IF_ADDR; *descr = line_factor * (double)SHOW_IF_DESCR; } static int show_if_header(dst, size, unused) char *dst; int size; const void *unused; { int name_sz, addr_sz, desc_sz; /* sanity check */ if (!dst || size < 1 || unused) return 0; scale_size(&name_sz, &addr_sz, &desc_sz); snprintf(dst, size, "%-*.*s %-*.*s %-*.*s", name_sz, name_sz, "Interface", addr_sz, addr_sz, "Address", desc_sz, desc_sz, "Description"); return 0; } #ifdef notdef /* extract list of interface addr/mask pairs */ static void addr2str(ap, addr_buf, addr_len) const pcap_addr_t *ap; char *addr_buf; int addr_len; { int i, rest; char *cp; *addr_buf = '\0'; cp = addr_buf; rest = addr_len - 1; for (; ap && rest > 0; ap = ap->next) { if (ap->addr) { if (*addr_buf) { *cp++ = ' '; *cp = '\0'; rest--; } if (satoa(ap->addr, cp, rest)) { i = strlen(cp); cp += i; rest -= i; } } if (ap->netmask) { if (*addr_buf) { *cp++ = ' '; *cp = '\0'; rest--; } if (satoa(ap->netmask, cp, rest)) { i = strlen(cp); cp += i; rest -= i; } } } } #endif static int show_if_line(dst, size, ph, idx) char *dst; int size; const PCAP_HANDLER *ph; int idx; { int i, name_sz, addr_sz, desc_sz; /* sanity check */ if (!dst || size < 1) return 0; *dst = '\0'; for (i = 0; ph; ph = ph->next) { if (i++ == idx) break; } if (!ph) return 0; scale_size(&name_sz, &addr_sz, &desc_sz); snprintf(dst, size, "%-*.*s %-*.*s %-*.*s", name_sz, name_sz, ph->name, addr_sz, addr_sz, ph->addrstr, desc_sz, desc_sz, ph->descr ? ph->descr : ""); return 0; } static int show_if_footer(dst, size, unused) char *dst; int size; const void *unused; { /* sanity check */ if (!dst || size < 1 || unused) return 0; (void)strncpy(dst, hostname, size); dst[size-1] = '\0'; return 0; } SELECTOR * show_if_selector() { static SELECTOR *sp = 0; if (!sp && (sp = selector_init()) != 0) { sp->get_header = show_if_header; sp->get_line = show_if_line; sp->get_footer = show_if_footer; } return sp; } int show_if_search(ph, str) PCAP_HANDLER *ph; const char *str; { int idx; /* sanity check */ if (!str || *str == '\0') return -1; for (idx = 0; ph; ph = ph->next, idx++) { if (strstr(ph->name, str)) return idx; if (strstr(ph->addrstr, str)) return idx; } return -1; } SELECTOR * show_if_list(ph) PCAP_HANDLER *ph; { SELECTOR *sp; /* sanity check */ if (!ph || (sp = show_if_selector()) == 0) return 0; sp->header = 0; /* unused */ sp->footer = 0; /* unused */ sp->list = ph; sp->items = 0; for (; ph; ph = ph->next) sp->items++; return sp; } netdiag-1.2/trafshow-5.2.3/show_if.h000066400000000000000000000011631323731111400170730ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SHOW_IF_H_ #define _SHOW_IF_H_ #define SHOW_IF_NAME 15 #define SHOW_IF_ADDR 45 #define SHOW_IF_DESCR 20 struct selector; struct pcap_handler; struct selector *show_if_list(struct pcap_handler *list); struct selector *show_if_selector(); int show_if_search(struct pcap_handler *list, const char *str); #endif /* !_SHOW_IF_H_ */ netdiag-1.2/trafshow-5.2.3/show_stat.c000066400000000000000000000337641323731111400174570ustar00rootroot00000000000000/* * Copyright (c) 1998,2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "show_stat.h" #include "trafshow.h" #include "screen.h" #include "selector.h" #include "netstat.h" #include "getkey.h" #include "addrtoname.h" ShowStatMode show_stat_mode = Size; static int find_backflow(NETSTAT **list, int items, NETSTAT *at); static void sort_backflow(NETSTAT **list, int items); static void scale_size(addr, prot, data, rate) int *addr, *prot, *data, *rate; { *addr = line_factor * (double)SHOW_STAT_ADDR; *prot = line_factor * (double)SHOW_STAT_PROT; *data = line_factor * (double)SHOW_STAT_DATA; *rate = line_factor * (double)SHOW_STAT_RATE; } static int compare_pkt_len(p1, p2) register const NETSTAT **p1, **p2; { if ((*p1)->pkt_len > (*p2)->pkt_len) return -1; if ((*p1)->pkt_len < (*p2)->pkt_len) return 1; return 0; } static int compare_data_len(p1, p2) register const NETSTAT **p1, **p2; { if ((*p1)->data_len > (*p2)->data_len) return -1; if ((*p1)->data_len < (*p2)->data_len) return 1; return 0; } static int compare_pkt_cnt(p1, p2) register const NETSTAT **p1, **p2; { if ((*p1)->pkt_cnt > (*p2)->pkt_cnt) return -1; if ((*p1)->pkt_cnt < (*p2)->pkt_cnt) return 1; return 0; } static int find_backflow(list, items, at) NETSTAT **list; int items; NETSTAT *at; { int i; /* sanity check */ if (!list || items < 1 || !at) return -1; for (i = 0; i < items; i++) { if (netstat_bidir(at, list[i])) return i; } return -1; } /* too bad implementation -- it take alot of CPU cycles like deadloop. XXX */ static void sort_backflow(list, items) NETSTAT **list; int items; { int i = 0, at; NETSTAT *ns; while (i < items-1) { ns = list[i++]; if ((at = find_backflow(&list[i], items - i, ns)) < 0) continue; if (at) { ns = list[i + at]; memmove(&list[i + 1], &list[i], at * sizeof(NETSTAT *)); list[i] = ns; } i++; } } /* * Pretty print an Internet address (net address + port). */ static char * ip_print(ver, proto, addr, dst, size) int ver; int proto; const struct ip_address *addr; char *dst; int size; { const char *cp = 0; char buf[100]; if (ver == 4 && addr->ip_addr.s_addr) { /*cp = intoa(addr->ip_addr.s_addr);*/ cp = ipaddr_string(&addr->ip_addr); } #ifdef INET6 else if (ver == 6 && !IN6_IS_ADDR_UNSPECIFIED(&addr->ip6_addr)) { /*cp = inet_ntop(AF_INET6, &addr->ip6_addr, buf, sizeof(buf));*/ cp = ip6addr_string(&addr->ip6_addr); } #endif if (cp) { (void)strncpy(dst, cp, size); dst[size-1] = '\0'; } else snprintf(dst, size, "IPv%d", ver); if (addr->ip_port) { char pb[20]; int len; switch (proto) { case IPPROTO_TCP: if (nflag) { sprintf(pb, "%d", ntohs(addr->ip_port)); cp = pb; } else cp = tcpport_string(ntohs(addr->ip_port)); break; case IPPROTO_UDP: if (nflag) { sprintf(pb, "%d", ntohs(addr->ip_port)); cp = pb; } else cp = udpport_string(ntohs(addr->ip_port)); break; case IPPROTO_ICMP: if (nflag) { sprintf(pb, "%04x", addr->ip_port - 1); cp = pb; } else cp = icmp_string(addr->ip_port - 1); break; #ifdef INET6 case IPPROTO_ICMPV6: if (nflag) { sprintf(pb, "%04x", addr->ip_port - 1); cp = pb; } else cp = icmpv6_string(addr->ip_port - 1); break; #endif default: /* nonsense, but be strong */ sprintf(pb, "%d", ntohs(addr->ip_port)); cp = pb; } buf[0] = ','; (void)strncpy(&buf[1], cp, 10); buf[11] = '\0'; len = strlen(buf); if (strlen(dst) + len < size) (void)strcat(dst, buf); else (void)strcpy(&dst[size - len - 1], buf); } return dst; } static char * sap_print(addr, sap, dst, size) const u_char *addr; u_char sap; char *dst; int size; { char buf[20]; int len; (void)strncpy(dst, etheraddr_string(addr), size); dst[size-1] = '\0'; buf[0] = '/'; if (nflag) sprintf(&buf[1], "sap-%02x", sap & 0xff); else (void)strncpy(&buf[1], llcsap_string(sap), 10); buf[11] = '\0'; len = strlen(buf); if (strlen(dst) + len < size) (void)strcat(dst, buf); else (void)strcpy(&dst[size - len - 1], buf); return dst; } void hdr2str(nh, src_buf, src_len, dst_buf, dst_len, proto_buf, proto_len) const struct netstat_header *nh; char *src_buf, *dst_buf, *proto_buf; int src_len, dst_len, proto_len; { const NETSTAT *ns; if (src_buf) *src_buf = '\0'; if (dst_buf) *dst_buf = '\0'; if (proto_buf) *proto_buf = '\0'; /* sanity check */ if (!nh) return; ns = (NETSTAT *)nh; if (ns->ip_ver) { if (src_buf && src_len > 1) { ip_print(ns->ip_ver, ns->ip_proto, &ns->ip_src_addr, src_buf, src_len); } if (dst_buf && dst_len > 1) { ip_print(ns->ip_ver, ns->ip_proto, &ns->ip_dst_addr, dst_buf, dst_len); } if (proto_buf && proto_len > 1) { if (nflag) snprintf(proto_buf, proto_len, "%d", (int)ns->ip_proto); else (void)strncpy(proto_buf, ipproto_string(ns->ip_proto), proto_len); proto_buf[proto_len-1] = '\0'; } } else if (ntohs(ns->eth_type) > 1500) { /* Ethernet II (DIX) */ if (src_buf && src_len > 1) { (void)strncpy(src_buf, etheraddr_string(ns->eth_src_addr), src_len); src_buf[src_len-1] = '\0'; } if (dst_buf && dst_len > 1) { (void)strncpy(dst_buf, etheraddr_string(ns->eth_dst_addr), dst_len); dst_buf[dst_len-1] = '\0'; } if (proto_buf && proto_len > 1) { if (nflag) snprintf(proto_buf, proto_len, "%04x", ntohs(ns->eth_type)); else (void)strncpy(proto_buf, ethertype_string(ns->eth_type), proto_len); proto_buf[proto_len-1] = '\0'; } } else if (ns->eth_ssap == ns->eth_dsap) { if (src_buf && src_len > 1) { (void)strncpy(src_buf, etheraddr_string(ns->eth_src_addr), src_len); src_buf[src_len-1] = '\0'; } if (dst_buf && dst_len > 1) { (void)strncpy(dst_buf, etheraddr_string(ns->eth_dst_addr), dst_len); dst_buf[dst_len-1] = '\0'; } if (proto_buf && proto_len > 1) { if (nflag) snprintf(proto_buf, proto_len, "sap-%02x", (int)(ns->eth_ssap & 0xff)); else (void)strncpy(proto_buf, llcsap_string(ns->eth_ssap), proto_len); proto_buf[proto_len-1] = '\0'; } } else { if (src_buf && src_len > 1) { sap_print(ns->eth_src_addr, ns->eth_ssap, src_buf, src_len); } if (dst_buf && dst_len > 1) { sap_print(ns->eth_dst_addr, ns->eth_dsap, dst_buf, dst_len); } if (proto_buf && proto_len > 1) { (void)strncpy(proto_buf, "802.3", proto_len); proto_buf[proto_len-1] = '\0'; } } } static int show_stat_header(dst, size, ph) char *dst; int size; const PCAP_HANDLER *ph; { int addr_sz, prot_sz, data_sz, rate_sz; char src_buf[100], dst_buf[100]; const char *data_ptr, *rate_ptr; /* sanity check */ if (!dst || size < 1 || !ph) return 0; scale_size(&addr_sz, &prot_sz, &data_sz, &rate_sz); (void)strcpy(src_buf, "Source"); (void)strcpy(dst_buf, "Destination"); if (ph->masklen >= 0) { sprintf(src_buf + strlen(src_buf), "/%d", ph->masklen); sprintf(dst_buf + strlen(dst_buf), "/%d", ph->masklen); } data_ptr = rate_ptr = "?"; switch (show_stat_mode) { case Size: data_ptr = "Size"; rate_ptr = "CPS"; break; case Data: data_ptr = "Data"; rate_ptr = "CPS"; break; case Packets: data_ptr = "Packets"; rate_ptr = "PPS"; break; } snprintf(dst, size, "%-*.*s %-*.*s %-*.*s %-*.*s %-*.*s", addr_sz, addr_sz, src_buf, addr_sz, addr_sz, dst_buf, prot_sz, prot_sz, "Protocol", data_sz, data_sz, data_ptr, rate_sz, rate_sz, rate_ptr); return 0; } static int show_stat_line(dst, size, ns_list, idx) char *dst; int size; const NETSTAT **ns_list; int idx; { int addr_sz, prot_sz, data_sz, rate_sz; const NETSTAT *ns; char src_buf[100], dst_buf[100], proto_buf[20], data_buf[20], rate_buf[20]; /* sanity check */ if (!dst || size < 1 || !ns_list) return 0; ns = ns_list[idx]; scale_size(&addr_sz, &prot_sz, &data_sz, &rate_sz); hdr2str(&ns->ns_hdr, src_buf, MIN(sizeof(src_buf), addr_sz + 1), dst_buf, MIN(sizeof(dst_buf), addr_sz + 1), proto_buf, MIN(sizeof(proto_buf), prot_sz + 1)); data_buf[0] = '\0'; rate_buf[0] = '\0'; switch (show_stat_mode) { case Size: if (ns->pkt_len >= 10000) snprintf(data_buf, sizeof(data_buf), "%uK", ns->pkt_len / 1024); else snprintf(data_buf, sizeof(data_buf), "%u", ns->pkt_len); if (ns->pkt_len_rate >= 10000) snprintf(rate_buf, sizeof(rate_buf), "%uK", ns->pkt_len_rate / 1024); else if (ns->pkt_len_rate > 0) snprintf(rate_buf, sizeof(rate_buf), "%u", ns->pkt_len_rate); break; case Data: if (ns->data_len >= 10000) snprintf(data_buf, sizeof(data_buf), "%uK", ns->data_len / 1024); else snprintf(data_buf, sizeof(data_buf), "%u", ns->data_len); if (ns->data_len_rate >= 10000) snprintf(rate_buf, sizeof(rate_buf), "%uK", ns->data_len_rate / 1024); else if (ns->data_len_rate > 0) snprintf(rate_buf, sizeof(rate_buf), "%u", ns->data_len_rate); break; case Packets: snprintf(data_buf, sizeof(data_buf), "%u", ns->pkt_cnt); if (ns->pkt_cnt_rate > 0) snprintf(rate_buf, sizeof(rate_buf), "%u", ns->pkt_cnt_rate); break; } snprintf(dst, size, "%-*.*s %-*.*s %-*.*s %-*.*s %-*.*s", addr_sz, addr_sz, src_buf, addr_sz, addr_sz, dst_buf, prot_sz, prot_sz, proto_buf, data_sz, data_sz, data_buf, rate_sz, rate_sz, rate_buf); return ns->attr; } static int show_stat_footer(dst, size, ph) char *dst; int size; const PCAP_HANDLER *ph; { const PCAP_HANDLER *top; int addr_sz, prot_sz, data_sz, rate_sz, depth; u_int64_t total = 0, rate = 0; char stat_buf[50], data_buf[20], rate_buf[20]; /* sanity check */ if (!dst || size < 1 || !ph) return 0; scale_size(&addr_sz, &prot_sz, &data_sz, &rate_sz); depth = 0; for (top = ph->top; top; top = top->top) depth++; if (depth) { snprintf(stat_buf, sizeof(stat_buf), "%d Flows (depth %d)", netstat_count(ph), depth); } else { snprintf(stat_buf, sizeof(stat_buf), "%d Flows", netstat_count(ph)); } switch (show_stat_mode) { case Size: total = ph->pkt_len; rate = ph->pkt_len_rate; break; case Data: total = ph->data_len; rate = ph->data_len_rate; break; case Packets: total = ph->pkt_cnt; rate = ph->pkt_cnt_rate; break; } if (total >= 10000000) snprintf(data_buf, sizeof(data_buf), "%uM", (unsigned int)(total / (1024 * 1024))); else if (total >= 10000) snprintf(data_buf, sizeof(data_buf), "%uK", (unsigned int)(total / 1024)); else snprintf(data_buf, sizeof(data_buf), "%u", (unsigned int)total); if (rate >= 10000000) snprintf(rate_buf, sizeof(rate_buf), "%uM", (unsigned int)(rate / (1024 * 1024))); else if (rate >= 10000) snprintf(rate_buf, sizeof(rate_buf), "%uK", (unsigned int)(rate / 1024)); else snprintf(rate_buf, sizeof(rate_buf), "%u", (unsigned int)rate); snprintf(dst, size, "%-*.*s %-*.*s %-*.*s %-*.*s %-*.*s", addr_sz, addr_sz, ph->name, addr_sz, addr_sz, stat_buf, prot_sz, prot_sz, "Total:", data_sz, data_sz, data_buf, rate_sz, rate_sz, rate_buf); return 0; } int show_stat_input(ph, ch) PCAP_HANDLER *ph; int ch; { switch (ch) { case '[': /* rotate list mode left */ case K_LEFT: if (show_stat_mode == Size) show_stat_mode = Packets; else show_stat_mode--; return 1; case ']': /* rotate list mode right */ case K_RIGHT: if (show_stat_mode == Packets) show_stat_mode = Size; else show_stat_mode++; return 1; case K_CTRL('R'): /* reset current netstat hash */ if (ph) { netstat_purge(ph, 0); show_stat_list(ph); return 1; } break; case K_TAB: /* follow to backflow */ if (ph) { SELECTOR *sp = show_stat_selector(ph); int idx = selector_get(sp); if (idx >= 0) { NETSTAT **ns_list = (NETSTAT **)sp->list; const NETSTAT *ns = ns_list[idx]; for (idx = 0; idx < sp->items; idx++) { if (netstat_bidir(ns, ns_list[idx])) { selector_set(idx, sp); return 1; } } } } break; } return 0; } SELECTOR * show_stat_selector(ph) PCAP_HANDLER *ph; { if (!ph) return 0; if (!ph->selector && (ph->selector = selector_init()) != 0) { ph->selector->get_header = show_stat_header; ph->selector->get_line = show_stat_line; ph->selector->get_footer = show_stat_footer; } return ph->selector; } NETSTAT * show_stat_get(ph, idx) PCAP_HANDLER *ph; int idx; { SELECTOR *sp; NETSTAT **ns_list; /* sanity check */ if (!ph || idx < 0 || (sp = show_stat_selector(ph)) == 0 || idx >= sp->items) return 0; ns_list = (NETSTAT **)sp->list; return ns_list[idx]; } int show_stat_search(ph, str) PCAP_HANDLER *ph; const char *str; { SELECTOR *sp; NETSTAT **ns_list; const NETSTAT *ns; int idx; char src_buf[100], dst_buf[100], proto_buf[20]; /* sanity check */ if (!ph || !str || *str == '\0' || (sp = show_stat_selector(ph)) == 0) return -1; ns_list = (NETSTAT **)sp->list; for (idx = 0; idx < sp->items; idx++) { ns = ns_list[idx]; hdr2str(&ns->ns_hdr, src_buf, sizeof(src_buf), dst_buf, sizeof(dst_buf), proto_buf, sizeof(proto_buf)); if (strstr(src_buf, str) || strstr(dst_buf, str) || strstr(proto_buf, str)) return idx; } return -1; } SELECTOR * show_stat_list(ph) PCAP_HANDLER *ph; { SELECTOR *sp; int cnt; /* sanity check */ if (!ph || (sp = show_stat_selector(ph)) == 0) return 0; sp->header = ph; sp->footer = ph; if ((cnt = netstat_fetch((NETSTAT ***)&sp->list, ph)) < 0) return sp; sp->items = cnt; if (cnt < 2) /* no sorting required */ return sp; /* sort it accroding to current mode */ switch (show_stat_mode) { case Size: qsort(sp->list, sp->items, sizeof(NETSTAT *), compare_pkt_len); break; case Data: qsort(sp->list, sp->items, sizeof(NETSTAT *), compare_data_len); break; case Packets: qsort(sp->list, sp->items, sizeof(NETSTAT *), compare_pkt_cnt); break; } if (popbackflow) sort_backflow(sp->list, sp->items); return sp; } netdiag-1.2/trafshow-5.2.3/show_stat.h000066400000000000000000000021011323731111400174410ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _SHOW_STAT_H_ #define _SHOW_STAT_H_ #define SHOW_STAT_ADDR 25 /* size * 2 */ #define SHOW_STAT_PROT 10 #define SHOW_STAT_DATA 10 #define SHOW_STAT_RATE 10 typedef enum { Size, Data, Packets } ShowStatMode; extern ShowStatMode show_stat_mode; struct selector; struct pcap_handler; struct netstat_header; struct selector *show_stat_list(struct pcap_handler *ph); int show_stat_input(struct pcap_handler *ph, int ch); struct selector *show_stat_selector(struct pcap_handler *ph); struct netstat *show_stat_get(struct pcap_handler *ph, int at); int show_stat_search(struct pcap_handler *ph, const char *str); void hdr2str(const struct netstat_header *nh, char *src_buf, int src_len, char *dst_buf, int dst_len, char *proto_buf, int proto_len); #endif /* !_SHOW_STAT_H_ */ netdiag-1.2/trafshow-5.2.3/sll.h000066400000000000000000000127471323731111400162410ustar00rootroot00000000000000/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. * * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.7 2002/12/11 07:14:11 guy Exp $ (LBL) */ /* * For captures on Linux cooked sockets, we construct a fake header * that includes: * * a 2-byte "packet type" which is one of: * * LINUX_SLL_HOST packet was sent to us * LINUX_SLL_BROADCAST packet was broadcast * LINUX_SLL_MULTICAST packet was multicast * LINUX_SLL_OTHERHOST packet was sent to somebody else * LINUX_SLL_OUTGOING packet was sent *by* us; * * a 2-byte Ethernet protocol field; * * a 2-byte link-layer type; * * a 2-byte link-layer address length; * * an 8-byte source link-layer address, whose actual length is * specified by the previous value. * * All fields except for the link-layer address are in network byte order. * * DO NOT change the layout of this structure, or change any of the * LINUX_SLL_ values below. If you must change the link-layer header * for a "cooked" Linux capture, introduce a new DLT_ type (ask * "tcpdump-workers@tcpdump.org" for one, so that you don't give it a * value that collides with a value already being used), and use the * new header in captures of that type, so that programs that can * handle DLT_LINUX_SLL captures will continue to handle them correctly * without any change, and so that capture files with different headers * can be told apart and programs that read them can dissect the * packets in them. * * This structure, and the #defines below, must be the same in the * libpcap and tcpdump versions of "sll.h". */ /* * A DLT_LINUX_SLL fake link-layer header. */ #define SLL_HDR_LEN 16 /* total header length */ #define SLL_ADDRLEN 8 /* length of address field */ struct sll_header { u_int16_t sll_pkttype; /* packet type */ u_int16_t sll_hatype; /* link-layer address type */ u_int16_t sll_halen; /* link-layer address length */ u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ u_int16_t sll_protocol; /* protocol */ }; /* * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the * PACKET_ values on Linux, but are defined here so that they're * available even on systems other than Linux, and so that they * don't change even if the PACKET_ values change. */ #define LINUX_SLL_HOST 0 #define LINUX_SLL_BROADCAST 1 #define LINUX_SLL_MULTICAST 2 #define LINUX_SLL_OTHERHOST 3 #define LINUX_SLL_OUTGOING 4 /* * The LINUX_SLL_ values for "sll_protocol"; these correspond to the * ETH_P_ values on Linux, but are defined here so that they're * available even on systems other than Linux. We assume, for now, * that the ETH_P_ values won't change in Linux; if they do, then: * * if we don't translate them in "pcap-linux.c", capture files * won't necessarily be readable if captured on a system that * defines ETH_P_ values that don't match these values; * * if we do translate them in "pcap-linux.c", that makes life * unpleasant for the BPF code generator, as the values you test * for in the kernel aren't the values that you test for when * reading a capture file, so the fixup code run on BPF programs * handed to the kernel ends up having to do more work. * * Add other values here as necessary, for handling packet types that * might show up on non-Ethernet, non-802.x networks. (Not all the ones * in the Linux "if_ether.h" will, I suspect, actually show up in * captures.) */ #define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */ #define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */ netdiag-1.2/trafshow-5.2.3/snprintf.c000066400000000000000000000267351323731111400173070ustar00rootroot00000000000000#ifndef SNPRINTF_C #define SNPRINTF_C #include "config.h" /* This source code are distributed under following license: */ /* * Copyright (c) 1995 - 2000 Kungliga Tekniska H?gskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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. */ #include #include #include #include #include #include #include "snprintf.h" #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) enum format_flags { minus_flag = 1, plus_flag = 2, space_flag = 4, alternate_flag = 8, zero_flag = 16 }; /* * Common state */ struct state { unsigned char *str; unsigned char *s; unsigned char *theend; size_t sz; size_t max_sz; int (*append_char)(struct state *, unsigned char); int (*reserve)(struct state *, size_t); /* XXX - methods */ }; static int sn_reserve (struct state *state, size_t n) { return state->s + n > state->theend; } static int sn_append_char (struct state *state, unsigned char c) { if (sn_reserve (state, 1)) { return 1; } else { *state->s++ = c; return 0; } } static int as_reserve (struct state *state, size_t n) { if (state->s + n > state->theend) { int off = state->s - state->str; unsigned char *tmp; if (state->max_sz && state->sz >= state->max_sz) return 1; state->sz = max(state->sz * 2, state->sz + n); if (state->max_sz) state->sz = min(state->sz, state->max_sz); tmp = realloc (state->str, state->sz); if (tmp == NULL) return 1; state->str = tmp; state->s = state->str + off; state->theend = state->str + state->sz - 1; } return 0; } static int as_append_char (struct state *state, unsigned char c) { if(as_reserve (state, 1)) return 1; else { *state->s++ = c; return 0; } } static int append_number(struct state *state, unsigned long num, unsigned base, char *rep, int width, int prec, int flags, int minusp) { int len = 0; int i; /* given precision, ignore zero flag */ if(prec != -1) flags &= ~zero_flag; else prec = 1; /* zero value with zero precision -> "" */ if(prec == 0 && num == 0) return 0; do{ if((*state->append_char)(state, rep[num % base])) return 1; len++; num /= base; }while(num); prec -= len; /* pad with prec zeros */ while(prec-- > 0){ if((*state->append_char)(state, '0')) return 1; len++; } /* add length of alternate prefix (added later) to len */ if(flags & alternate_flag && (base == 16 || base == 8)) len += base / 8; /* pad with zeros */ if(flags & zero_flag){ width -= len; if(minusp || (flags & space_flag) || (flags & plus_flag)) width--; while(width-- > 0){ if((*state->append_char)(state, '0')) return 1; len++; } } /* add alternate prefix */ if(flags & alternate_flag && (base == 16 || base == 8)){ if(base == 16) if((*state->append_char)(state, rep[10] + 23)) /* XXX */ return 1; if((*state->append_char)(state, '0')) return 1; } /* add sign */ if(minusp){ if((*state->append_char)(state, '-')) return 1; len++; } else if(flags & plus_flag) { if((*state->append_char)(state, '+')) return 1; len++; } else if(flags & space_flag) { if((*state->append_char)(state, ' ')) return 1; len++; } if(flags & minus_flag) /* swap before padding with spaces */ for(i = 0; i < len / 2; i++){ char c = state->s[-i-1]; state->s[-i-1] = state->s[-len+i]; state->s[-len+i] = c; } width -= len; while(width-- > 0){ if((*state->append_char)(state, ' ')) return 1; len++; } if(!(flags & minus_flag)) /* swap after padding with spaces */ for(i = 0; i < len / 2; i++){ char c = state->s[-i-1]; state->s[-i-1] = state->s[-len+i]; state->s[-len+i] = c; } return 0; } static int append_string (struct state *state, unsigned char *arg, int width, int prec, int flags) { if(prec != -1) width -= prec; else width -= strlen((char *)arg); if(!(flags & minus_flag)) while(width-- > 0) if((*state->append_char) (state, ' ')) return 1; if (prec != -1) { while (*arg && prec--) if ((*state->append_char) (state, *arg++)) return 1; } else { while (*arg) if ((*state->append_char) (state, *arg++)) return 1; } if(flags & minus_flag) while(width-- > 0) if((*state->append_char) (state, ' ')) return 1; return 0; } static int append_char(struct state *state, unsigned char arg, int width, int flags) { while(!(flags & minus_flag) && --width > 0) if((*state->append_char) (state, ' ')) return 1; if((*state->append_char) (state, arg)) return 1; while((flags & minus_flag) && --width > 0) if((*state->append_char) (state, ' ')) return 1; return 0; } /* * This can't be made into a function... */ #define PARSE_INT_FORMAT(res, arg, unsig) \ if (long_flag) \ res = (unsig long)va_arg(arg, unsig long); \ else if (short_flag) \ res = (unsig short)va_arg(arg, unsig int); \ else \ res = (unsig int)va_arg(arg, unsig int) /* * zyxprintf - return 0 or -1 */ static int xyzprintf (struct state *state, const char *char_format, va_list ap) { const unsigned char *format = (const unsigned char *)char_format; unsigned char c; while((c = *format++)) { if (c == '%') { int flags = 0; int width = 0; int prec = -1; int long_flag = 0; int short_flag = 0; /* flags */ while((c = *format++)){ if(c == '-') flags |= minus_flag; else if(c == '+') flags |= plus_flag; else if(c == ' ') flags |= space_flag; else if(c == '#') flags |= alternate_flag; else if(c == '0') flags |= zero_flag; else break; } if((flags & space_flag) && (flags & plus_flag)) flags ^= space_flag; if((flags & minus_flag) && (flags & zero_flag)) flags ^= zero_flag; /* width */ if (isdigit(c)) do { width = width * 10 + c - '0'; c = *format++; } while(isdigit(c)); else if(c == '*') { width = va_arg(ap, int); c = *format++; } /* precision */ if (c == '.') { prec = 0; c = *format++; if (isdigit(c)) do { prec = prec * 10 + c - '0'; c = *format++; } while(isdigit(c)); else if (c == '*') { prec = va_arg(ap, int); c = *format++; } } /* size */ if (c == 'h') { short_flag = 1; c = *format++; } else if (c == 'l') { long_flag = 1; c = *format++; } switch (c) { case 'c' : if(append_char(state, va_arg(ap, int), width, flags)) return -1; break; case 's' : if (append_string(state, va_arg(ap, unsigned char*), width, prec, flags)) return -1; break; case 'd' : case 'i' : { long arg; unsigned long num; int minusp = 0; PARSE_INT_FORMAT(arg, ap, signed); if (arg < 0) { minusp = 1; num = -arg; } else num = arg; if (append_number (state, num, 10, "0123456789", width, prec, flags, minusp)) return -1; break; } case 'u' : { unsigned long arg; PARSE_INT_FORMAT(arg, ap, unsigned); if (append_number (state, arg, 10, "0123456789", width, prec, flags, 0)) return -1; break; } case 'o' : { unsigned long arg; PARSE_INT_FORMAT(arg, ap, unsigned); if (append_number (state, arg, 010, "01234567", width, prec, flags, 0)) return -1; break; } case 'x' : { unsigned long arg; PARSE_INT_FORMAT(arg, ap, unsigned); if (append_number (state, arg, 0x10, "0123456789abcdef", width, prec, flags, 0)) return -1; break; } case 'X' :{ unsigned long arg; PARSE_INT_FORMAT(arg, ap, unsigned); if (append_number (state, arg, 0x10, "0123456789ABCDEF", width, prec, flags, 0)) return -1; break; } case 'p' : { unsigned long arg = (unsigned long)va_arg(ap, void*); if (append_number (state, arg, 0x10, "0123456789ABCDEF", width, prec, flags, 0)) return -1; break; } case 'n' : { int *arg = va_arg(ap, int*); *arg = state->s - state->str; break; } case '\0' : --format; /* FALLTHROUGH */ case '%' : if ((*state->append_char)(state, c)) return -1; break; default : if ( (*state->append_char)(state, '%') || (*state->append_char)(state, c)) return -1; break; } } else if ((*state->append_char) (state, c)) return -1; } return 0; } int snprintf (char *str, size_t sz, const char *format, ...) { va_list args; int ret; va_start(args, format); ret = vsnprintf (str, sz, format, args); va_end(args); return ret; } int vasprintf (char **ret, const char *format, va_list args) { return vasnprintf (ret, 0, format, args); } int vasnprintf (char **ret, size_t max_sz, const char *format, va_list args) { int st; size_t len; struct state state; state.max_sz = max_sz; state.sz = 1; state.str = malloc(state.sz); if (state.str == NULL) { *ret = NULL; return -1; } state.s = state.str; state.theend = state.s + state.sz - 1; state.append_char = as_append_char; state.reserve = as_reserve; st = xyzprintf (&state, format, args); if (st) { free (state.str); *ret = NULL; return -1; } else { char *tmp; *state.s = '\0'; len = state.s - state.str; tmp = realloc (state.str, len+1); if (tmp == NULL) { free (state.str); *ret = NULL; return -1; } *ret = tmp; return len; } } int vsnprintf (char *str, size_t sz, const char *format, va_list args) { struct state state; int ret; unsigned char *ustr = (unsigned char *)str; state.max_sz = 0; state.sz = sz; state.str = ustr; state.s = ustr; state.theend = ustr + sz - 1; state.append_char = sn_append_char; state.reserve = sn_reserve; ret = xyzprintf (&state, format, args); *state.s = '\0'; if (ret) return sz; else return state.s - state.str; } #endif /* SNPRINTF_C */ netdiag-1.2/trafshow-5.2.3/snprintf.h000066400000000000000000000036301323731111400173010ustar00rootroot00000000000000#ifndef SNPRINTF_H #define SNPRINTF_H /* This source code are distributed under following license: */ /* * Copyright (c) 1995 - 2000 Kungliga Tekniska H?gskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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. */ extern int vsnprintf (char *str, size_t sz, const char *format, va_list args); extern int snprintf (char *str, size_t sz, const char *format, ...); #endif /* SNPRINTF_H */ netdiag-1.2/trafshow-5.2.3/standard.h000066400000000000000000000031211323731111400172310ustar00rootroot00000000000000/* ------------------------------------------------------------------------------ Standard definitions and types, Bob Jenkins ------------------------------------------------------------------------------ */ #ifndef STANDARD # define STANDARD # ifndef STDIO # include # define STDIO # endif # ifndef STDDEF # include # define STDDEF # endif typedef unsigned long long ub8; #define UB8MAXVAL 0xffffffffffffffffLL #define UB8BITS 64 typedef signed long long sb8; #define SB8MAXVAL 0x7fffffffffffffffLL typedef unsigned long int ub4; /* unsigned 4-byte quantities */ #define UB4MAXVAL 0xffffffff typedef signed long int sb4; #define UB4BITS 32 #define SB4MAXVAL 0x7fffffff typedef unsigned short int ub2; #define UB2MAXVAL 0xffff #define UB2BITS 16 typedef signed short int sb2; #define SB2MAXVAL 0x7fff typedef unsigned char ub1; #define UB1MAXVAL 0xff #define UB1BITS 8 typedef signed char sb1; /* signed 1-byte quantities */ #define SB1MAXVAL 0x7f typedef int word; /* fastest type available */ #define bis(target,mask) ((target) |= (mask)) #define bic(target,mask) ((target) &= ~(mask)) #define bit(target,mask) ((target) & (mask)) #ifndef min # define min(a,b) (((a)<(b)) ? (a) : (b)) #endif /* min */ #ifndef max # define max(a,b) (((a)<(b)) ? (b) : (a)) #endif /* max */ #ifndef align # define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1))) #endif /* align */ #ifndef abs # define abs(a) (((a)>0) ? (a) : -(a)) #endif #define TRUE 1 #define FALSE 0 #define SUCCESS 0 /* 1 on VAX */ #endif /* STANDARD */ netdiag-1.2/trafshow-5.2.3/strcasecmp.c000066400000000000000000000065321323731111400176010ustar00rootroot00000000000000/* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that this notice is preserved and that due credit is given * to the University of California at Berkeley. The name of the University * may not be used to endorse or promote products derived from this * software without specific written prior permission. This software * is provided ``as is'' without express or implied warranty. */ typedef unsigned char u_char; /* * This array is designed for mapping upper and lower case letter * together for a case independent comparison. The mappings are * based upon ascii character sequences. */ static const u_char charmap[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', }; int strcasecmp(s1, s2) const char *s1, *s2; { register const u_char *cm = charmap, *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; while (cm[*us1] == cm[*us2++]) if (*us1++ == '\0') return (0); return (cm[*us1] - cm[*--us2]); } int strncasecmp(s1, s2, n) const char *s1, *s2; register n; { if (n != 0) { register const u_char *cm = charmap, *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; do { if (cm[*us1] != cm[*us2++]) return (cm[*us1] - cm[*--us2]); if (*us1++ == '\0') break; } while (--n != 0); } return (0); } netdiag-1.2/trafshow-5.2.3/strftime.c000066400000000000000000000252241323731111400172710ustar00rootroot00000000000000/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)strftime.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include /* ** 302 / 1000 is log10(2.0) rounded up. ** Subtract one for the sign bit; ** add one for integer division truncation; ** add one more for a minus sign. */ #define INT_STRLEN_MAXIMUM(type) \ ((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2) /* ** Based on elsieid[] = "@(#)strftime.c 7.15" ** ** This is ANSIish only when time is treated identically in all locales and ** when "multibyte character == plain character". */ static const char afmt[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static const char Afmt[][10] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; static const char bfmt[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; static const char Bfmt[][10] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; static char *_add __P((const char *, char *, const char *)); static char *_conv __P((int, const char *, char *, const char *)); static char *_secs __P((const struct tm *, char *, const char *)); static char *_fmt __P((const char *, const struct tm *, char *, const char *)); extern char *tzname[]; size_t strftime(s, maxsize, format, t) char *s; size_t maxsize; const char *format; const struct tm *t; { char *p; p = _fmt(format, t, s, s + maxsize); if (p == s + maxsize) return (0); *p = '\0'; return (p - s); } static char * _fmt(format, t, pt, ptlim) const char *format; const struct tm *t; char *pt; const char *ptlim; { for (; *format; ++format) { if (*format == '%') { label: switch(*++format) { case '\0': --format; break; case 'A': pt = _add((t->tm_wday < 0 || t->tm_wday > 6) ? "?" : Afmt[t->tm_wday], pt, ptlim); continue; case 'a': pt = _add((t->tm_wday < 0 || t->tm_wday > 6) ? "?" : afmt[t->tm_wday], pt, ptlim); continue; case 'B': pt = _add((t->tm_mon < 0 || t->tm_mon > 11) ? "?" : Bfmt[t->tm_mon], pt, ptlim); continue; case 'b': case 'h': pt = _add((t->tm_mon < 0 || t->tm_mon > 11) ? "?" : bfmt[t->tm_mon], pt, ptlim); continue; case 'c': pt = _fmt("%D %X", t, pt, ptlim); continue; case 'C': /* ** %C used to do a... ** _fmt("%a %b %e %X %Y", t); ** ...whereas now POSIX 1003.2 calls for ** something completely different. ** (ado, 5/24/93) */ pt = _conv((t->tm_year + TM_YEAR_BASE) / 100, "%02d", pt, ptlim); continue; case 'D': pt = _fmt("%m/%d/%y", t, pt, ptlim); continue; case 'x': /* ** Version 3.0 of strftime from Arnold Robbins ** (arnold@skeeve.atl.ga.us) does the ** equivalent of... ** _fmt("%a %b %e %Y"); ** ...for %x; since the X3J11 C language ** standard calls for "date, using locale's ** date format," anything goes. Using just ** numbers (as here) makes Quakers happier. ** Word from Paul Eggert (eggert@twinsun.com) ** is that %Y-%m-%d is the ISO standard date ** format, specified in ISO 2014 and later ** ISO 8601:1988, with a summary available in ** pub/doc/ISO/english/ISO8601.ps.Z on ** ftp.uni-erlangen.de. ** (ado, 5/30/93) */ pt = _fmt("%m/%d/%y", t, pt, ptlim); continue; case 'd': pt = _conv(t->tm_mday, "%02d", pt, ptlim); continue; case 'E': case 'O': /* ** POSIX locale extensions, a la ** Arnold Robbins' strftime version 3.0. ** The sequences ** %Ec %EC %Ex %Ey %EY ** %Od %oe %OH %OI %Om %OM ** %OS %Ou %OU %OV %Ow %OW %Oy ** are supposed to provide alternate ** representations. ** (ado, 5/24/93) */ goto label; case 'e': pt = _conv(t->tm_mday, "%2d", pt, ptlim); continue; case 'H': pt = _conv(t->tm_hour, "%02d", pt, ptlim); continue; case 'I': pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, "%02d", pt, ptlim); continue; case 'j': pt = _conv(t->tm_yday + 1, "%03d", pt, ptlim); continue; case 'k': /* ** This used to be... ** _conv(t->tm_hour % 12 ? ** t->tm_hour % 12 : 12, 2, ' '); ** ...and has been changed to the below to ** match SunOS 4.1.1 and Arnold Robbins' ** strftime version 3.0. That is, "%k" and ** "%l" have been swapped. ** (ado, 5/24/93) */ pt = _conv(t->tm_hour, "%2d", pt, ptlim); continue; #ifdef KITCHEN_SINK case 'K': /* ** After all this time, still unclaimed! */ pt = _add("kitchen sink", pt, ptlim); continue; #endif /* defined KITCHEN_SINK */ case 'l': /* ** This used to be... ** _conv(t->tm_hour, 2, ' '); ** ...and has been changed to the below to ** match SunOS 4.1.1 and Arnold Robbin's ** strftime version 3.0. That is, "%k" and ** "%l" have been swapped. ** (ado, 5/24/93) */ pt = _conv((t->tm_hour % 12) ? (t->tm_hour % 12) : 12, "%2d", pt, ptlim); continue; case 'M': pt = _conv(t->tm_min, "%02d", pt, ptlim); continue; case 'm': pt = _conv(t->tm_mon + 1, "%02d", pt, ptlim); continue; case 'n': pt = _add("\n", pt, ptlim); continue; case 'p': pt = _add(t->tm_hour >= 12 ? "PM" : "AM", pt, ptlim); continue; case 'R': pt = _fmt("%H:%M", t, pt, ptlim); continue; case 'r': pt = _fmt("%I:%M:%S %p", t, pt, ptlim); continue; case 'S': pt = _conv(t->tm_sec, "%02d", pt, ptlim); continue; case 's': pt = _secs(t, pt, ptlim); continue; case 'T': case 'X': pt = _fmt("%H:%M:%S", t, pt, ptlim); continue; case 't': pt = _add("\t", pt, ptlim); continue; case 'U': pt = _conv((t->tm_yday + 7 - t->tm_wday) / 7, "%02d", pt, ptlim); continue; case 'u': /* ** From Arnold Robbins' strftime version 3.0: ** "ISO 8601: Weekday as a decimal number ** [1 (Monday) - 7]" ** (ado, 5/24/93) */ pt = _conv((t->tm_wday == 0) ? 7 : t->tm_wday, "%d", pt, ptlim); continue; case 'V': /* ** From Arnold Robbins' strftime version 3.0: ** "the week number of the year (the first ** Monday as the first day of week 1) as a ** decimal number (01-53). The method for ** determining the week number is as specified ** by ISO 8601 (to wit: if the week containing ** January 1 has four or more days in the new ** year, then it is week 1, otherwise it is ** week 53 of the previous year and the next ** week is week 1)." ** (ado, 5/24/93) */ /* ** XXX--If January 1 falls on a Friday, ** January 1-3 are part of week 53 of the ** previous year. By analogy, if January ** 1 falls on a Thursday, are December 29-31 ** of the PREVIOUS year part of week 1??? ** (ado 5/24/93) ** ** You are understood not to expect this. */ { int i; i = (t->tm_yday + 10 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7; pt = _conv((i == 0) ? 53 : i, "%02d", pt, ptlim); } continue; #ifdef notdef /* Not in POSIX date(1), System V or ANSI C. */ case 'v': /* ** From Arnold Robbins' strftime version 3.0: ** "date as dd-bbb-YYYY" ** (ado, 5/24/93) */ pt = _fmt("%e-%b-%Y", t, pt, ptlim); continue; #endif case 'W': pt = _conv((t->tm_yday + 7 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7, "%02d", pt, ptlim); continue; case 'w': pt = _conv(t->tm_wday, "%d", pt, ptlim); continue; case 'y': pt = _conv((t->tm_year + TM_YEAR_BASE) % 100, "%02d", pt, ptlim); continue; case 'Y': pt = _conv(t->tm_year + TM_YEAR_BASE, "%04d", pt, ptlim); continue; case 'Z': #ifdef TM_ZONE if (t->TM_ZONE) pt = _add(t->TM_ZONE, pt, ptlim); else #endif /* defined TM_ZONE */ if (t->tm_isdst == 0 || t->tm_isdst == 1) { pt = _add(tzname[t->tm_isdst], pt, ptlim); } else pt = _add("?", pt, ptlim); continue; case '%': /* * X311J/88-090 (4.12.3.5): if conversion char is * undefined, behavior is undefined. Print out the * character itself as printf(3) does. */ default: break; } } if (pt == ptlim) break; *pt++ = *format; } return (pt); } static char * _secs(t, pt, ptlim) const struct tm *t; char *pt; const char *ptlim; { struct tm tmp; time_t s; tmp = *t; s = mktime(&tmp); return (_conv((int)s, "%d", pt, ptlim)); } static char * _conv(n, format, pt, ptlim) int n; const char *format; char *pt; const char *ptlim; { char buf[INT_STRLEN_MAXIMUM(int) + 1]; (void) sprintf(buf, format, n); return (_add(buf, pt, ptlim)); } static char * _add(str, pt, ptlim) const char *str; char *pt; const char *ptlim; { while (pt < ptlim && (*pt = *str++) != '\0') ++pt; return (pt); } netdiag-1.2/trafshow-5.2.3/trafshow.1000066400000000000000000000155421323731111400172110ustar00rootroot00000000000000.TH TRAFSHOW 1 "May 2004" .SH NAME trafshow - full screen show network traffic .SH SYNOPSIS .B trafshow [\fB-vpnb\fP] [\fB-a\fP \fIlen\fP] [\fB-c\fP \fIconf\fP] [\fB-i\fP \fIname\fP] [\fB-s\fP \fIstr\fP] [\fB-u\fP \fIport\fP] [\fB-R\fP \fIrefresh\fP] [\fB-P\fP \fIpurge\fP] [\fB-F\fP \fIfile\fP | \fIexpr\fP] .SH DESCRIPTION .PP .B TrafShow is a simple interactive program that gather the \fBnetwork traffic\fP from all libpcap-capable interfaces to accumulate it in memory cache, and then separately display it on appropriated curses window in line-narrowed manner as a list of network flows sorted by throughput. Display updates occurs nearly in real time, asynchronously from the data collecting. It look like a \fBlive show\fP of traffic flows. Any kind of network traffic are mixed together in the one live-show screen, an Ethernet, IP, etc. .br \fBHint\fP: Please press `\fBH\fP' key inside a show to get brief help! .PP The IP traffic can be \fBaggregated\fP by netmask prefix bits and service ports to reorganize a heap of trivial flows into the treelike hierarchies suitable for human perception. The user can glance over the list of resulting flows and select at their to browse detail. So you can deepen into the traffic inheritance hierarchy and inspect the packets of each trivial flow in variety of presentations: raw-hex, ascii, time-stamp. .br The program make aggregation automatically when number of flows will exceed some reasonable amount. Just a few seconds after launch may be required for adaptation to your volume of traffic. Use \fB-a\fP \fIlen\fP option (see below) to overwrite the default behaviour. .PP .B TrafShow also listens on UDP port (9995 by default) for diverse feeders of \fBCisco Netflow\fP and then separately display the collected data in the same manner as described above. The following versions of Netflow are currently supported: V1, V5, V7. Use \fB-u\fP \fIport\fP option (see below) to overwrite the default behaviour. .PP This program may be found wonderful at lest to locate suspicious traffic on the net very quickly on demand, or to evaluate real time traffic bandwidth utilization, in a simplest and convenient environment. But it is not intended for collecting and analysis of the network traffic for a long period of time, nor for billing! .PP The program pretend to be IPv6 compatible and ready to using, but it is not tested enough. You can define INET6 to do so. .SH OPTIONS .TP \fB-v\fP Print detailed version information and exit. .TP \fB-p\fP Do not put interface(s) into promiscuous mode. .TP \fB-n\fP Do not convert numeric values to names (host addresses, port numbers, etc.). The mode can be toggled On/Off during a show by pressing the `\fBN\fP' key. .TP \fB-b\fP To place a backflow entries near to the main streams in the sorted list of traffic flows. .br \fBNote\fP: this mode can raise the system load dangerously high because it take a lot of CPU cycles! .TP \fB-a\fP \fIlen\fP To aggregate traffic flows using IP netmask prefix \fIlen\fP. This option also turn on service ports aggregation. The \fIlen\fP expected as number of \fBbits\fP in the network portion of IP addresses (like CIDR). The aggragation \fIlen\fP can be changed during a show by pressing the `\fBA\fP' key, and turned Off by empty string. .br \fBHint\fP: Please use \fI0\fP to reduce output just for network services. .TP \fB-c\fP \fIconf\fP Use alternate color \fIconfig file\fP instead of default \fI/etc/trafshow\fP. .TP \fB-i\fP \fIname\fP Listen on the specified network interface \fIname\fP. If unspecified, \fBTrafShow\fP collect data from \fIall\fP network interfaces, configured \fBUP\fP in the system. In the last case the system must supply enough number of packet capture devices (like /dev/bpf#). .TP \fB-s\fP \fIstr\fP To search and follow for list \fBitem\fP matched by \fIstring\fP, moving the cursor bar. The found \fBitem\fP try to stay highlighted. The mode can be turned Off by `\fBCtrl\fP-\fB/\fP' key press or [re]entered again by `\fB/\fP' key directly in the live show. .TP \fB-u\fP \fIport\fP Listen on the specified UDP \fIport\fP number for the \fBCisco Netflow\fP feed. The default port number is \fI9995\fP. .br \fBHint\fP: Please use \fI0\fP to disable this functionality. .TP \fB-R\fP \fIrefresh\fP Set the \fBrefresh period\fP of data show to \fIseconds\fP, \fI2\fP seconds by default. This option can be changed during a show by pressing the `\fBR\fP' key. .TP \fB-P\fP \fIpurge\fP Set the expired data \fBpurge period\fP to \fIseconds\fP, \fI10\fP seconds by default. This option can be changed during a show by pressing the `\fBP\fP' key. .TP \fB-F\fP \fIfile\fP Use \fIfile\fP as input for the \fBfilter expression\fP. .TP \fIexpr\fP Select which packets will be displayed. If no \fIexpression\fP is given, all packets on the net will be displayed. Otherwise, only packets for which \fIexpression\fP is `true' will be displayed. .br The \fBfilter expression\fP can be changed during a show by pressing the `\fBF\fP' key, and turned Off by empty string. .br Please see \fBtcpdump\fP(1) man page for syntax of \fBfilter expression\fP. .SH FILES .TP .I /etc/trafshow The default colors configuration file if any. .TP .I $HOME/.trafshow The personal file with the user defined colors. .SH COLORS .PP If \fBTrafShow\fP has been compiled with modern curses libraries such as \fBSlang\fP or \fBNcurses\fP it been able to show colored traffic on the color-capable terminal. Hopefully, no special actions required to install them because your system has it by default (leastwise last years). .PP The syntax of \fBTrafShow\fP color configuration file as follow: .TP \fIdefault\fP \fIfcolor\fP\fB:\fP\fIbcolor\fP Set the default screen background color-pair .TP \fIport\fP[\fB/\fP\fIproto\fP] \fIfcolor\fP\fB:\fP\fIbcolor\fP Set color pattern by service port .TP [\fIproto\fP] \fIsrc\fP[\fB/\fP\fImask\fP][\fB,\fP\fIport\fP] \fIdst\fP[\fB/\fP\fImask\fP][\fB,\fP\fIport\fP] \fIfcolor\fP\fB:\fP\fIbcolor\fP Set color pattern by pair of source and destination addresses .PP The tokens \fI*\fP, \fIany\fP, or \fIall\fP matchs \fBANY\fP in the pattern. Where \fIfcolor\fP is foreground color and \fIbcolor\fP is background color. .br The fcolor and bcolor may be one of the following: .TP .I black red green yellow blue magenta cyan white It posible to indicate color as number from 0 to 7. .PP The upper-case \fIF\fPcolor mean \fBbright on\fP. The upper-case \fIB\fPcolor mean \fBblink on\fP. .SH SEE ALSO pcap(3), tcpdump(1), bpf(4) .SH ACKNOWLEDGEMENTS Thanks to Van Jacobson and Steven McCanne , all of Lawrence Berkeley Laboratory, University of California, Berkeley. Special thank to Jun-ichiro itojun Hagino for IPv6 patches. .SH AUTHOR Vladimir Vorobyev . .SH BUGS Depending of traffic volume, \fBTrafShow\fP can take a lot of CPU cycles and memory. .br It is impossible to use packet matching \fBexpressions\fP in the NetFlow mode. netdiag-1.2/trafshow-5.2.3/trafshow.c000066400000000000000000000454441323731111400172770ustar00rootroot00000000000000/* * Copyright (c) 1993-2006 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_SLCURSES #include #elif HAVE_NCURSES #include #else #include #endif #include #include #ifdef HAVE_PCAP_GET_SELECTABLE_FD #include #endif #include #include #include #include #include #include #include #include #include #ifdef linux #include #include #endif #include "trafshow.h" #include "parse_dl.h" #include "screen.h" #include "show_if.h" #include "show_stat.h" #include "show_dump.h" #include "getkey.h" #include "selector.h" #include "addrtoname.h" #include "netstat.h" #include "util.h" #include "events.h" #include "session.h" #include "cisco_netflow.h" #include "help_page.h" char copyright[] = "Copyright (c) 1993-2006 Rinet Corp., Novosibirsk, Russia"; static void vers(); static void usage(); static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const char *name); static int pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp); static void *pcap_feed(void *arg); /* PCAP_HANDLER *ph */ #ifdef HAVE_PCAP_GET_SELECTABLE_FD static void *pcap_feed2(void *arg); /* PCAP_HANDLER *ph */ #endif static void parse_feed(u_char *a, const struct pcap_pkthdr *h, const u_char *p); static void *traf_show(void *arg); /* PCAP_HANDLER *ph_list */ static void *catch_signals(void *arg); /* sigset_t *set */ static void cleanup(void); static int resize_pending = 0; const char *progname; const char *hostname; const char *color_conf = 0; char *expression = 0; char *search = 0; int aggregate = -1; int popbackflow = 0; int refresh_time = REFRESH_TIME; int purge_time = PURGE_TIME; ShowMode show_mode = Interfaces; int promisc = 1; /* promiscuous mode */ int Oflag = 1; /* optimize filter code */ int nflag = 0; /* use numeric value of service ports and protocols */ int main(argc, argv) int argc; char **argv; { char buf[256], *dev_name = 0, *filter = 0; pcap_if_t *dev_list = 0; PCAP_HANDLER *ph_list = 0; int op, udp_port = CNF_PORT; sigset_t sigset; pthread_t show_thr, sig_thr, pcap_thr; extern char *optarg; extern int optind, opterr; progname = strdup(strip_path(argv[0])); if (gethostname(buf, sizeof(buf)) < 0) (void)strcpy(buf, "localhost"); hostname = strdup(buf); /* get list of all pcap devices */ if (pcap_findalldevs(&dev_list, buf) < 0) { fprintf(stderr, "pcap_findalldevs: %s\n", buf); exit(1); } opterr = 0; while ((op = getopt(argc, argv, "a:bc:i:ns:u:pF:R:P:vh?")) != EOF) { switch (op) { case 'a': aggregate = atoi(optarg); if (aggregate < 0 || aggregate > ADDRBITLEN) usage(); break; case 'b': popbackflow = 1; break; case 'c': color_conf = optarg; break; case 'i': dev_name = optarg; break; case 'n': nflag = 1; break; case 's': search = strdup(optarg); break; case 'u': udp_port = atoi(optarg); break; case 'p': promisc = 0; break; case 'F': filter = optarg; break; case 'R': if ((refresh_time = atoi(optarg)) < 1) usage(); break; case 'P': if ((purge_time = atoi(optarg)) < 1) usage(); break; case 'v': vers(); case 'h': case '?': default: usage(); } } /* check for command line options */ if (dev_name && (dev_list = pcap_matchdev(dev_list, dev_name)) == 0) { fprintf(stderr, "Interface %s not found\n", dev_name); exit(1); } if (refresh_time >= purge_time) { fprintf(stderr, "Refresh Time (%d sec) must be less than Purge Time (%d sec)\n", refresh_time, purge_time); exit(1); } /* initialize list of pcap handlers */ if ((op = pcap_init(&ph_list, dev_list)) < 1) { fprintf(stderr, "No packet capture device available (no permission?)\n"); exit(1); } /* listen for cisco netflow */ if (udp_port > 1 && (cisco_netflow_init(&ph_list, udp_port) < 0)) { fprintf(stderr, "Can't start cisco-netflow collector at UDP port %d\n", udp_port); exit(1); } /* if only one interface -- make it selected */ if (ph_list && op == 1) { ph_list->selected = 1; show_mode = NetStat; } /* get back to user process */ setuid(getuid()); /* set the filter expression if any */ if (ph_list && (argv[optind] || filter)) { if (filter) expression = load_file(filter); else expression = copy_argv(&argv[optind]); if (!expression) exit(1); if ((filter = pcap_setexpr(ph_list, expression)) != 0) { fprintf(stderr, "%s\n", filter); exit(1); } } /* intialize addrtoname stuff */ init_addrtoname(); /* initialize curses */ if (screen_open(0) < 0) exit(1); /* register cleanup function at exit */ atexit(cleanup); show_thr = pthread_self(); /* spawn thread to catch some usefull signals */ sigemptyset(&sigset); sigaddset(&sigset, SIGWINCH); sigprocmask(SIG_BLOCK, &sigset, 0); if (pthread_create(&sig_thr, 0, catch_signals, &sigset)) { perror("pthread_create(catch_signals)"); exit(1); } /* spawn thread for the live packet capture */ if (ph_list) { #ifdef HAVE_PCAP_GET_SELECTABLE_FD PCAP_HANDLER *ph; for (ph = ph_list; ph; ph = ph->next) { if (pcap_get_selectable_fd(ph->pcap) < 0) break; } if (!ph) { if (pthread_create(&pcap_thr, 0, pcap_feed2, ph_list)) { perror("pthread_create(pcap_feed2)"); exit(1); } } else #endif if (pthread_create(&pcap_thr, 0, pcap_feed, ph_list)) { perror("pthread_create(pcap_feed)"); exit(1); } } /* start main loop */ (void)traf_show(ph_list); exit(0); } static void cleanup() { if (dump_file) (void)unlink(dump_file); screen_close(); _exit(0); } static void * catch_signals(arg) void *arg; { sigset_t sigset; int sig; for (;;) { sigset = *(sigset_t *)arg; if (sigwait(&sigset, &sig)) break; /* should not happen */ if (sig == SIGWINCH) resize_pending++; } return 0; } static pcap_if_t * pcap_matchdev(dp, name) pcap_if_t *dp; const char *name; { for (; dp; dp = dp->next) { if (!strcasecmp(dp->name, "any")) continue; /* discard linux's any device silently */ if (!strcasecmp(dp->name, name)) { dp->next = 0; return dp; } } return 0; } static int pcap_init(ph_list, dp) PCAP_HANDLER **ph_list; pcap_if_t *dp; { int cnt = 0, err = 0, type; pcap_t *pd; const pcap_addr_t *ap; PCAP_HANDLER *ph, *ph_prev = 0; char *cp, buf[256]; if (!ph_list) return -1; for (; dp; dp = dp->next) { if (!strcasecmp(dp->name, "any")) continue; /* discard linux's any device silently */ buf[0] = '\0'; if ((pd = pcap_open_live(dp->name, SNAPLEN, promisc, 1, buf)) == 0) { fprintf(stderr, "%s: %s\n", dp->name, buf); err++; continue; } type = pcap_datalink(pd); if (!is_parse_dl(type)) { fprintf(stderr, "%s: datalink type %d is not supported\n", dp->name, type); pcap_close(pd); err++; continue; } if (buf[0] != '\0') { fprintf(stderr, "%s: %s\n", dp->name, buf); err++; } if (pcap_setnonblock(pd, 1, buf) < 0) { fprintf(stderr, "%s: %s\n", dp->name, buf); pcap_close(pd); err++; continue; } if ((ph = (PCAP_HANDLER *)malloc(sizeof(PCAP_HANDLER))) == 0) { perror("malloc"); exit(1); } memset(ph, 0, sizeof(PCAP_HANDLER)); ph->masklen = aggregate; ph->name = strdup(dp->name); if (dp->description && *dp->description) ph->descr = strdup(dp->description); else if (dp->flags & PCAP_IF_LOOPBACK) ph->descr = strdup("Loopback"); else ph->descr = strdup(parse_dl_name(type)); ph->pcap = pd; ph->addr = dp->addresses; /* XXX must be deep copy? */ /* make string of network address list */ buf[0] = '\0'; cp = buf; #ifdef linux if (type == DLT_EN10MB && (dp->flags & PCAP_IF_LOOPBACK) == 0) { int sfd = socket(AF_INET, SOCK_DGRAM, 0); if (sfd != -1) { struct ifreq ifr; memset(&ifr, 0, sizeof(struct ifreq)); memcpy(ifr.ifr_name, dp->name, MIN(strlen(dp->name), sizeof(ifr.ifr_name)-1)); if (ioctl(sfd, SIOCGIFHWADDR, &ifr) != -1) { (void)strcpy(cp, linkaddr_string((u_char *)ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN)); cp += strlen(cp); } close(sfd); } } #endif for (ap = dp->addresses; ap && cp < (buf + sizeof(buf)-1); ap = ap->next) { if (buf[0]) { *cp++ = ' '; *cp = '\0'; } if (satoa(ap->addr, cp, (buf + sizeof(buf)) - cp)) cp += strlen(cp); } *cp = '\0'; ph->addrstr = strdup(buf); if ((ph->ns_mutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t))) == 0) { perror("malloc"); exit(1); } pthread_mutex_init(ph->ns_mutex, 0); ph->prev = ph_prev; if (ph_prev) ph_prev->next = ph; else *ph_list = ph; ph_prev = ph; cnt++; } if (cnt && err) { fflush(stderr); sleep(1); } return cnt; } PCAP_HANDLER * pcaph_create(top, nh) PCAP_HANDLER *top; const struct netstat_header *nh; { PCAP_HANDLER *ph; /* sanity check */ if (!top || top->masklen < 0 || !nh) return 0; if ((ph = (PCAP_HANDLER *)malloc(sizeof(PCAP_HANDLER))) == 0) return 0; memset(ph, 0, sizeof(PCAP_HANDLER)); ph->masklen = -1; ph->maskhdr = (struct netstat_header *)malloc(sizeof(struct netstat_header)); if (!ph->maskhdr) return 0; memcpy(ph->maskhdr, nh, sizeof(struct netstat_header)); netstat_aggregate(ph->maskhdr, top->masklen); if ((ph->ns_mutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t))) == 0) { free(ph->maskhdr); return 0; } pthread_mutex_init(ph->ns_mutex, 0); ph->name = top->name; ph->descr = top->descr; ph->pcap = top->pcap; ph->selected = 1; ph->top = top; top->deep = ph; return ph; } void pcaph_close(ph) PCAP_HANDLER *ph; { /* sanity check */ if (!ph || !ph->top) return; ph->top->deep = 0; if (ph->deep) pcaph_close(ph->deep); /* recursion */ netstat_free(ph); if (ph->ns_mutex) { pthread_mutex_destroy(ph->ns_mutex); free(ph->ns_mutex); ph->ns_mutex = 0; } remove_event(0, ph); if (ph->maskhdr) free(ph->maskhdr); if (ph->selector) { if (ph->selector->list) free(ph->selector->list); free(ph->selector); } free(ph); } char * pcap_setexpr(ph, expr) PCAP_HANDLER *ph; const char *expr; { int op; struct bpf_program filter; bpf_u_int32 net; bpf_u_int32 mask; char name[100], buf[256]; if (!expr) return 0; for (; ph; ph = ph->next) { if (!ph->pcap) /* skip non-pcap devices */ continue; if (pcap_lookupnet(strcpy(name, ph->name), &net, &mask, buf) < 0) { /* ignore error */ net = 0; mask = 0; } (void)strncpy(buf, expr, sizeof(buf)); buf[sizeof(buf)-1] = '\0'; if (pcap_compile(ph->pcap, &filter, buf, Oflag, mask) < 0) return pcap_geterr(ph->pcap); op = pcap_setfilter(ph->pcap, &filter); pcap_freecode(&filter); if (op < 0) return pcap_geterr(ph->pcap); } return 0; } static void * pcap_feed(arg) void *arg; { PCAP_HANDLER *ph, *ph_list = (PCAP_HANDLER *)arg; int npkt = -1, ndev, op; do { if (!npkt) usleep(1000); /* 1ms idle to prevent deadloop */ npkt = 0; ndev = 0; for (ph = ph_list; ph; ph = ph->next) { if (!ph->pcap) /* skip non-pcap devices */ continue; op = pcap_dispatch(ph->pcap, -1, parse_feed, (u_char *)ph); if (op > 0) { npkt += op; } else if (op == -2 || (op == -1 && errno != EAGAIN)) { pcap_close(ph->pcap); ph->pcap = 0; continue; } ndev++; } } while (ndev); return 0; } #ifdef HAVE_PCAP_GET_SELECTABLE_FD static void * pcap_feed2(arg) void *arg; { PCAP_HANDLER *ph, *ph_list = (PCAP_HANDLER *)arg; int npkt = -1, ndev, op; fd_set readfds; for (;;) { #ifdef notdef if (!npkt) usleep(1000); /* 1ms idle to prevent deadloop */ #endif npkt = 0; ndev = 0; FD_ZERO(&readfds); for (ph = ph_list; ph; ph = ph->next) { if (!ph->pcap) /* skip non-pcap devices */ continue; op = pcap_get_selectable_fd(ph->pcap); if (op < 0) /* should not happen */ continue; if (op + 1 > ndev) ndev = op + 1; FD_SET(op, &readfds); } if (ndev < 1) /* no one device fd for selecting? */ break; if ((op = select(ndev, &readfds, 0, 0, 0)) < 0) { if (errno == EINTR || errno == EAGAIN) continue; /* select error? */ break; } if (!op) /* select timed out, try again */ continue; for (ph = ph_list; ph; ph = ph->next) { if (!ph->pcap) /* skip non-pcap devices */ continue; #ifdef notdef if (!FD_ISSET(pcap_get_selectable_fd(ph->pcap), &readfds)) continue; /* skip silent devices */ #endif op = pcap_dispatch(ph->pcap, -1, parse_feed, (u_char *)ph); if (op > 0) { npkt += op; } else if (op == -2 || (op == -1 && errno != EAGAIN)) { pcap_close(ph->pcap); ph->pcap = 0; } } } return 0; } #endif static void parse_feed(a, h, p) u_char *a; const struct pcap_pkthdr *h; const u_char *p; { PCAP_HANDLER *ph = (PCAP_HANDLER *)a; NETSTAT ns; /* sanity check */ if (!ph || !ph->pcap) return; /*ph->pcap_time = h->ts;*/ memset(&ns, 0, sizeof(NETSTAT)); if (parse_dl(&ns, pcap_datalink(ph->pcap), h->caplen, h->len, p) < 0) return; ns.mtime = h->ts; pcap_save(ph, &ns); } void pcap_save(ph, ns) PCAP_HANDLER *ph; const NETSTAT *ns; { int num; struct netstat_header nh; /* sanity check */ if (!ph || !ns) return; if (netstat_insert(ph, ns) && aggregate < 0) { num = netstat_count(ph); if (num > 5000) { if (ph->masklen) ph->masklen = 0; } else if (num > 1000) { if (ph->masklen < 0 || ph->masklen > 16) ph->masklen = 16; } else if (num > 250) { if (ph->masklen < 0 || ph->masklen > 24) ph->masklen = 24; } } while (ph->deep) { num = ph->masklen; ph = ph->deep; if (!ph->maskhdr) /* should not happen */ continue; memcpy(&nh, &ns->ns_hdr, sizeof(struct netstat_header)); netstat_aggregate(&nh, num); if (!memcmp(&nh, ph->maskhdr, sizeof(struct netstat_header))) netstat_insert(ph, ns); } } void pcap_show(arg) void *arg; { PCAP_HANDLER *ph = (PCAP_HANDLER *)arg; SELECTOR *sp; int idx; struct timeval now; gettimeofday(&now, 0); switch (show_mode) { case Interfaces: sp = show_if_list(ph); if (search && (idx = show_if_search(ph, search)) != -1) selector_set(idx, sp); selector_redraw(sp); break; case NetStat: ph = pcap_get_selected(ph); sp = show_stat_list(ph); if (search && (idx = show_stat_search(ph, search)) != -1) selector_set(idx, sp); selector_redraw(sp); break; case FlowDump: show_dump_print(pcap_get_selected(ph)); break; case HelpPage: #ifdef notdef /* overlapping is not good idea -- too flicker */ show_mode = help_page_mode(); if (show_mode != HelpPage) { /* just for sanity */ pcap_show(arg); show_mode = HelpPage; } #endif selector_redraw(help_page_selector()); break; } /* schedule next time */ now.tv_sec += refresh_time; add_event(&now, pcap_show, arg); } void pcap_purge(arg) void *arg; { PCAP_HANDLER *ph = (PCAP_HANDLER *)arg, *p; struct timeval now; gettimeofday(&now, 0); now.tv_sec -= purge_time; for (; ph; ph = ph->next) { for (p = ph; p; p = p->deep) netstat_purge(p, &now); } /* schedule next time */ now.tv_sec += purge_time * 2; add_event(&now, pcap_purge, arg); pcap_show(arg); } void pcap_clear(arg) void *arg; { PCAP_HANDLER *ph = (PCAP_HANDLER *)arg, *p; for (; ph; ph = ph->next) { for (p = ph; p; p = p->deep) netstat_purge(p, 0); } pcap_show(arg); } PCAP_HANDLER * pcap_get_selected(ph) PCAP_HANDLER *ph; { for (; ph; ph = ph->next) { if (ph->selected) { while (ph->deep) ph = ph->deep; return ph; } } return 0; } PCAP_HANDLER * pcap_set_selected(ph, idx) PCAP_HANDLER *ph; int idx; { PCAP_HANDLER *sel = 0; int i = 0; for (; ph; ph = ph->next) { if (i++ == idx) { sel = ph; ph->selected = 1; } else ph->selected = 0; } return sel; } static void * traf_show(arg) void *arg; { PCAP_HANDLER *ph_list = (PCAP_HANDLER *)arg; int op, nfds; fd_set readfds, writefds; struct timeval timeout; /* start show */ pcap_purge(ph_list); /* init keyboard functions */ getkey_init(ph_list); for (;;) { if (resize_pending) { if (screen_open(resize_pending) < 0) return 0; add_event(0, pcap_show, ph_list); resize_pending = 0; } nfds = 0; FD_ZERO(&readfds); FD_ZERO(&writefds); op = select_event(&timeout); if (!session_select(&nfds, &readfds, &writefds, &timeout, &op)) { /* no one active session?? should not happen */ return 0; } op = select(nfds, &readfds, &writefds, 0, op ? 0 : &timeout); if (op < 1) { /* select interrupted by signals or timed out */ if (op < 0) { if (errno == EINTR || errno == EAGAIN) continue; screen_status("select: %s", strerror(errno)); return 0; } else session_timeout(); } else session_operate(&readfds, &writefds); } /* NOT REACHED */ return 0; } static void vers() { extern char pcap_version[]; int hc = 0; #ifdef HAVE_HAS_COLORS initscr(); hc = has_colors(); endwin(); #endif /* HAVE_HAS_COLORS */ fprintf(stderr, "\n%s Version %s\ncompiled for %s with\n %s\n", progname, version, target, compiled); fprintf(stderr, "\tlibpcap version %s\n", pcap_version); #ifdef HAVE_SLCURSES fprintf(stderr, "\tslcurses version %d\n", SLang_Version); #elif HAVE_NCURSES #ifdef NCURSES_VERSION fprintf(stderr, "\tncurses version %s\n", NCURSES_VERSION); #else fprintf(stderr, "\tncurses version unknown\n"); #endif /* NCURSES_VERSION */ #elif HAVE_CURSES fprintf(stderr, "\tunknown curses library\n"); #endif /* HAVE_SLCURSES */ #ifdef HAVE_HAS_COLORS fprintf(stderr, "\tcolors support\n"); if (hc) fprintf(stderr, "\tyour current terminal has color capability\n"); #ifndef HAVE_SLCURSES else fprintf(stderr, "\tyour current terminal has no color capability\n"); #endif #else fprintf(stderr, "\tno colors support\n"); #endif /* HAVE_HAS_COLORS */ fprintf(stderr, "\n%s\n", copyright); fprintf(stderr,"For bug report please email to trafshow@risp.ru (include this page)\n\n"); exit(1); } static void usage() { fprintf(stderr, "Usage:\n\ %s [-vpnb] [-a len] [-c conf] [-i ifname] [-s str] [-u port] [-R refresh] [-P purge] [-F file | expr]\n\ Where:\n\ -v Print version number, compile-time definitions, and exit\n\ -p Don't put the interface(s) into promiscuous mode\n\ -n Don't convert numeric values to names\n\ -b To place a backflow near to the main stream\n\ -a len To aggregate IP addresses using the prefix length\n\ -c conf Color config file instead of default /etc/trafshow\n\ -i ifname Network interface name; all by default\n\ -s str To search & follow for string in the list show\n\ -u port UDP port number to listen for Cisco Netflow; default %d\n\ -R refresh Set the refresh-period of data show to seconds; default %d sec\n\ -P purge Set the expired data purge-period to seconds; default %d sec\n\ -F file Use file as input for the filter expression\n\ expr Filter expression; see tcpdump(1) for syntax\n\ \n", progname, CNF_PORT, REFRESH_TIME, PURGE_TIME); exit(1); } netdiag-1.2/trafshow-5.2.3/trafshow.h000066400000000000000000000077621323731111400173050ustar00rootroot00000000000000/* * Copyright (c) 1993-2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _TRAFSHOW_H_ #define _TRAFSHOW_H_ #include #include #include #include #include /* * The default snapshot length. This value allows most printers to print * useful information while keeping the amount of unwanted data down. */ #ifndef INET6 #define SNAPLEN 68 /* ether + IPv4 + TCP + 14 */ #define ADDRBITLEN 32 /* in bits */ #else #define SNAPLEN 96 /* ether + IPv6 + TCP + 22 */ #define ADDRBITLEN 128 /* in bits */ #endif #define REFRESH_TIME 2 /* in seconds */ #define PURGE_TIME 10 /* must be bigger than REFRESH_TIME */ #define TEMP_DIR "/tmp" typedef enum { Interfaces, NetStat, FlowDump, HelpPage } ShowMode; #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef MAX #define MAX(a, b) ((b) < (a) ? (a) : (b)) #endif #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef ABS #define ABS(a) ((a) >= 0 ? (a) : -(a)) #endif #if defined(htons) && defined(_BIG_ENDIAN) && defined(sparc) #undef htons #define htons(x) ((uint16_t)(x)) #endif #if defined(ntohs) && defined(_BIG_ENDIAN) && defined(sparc) #undef ntohs #define ntohs(x) ((uint16_t)(x)) #endif #ifdef DEBUG #include #include #define dprintf(x) \ {\ char Dbuf[50];\ struct timeval Dtv;\ gettimeofday(&Dtv, 0);\ strftime(Dbuf, sizeof(Dbuf), "%T", localtime(&Dtv.tv_sec));\ printf("%s.%03d: ", Dbuf, (int)(Dtv.tv_usec / 1000));\ printf x;\ printf("\n");\ } #else #define dprintf(x) #endif struct netstat_header; struct htab; struct selector; typedef struct pcap_handler { struct pcap_handler *prev, *next; struct pcap_handler *top, *deep; /* fixed input parameters */ const char *name; /* interface name */ const char *descr; /* interface description (or null) */ const char *addrstr; /* interface network address list */ pcap_t *pcap; /* pcap device handler */ pcap_addr_t *addr; /* pcap device addresses */ /* aggregation stuff */ int masklen; /* mask length in bits */ struct netstat_header *maskhdr; /* mask address */ /* operation parameters */ /*struct timeval pcap_time;*/ /* last packet capture time */ pthread_mutex_t *ns_mutex; /* netstat hash table mutex */ struct htab *ns_hash; /* netstat hash table */ struct selector *selector; /* list items selector */ int selected; /* the flag: this item is selected */ /* total statistics */ u_int64_t pkt_cnt; /* packet counter */ u_int64_t pkt_len; /* length of ip packet */ u_int64_t data_len; /* length of ip data */ u_int64_t pkt_cnt_rate; /* rate of packet counter */ u_int64_t pkt_len_rate; /* rate of packet length */ u_int64_t data_len_rate; /* rate of data length */ } PCAP_HANDLER; /* function prototypes */ struct netstat; char *pcap_setexpr(PCAP_HANDLER *ph_list, const char *expr); PCAP_HANDLER *pcap_get_selected(PCAP_HANDLER *ph); PCAP_HANDLER *pcap_set_selected(PCAP_HANDLER *ph, int idx); void pcap_save(PCAP_HANDLER *ph, const struct netstat *ns); void pcap_purge(void *arg); /* PCAP_HANDLER *ph_list */ void pcap_clear(void *arg); /* PCAP_HANDLER *ph_list */ void pcap_show(void *arg); /* PCAP_HANDLER *ph_list */ PCAP_HANDLER *pcaph_create(PCAP_HANDLER *top, const struct netstat_header *nh); void pcaph_close(PCAP_HANDLER *ph); /* global variables */ extern char package[]; extern char version[]; extern char target[]; extern char compiled[]; extern const char *progname; extern const char *hostname; extern const char *color_conf; extern char *expression; extern char *search; extern int aggregate; extern int popbackflow; extern int refresh_time; extern int purge_time; extern int promisc; extern int Oflag; extern int nflag; extern ShowMode show_mode; #endif /* !_TRAFSHOW_H_ */ netdiag-1.2/trafshow-5.2.3/util.c000066400000000000000000000037211323731111400164070ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include "util.h" char * strip_path(path) const char *path; { char *cp; if (path && (cp = strrchr(path, '/')) != 0) return (++cp); return (char *)path; } char * strip_blanks(str) char *str; { char *bp, *ep; if (!str || !*str) return str; bp = str; while (*bp == ' ' || *bp == '\t') bp++; ep = bp + (strlen(bp)-1); while (ep >= bp && (*ep == ' ' || *ep == '\t' || *ep == '\r' || *ep == '\n')) *ep-- = '\0'; return bp; } /* * Copy arg vector into a new buffer, concatenating arguments with spaces. */ char * copy_argv(av) char **av; { unsigned int len = 0; char **p, *buf, *src, *dst; p = av; if (*p == 0) return 0; while (*p) len += strlen(*p++) + 1; if ((buf = (char *)malloc(len)) == 0) { perror("malloc"); return 0; } p = av; dst = buf; while ((src = *p++) != 0) { while ((*dst++ = *src++) != '\0'); dst[-1] = ' '; } dst[-1] = '\0'; return buf; } /* * Return size in bytes of regular file `name'. */ long fd_size(fd) int fd; { struct stat st; if (fstat(fd, &st) < 0) return -1; return (long)st.st_size; } char * load_file(name) const char *name; { int fd; long sz; char *cp; if ((fd = open(name, O_RDONLY)) < 0) { perror(name); return 0; } if ((sz = fd_size(fd)) < 0) { perror(name); close(fd); return 0; } if ((cp = (char *)malloc(sz + 1)) == 0) { perror(name); close(fd); return 0; } if ((sz = read(fd, cp, sz)) < 0) { perror(name); close(fd); free(cp); return 0; } close(fd); cp[sz] = '\0'; return cp; } netdiag-1.2/trafshow-5.2.3/util.h000066400000000000000000000010361323731111400164110ustar00rootroot00000000000000/* * Copyright (c) 2004 Rinet Corp., Novosibirsk, Russia * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * THIS SOURCE CODE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND. */ #ifndef _UTIL_H_ #define _UTIL_H_ char *strip_path(const char *path); char *strip_blanks(char *str); char *copy_argv(char **av); /* malloc is used */ long fd_size(int fd); char *load_file(const char *name); /* malloc is used */ #endif /* !_UTIL_H_ */