Difference between revisions of "Ike-scan program notes"
(No difference)
|
Latest revision as of 11:42, 17 June 2007
Contents
Coding Style
Indentation
I use three spaces for each indentation level. I always use spaces for indentation, never tabs.
Functions
I define functions like this:
int function_name(int arg1, int arg2) { }
The function type is on a line on its own so that the function name is at the start of the next line, in accordance with the GNU coding conventions.
Braces
I use braces like this.
if (condition) { statement; } else { statement; }
Source Files
Main Source Files
These are the core source code files for ike-scan.
Filename | License | Copyright | Description |
---|---|---|---|
error.c | GPL | Roy Hills | Error functions |
hash_functions.h | GPL | Roy Hills | Header file defining inline hash functions: MD5, SHA1, HMAC_MD5 and HMAC_SHA1. Uses either the OpenSSL or the included hash primitives depending on the HAVE_OPENSSL macro. |
ike-scan.c | GPL | Roy Hills | Main source file for ike-scan |
ike-scan.h | GPL | Roy Hills | Main header file for ike-scan |
ip.h | GPL | FSF | IP header structure definition, from GNU C Library |
isakmp.c | GPL | Roy Hills | IKE packet functions |
isakmp.h | GPL | Roy Hills | IKE packet definitions |
psk-crack.c | GPL | Roy Hills | Main source file for psk-crack |
psk-crack.h | GPL | Roy Hills | Main header file for psk-crack |
udp.h | GPL | FSF | UDP header structure definition, from GNU C Library |
utils.c | GPL | Roy Hills | Various utility functions used by ike-scan and psk-crack |
wrappers.c | GPL | Roy Hills | Wrappers for standard system functions that perform error checking and/or supply default values |
Replacement Function Source Files
These files provide replacements for functions that are not available on all systems. They are only used if the system that ike-scan is being built on does not provide the function.
Filename | License | Copyright | Description |
---|---|---|---|
getopt.c | GPL | FSF | getopt implementation from GNU C library |
getopt1.c | GPL | FSF | getopt_long implementation from GNU C Library |
getopt.h | GPL | FSF | getopt header file from GNU C Library |
inet_aton.c | PD | Russ Allbery | inet_aton implementation |
md5.c | ??? | L. Peter Deutsch | MD5 hash function code |
md5.h | ??? | L. Peter Deutsch | MD5 hash function header file |
sha1.c | PD | Steve Reid | SHA1 hash function code |
sha1.h | GPL | Roy Hills | SHA1 hash function header file |
mt19937ar.c | ??? | Takuji Nishimura & Makoto Matsumoto | mersenne twister PRNG |
strlcat.c | BSD | Todd C. Miller | OpenBSD strlcat implementation from http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/ |
strlcpy.c | BSD | Todd C. Miller | OpenBSD strlcpy implementation from http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/ |
Testing Source Code Files
These files test the ike-scan runs correctly. They are used by the optional "make check" process, and are not required for normal operation.
Filename | License | Copyright | Description |
---|---|---|---|
check-hash.c | GPL | Roy Hills | Checks the hash functions MD5, SHA1, HMAC_MD5 and HMAC_SHA1 for correct operation and measures hashing speed. |
check-sizes.c | GPL | Roy Hills | Checks that the sizes of various structures and data types are correct |
check-run1 | GPL | Roy Hills | Checks correct operation of ike-scan --help and --version |
check-run2 | GPL | Roy Hills | Checks ike-scan against non-responsive host and port |
check-run3 | GPL | Roy Hills | Checks ike-scan with maximum verbose setting displays the internal lists correctly |
check-psk-crack-1 | GPL | Roy Hills | Checks correct operation of psk-crack --help and --version |
check-psk-crack-2 | GPL | Roy Hills | Check psk-crack with standard format MD5 and SHA1 based hashes |
check-psk-crack-3 | GPL | Roy Hills | Check psk-crack with Nortel format MD5 and SHA1 based hashes |
check-psk-crack-4 | GPL | Roy Hills | Check psk-crack with uncrackable hashes and other unusual situations |
check-packet | GPL | Roy Hills | Check ike-scan packet generation against known good packet data files |
check-decode | GPL | Roy Hills | Check that ike-scan decodes and displays IKE packets correctly using known IKE packet data files |
check-error | GPL | Roy Hills | Check ike-scan's response to various error conditions |
Documentation Files
The main source of documentation for ike-scan is this wiki, but there are also these files in the distribution. All documentation files are available under the following license:
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
Filename | License | Copyright | Description |
---|---|---|---|
ike-scan.1 | See Above | Roy Hills | Man page for ike-scan |
psk-crack.1 | See Above | Roy Hills | Man Page for psk-crack |
README | See Above | Roy Hills | ike-scan README file |
README-WIN32 | See Above | Roy Hills | ike-scan README file for the Microsoft Windows platform |
udp-backoff-fingerprinting-paper.txt | See Above | Roy Hills | UDP Backoff Fingerprinting white paper |
ChangeLog | See Above | Roy Hills | ike-scan ChangeLog |
Files for Building ike-scan
Filename | License | Copyright | Description |
---|---|---|---|
configure.ac | N/A | Roy Hills | Source file for GNU autoconf |
Makefile.am | N/A | Roy Hills | Source file for GNU automake |
acinclude.m4 | N/A | Roy Hills | ike-scan autoconf macros |