diff options
-rw-r--r-- | ax25ipd/README.ax25ipd | 58 | ||||
-rw-r--r-- | ax25ipd/ax25ipd.c | 16 | ||||
-rw-r--r-- | ax25ipd/config.c | 22 | ||||
-rw-r--r-- | ax25ipd/io.c | 72 | ||||
-rw-r--r-- | ax25rtd/README.ax25rtd | 2 | ||||
-rw-r--r-- | ax25rtd/ax25rtctl.c | 4 | ||||
-rw-r--r-- | ax25rtd/ax25rtd.conf.man | 4 | ||||
-rw-r--r-- | ax25rtd/listener.c | 2 | ||||
-rw-r--r-- | call/call.c | 42 | ||||
-rw-r--r-- | listen/opentracdump.c | 4 |
10 files changed, 113 insertions, 113 deletions
diff --git a/ax25ipd/README.ax25ipd b/ax25ipd/README.ax25ipd index bfc12d8..a9c0a9d 100644 --- a/ax25ipd/README.ax25ipd +++ b/ax25ipd/README.ax25ipd @@ -3,8 +3,8 @@ ** This file is a cobbling together of the various notes on ax25ipd. ** - ax25ipd - ======= + ax25ipd + ======= This README files pertains to version 1.0.2 of ax25ipd. (this document is still incomplete -- the UDP features lack examples) @@ -142,17 +142,17 @@ using ax25ipd to carry AX.25 traffic. | on | | | | TCP/IP network | PC | | | | `----------' `----------' | - | - (vast distance) - | - | fish.sea.com W1AW-5 - | .----------. .----------. - | | | | | - | | UNIX | KISS | | - |---| host |------| NOS | - | | | 1200 | on | - | | baud | PC | - `----------' `----------' + | + (vast distance) + | + | fish.sea.com W1AW-5 + | .----------. .----------. + | | | | | + | | UNIX | KISS | | + |---| host |------| NOS | + | | | 1200 | on | + | | baud | PC | + `----------' `----------' Config file: Config file: @@ -174,8 +174,8 @@ Sample Configuration - digi-to-digi This example shows how to configure ax25ipd as a pair of digipeaters. - (KA9WSB-3) - one.two.com + (KA9WSB-3) + one.two.com .----------. .----------. | | | | | Standard | KISS | UNIX | | @@ -183,18 +183,18 @@ Sample Configuration - digi-to-digi | TNC | | | | TCP/IP network | & radio | | | | `----------' `----------' | - | - (vast distance) - | - | (W1AW-5) - | fish.sea.com W1AW-5 - | .----------. .----------. - | | | | | - | | UNIX | KISS | Standard | - |---| host |------| KISS | - | | | 9600 | TNC | - | | baud | & radio | - `----------' `----------' + | + (vast distance) + | + | (W1AW-5) + | fish.sea.com W1AW-5 + | .----------. .----------. + | | | | | + | | UNIX | KISS | Standard | + |---| host |------| KISS | + | | | 9600 | TNC | + | | baud | & radio | + `----------' `----------' Config file: Config file: @@ -270,10 +270,10 @@ AXIP (IP encapsulation of AX.25 frames) daemon by Michael Westerhof. Network Working Group B. Kantor Request for Comments: 1226 Univ. of Calif San Diego - May 1991 + May 1991 - Internet Protocol Encapsulation of AX.25 Frames + Internet Protocol Encapsulation of AX.25 Frames Status of this Memo diff --git a/ax25ipd/ax25ipd.c b/ax25ipd/ax25ipd.c index 4888c07..b1786f5 100644 --- a/ax25ipd/ax25ipd.c +++ b/ax25ipd/ax25ipd.c @@ -41,7 +41,7 @@ struct option options[] = { {"help", 0, NULL, 'h'}, {"configfile", 1, NULL, 'c'}, {"ttydevice", 1, NULL, 'd'}, - {"nofork", 0, NULL, 'f'}, + {"nofork", 0, NULL, 'f'}, {0, 0, 0, 0} }; @@ -75,8 +75,8 @@ int main(int argc, char **argv) strncpy(opt_ttydevice, optarg, sizeof(opt_ttydevice)-1); opt_ttydevice[sizeof(opt_ttydevice)-1] = 0; break; - case 'f': - opt_nofork = 1; + case 'f': + opt_nofork = 1; break; case 'h': opt_help = 1; @@ -116,8 +116,8 @@ int main(int argc, char **argv) (" --configfile FILE, -c FILE Set configuration file to FILE\n"); printf (" --ttydevice TTYDEV, -d TTYDEV Set device parameter to TTYDEV\n"); - printf - (" --nofork, -f Do not put daemon in background\n"); + printf + (" --nofork, -f Do not put daemon in background\n"); exit(0); } @@ -145,12 +145,12 @@ int main(int argc, char **argv) io_open(); /* if we get this far without error, let's fork off ! :-) */ - if (opt_nofork == 0) { + if (opt_nofork == 0) { if (!daemon_start(TRUE)) { - syslog(LOG_DAEMON | LOG_CRIT, "ax25ipd: cannot become a daemon\n"); + syslog(LOG_DAEMON | LOG_CRIT, "ax25ipd: cannot become a daemon\n"); return 1; } - } + } /* we need to close stdin, stdout, stderr: because otherwise * scripting like ttyname=$(ax25ipd | tail -1) does not work diff --git a/ax25ipd/config.c b/ax25ipd/config.c index 5b2c3e4..e1a7f70 100644 --- a/ax25ipd/config.c +++ b/ax25ipd/config.c @@ -319,17 +319,17 @@ int parse_line(char *buf) uport = ntohs(my_udp); while ((q = strtok(NULL, " \t\n\r")) != NULL) { if (strcmp(q, "udp") == 0) { - /* uport == 0 should never happen. - * re-use setting. It costed me a long time - * to realize that "udp" in ax25ipd.conf - * is not enough. It used the wrong port; - * 93 is standard, I configured socket udp 93, - * but ax25ipd talked to partners on that - * strange 10093. Even more, ax25ipd.conf's - * examples for axip did not help - and the - * manual is far from complete. - */ - if (uport == 0) + /* uport == 0 should never happen. + * re-use setting. It costed me a long time + * to realize that "udp" in ax25ipd.conf + * is not enough. It used the wrong port; + * 93 is standard, I configured socket udp 93, + * but ax25ipd talked to partners on that + * strange 10093. Even more, ax25ipd.conf's + * examples for axip did not help - and the + * manual is far from complete. + */ + if (uport == 0) uport = DEFAULT_UDP_PORT; q = strtok(NULL, " \t\n\r"); if (q != NULL) { diff --git a/ax25ipd/io.c b/ax25ipd/io.c index 6d5fcd5..db26657 100644 --- a/ax25ipd/io.c +++ b/ax25ipd/io.c @@ -545,49 +545,49 @@ int io_error( /* if (oops >= 0) return 0; */ /* do we have an error ? */ /* dl9sau: nobody has set fd's to O_NONBLOCK. - * thus EAGAIN (below) or EWOULDBLOCK are never be set. - * Has someone removed this behaviour previously? - * Anyway, in the current implementation, with blocking - * read/writes, a read or write of 0 bytes means EOF, - * for e.g. if the attached tty is closed. - * We have to exit then. We've currentlsy no mechanism - * for regulary reconnects. - */ + * thus EAGAIN (below) or EWOULDBLOCK are never be set. + * Has someone removed this behaviour previously? + * Anyway, in the current implementation, with blocking + * read/writes, a read or write of 0 bytes means EOF, + * for e.g. if the attached tty is closed. + * We have to exit then. We've currentlsy no mechanism + * for regulary reconnects. + */ if (oops > 0) - return 0; /* do we have an error ? */ + return 0; /* do we have an error ? */ - if (oops == 0) { - if (dir == READ_MSG && oops != TTY_MODE /* && != TCP_MODE, if we'd implement this */ ) - return 0; - fprintf(stderr, "Close event on mode 0x%2.2x (during %s). LINE %d. Terminating normaly.\n", mode, (dir == READ_MSG ? "READ" : "WRITE"), where); - exit(1); - } + if (oops == 0) { + if (dir == READ_MSG && oops != TTY_MODE /* && != TCP_MODE, if we'd implement this */ ) + return 0; + fprintf(stderr, "Close event on mode 0x%2.2x (during %s). LINE %d. Terminating normaly.\n", mode, (dir == READ_MSG ? "READ" : "WRITE"), where); + exit(1); + } #ifdef EAGAIN - if (errno == EAGAIN) { + if (errno == EAGAIN) { #ifdef notdef - /* select() said that data is available, but recvfrom sais - * EAGAIN - i really do not know what's the sense in this.. */ - if (dir == READ_MSG && oops != TTY_MODE /* && != TCP_MODE, if we'd implement this */ ) - return 0; - perror("System 5 I/O error!"); - fprintf(stderr, "A System 5 style I/O error was detected. This rogram requires BSD 4.2\n"); - fprintf(stderr, "behaviour. This is probably a result of compile-time environment.\n"); - fprintf(stderr, "Mode 0x%2.2x, LINE: %d. During %s\n", mode, where, (dir == READ_MSG ? "READ" : "WRITE")); - exit(3); + /* select() said that data is available, but recvfrom sais + * EAGAIN - i really do not know what's the sense in this.. */ + if (dir == READ_MSG && oops != TTY_MODE /* && != TCP_MODE, if we'd implement this */ ) + return 0; + perror("System 5 I/O error!"); + fprintf(stderr, "A System 5 style I/O error was detected. This rogram requires BSD 4.2\n"); + fprintf(stderr, "behaviour. This is probably a result of compile-time environment.\n"); + fprintf(stderr, "Mode 0x%2.2x, LINE: %d. During %s\n", mode, where, (dir == READ_MSG ? "READ" : "WRITE")); + exit(3); #else - int ret = 0; - if (dir == READ_MSG) { - LOGL4("read / recv returned -1 EAGAIN\n"); - ret = 0; - } else if (dir == SEND_MSG) { - LOGL4("write / send returned -1 EAGAIN, sleeping and retrying!\n"); - usleep(100000); - ret = 1; - } - return ret; + int ret = 0; + if (dir == READ_MSG) { + LOGL4("read / recv returned -1 EAGAIN\n"); + ret = 0; + } else if (dir == SEND_MSG) { + LOGL4("write / send returned -1 EAGAIN, sleeping and retrying!\n"); + usleep(100000); + ret = 1; + } + return ret; #endif - } + } #endif if (dir == READ_MSG) { diff --git a/ax25rtd/README.ax25rtd b/ax25rtd/README.ax25rtd index 0c6a080..15a71f9 100644 --- a/ax25rtd/README.ax25rtd +++ b/ax25rtd/README.ax25rtd @@ -150,7 +150,7 @@ irtt <irtt> routes an initial round trip time (IRTT) for TCP. <irtt> is measured in msec, hence - irtt 10000 + irtt 10000 sets the irtt to 10 seconds. A value of 0 disables this feature (default). diff --git a/ax25rtd/ax25rtctl.c b/ax25rtd/ax25rtctl.c index d7e82f0..62d8a02 100644 --- a/ax25rtd/ax25rtctl.c +++ b/ax25rtd/ax25rtctl.c @@ -133,7 +133,7 @@ static void list_ax25(void) printf("Callsign Port Last update Path\n"); /* - DB0PRA-15 scc3 Tue Aug 6 16:35:38 1996 + DB0PRA-15 scc3 Tue Aug 6 16:35:38 1996 */ while (1) { @@ -199,7 +199,7 @@ static void list_ip(void) printf("IP Address Port Callsign Mode Last update\n"); /* - 255.255.255.255 scc3 DB0PRA-15 v Thu Jan 7 06:54:19 1971 + 255.255.255.255 scc3 DB0PRA-15 v Thu Jan 7 06:54:19 1971 */ while (1) { len = read(sock, buf + offs, sizeof(buf) - offs - 1); diff --git a/ax25rtd/ax25rtd.conf.man b/ax25rtd/ax25rtd.conf.man index 9f085c7..eae3945 100644 --- a/ax25rtd/ax25rtd.conf.man +++ b/ax25rtd/ax25rtd.conf.man @@ -95,7 +95,7 @@ Don't use this feature unless you know what you are doing. It _should_ be safe do enable this on one-port machines, although I strongly recommend to set a network route instead, i.e.: - route add -net 44.0.0.0 scc3 + route add -net 44.0.0.0 scc3 Note that @@@ax25rtd@@@'s internal cache will be updated anyway, regardless of this option. @@ -105,7 +105,7 @@ If ip-learn-routes is enabled this will assign newly added routes an initial round trip time (IRTT) for TCP. <irtt> is measured in msec, hence - irtt 10000 + irtt 10000 sets the irtt to 10 seconds. A value of 0 disables this feature (default). diff --git a/ax25rtd/listener.c b/ax25rtd/listener.c index c3814a1..47431a2 100644 --- a/ax25rtd/listener.c +++ b/ax25rtd/listener.c @@ -178,7 +178,7 @@ int iproute2(long ip, char *dev, int what) sprintf(ipa, "%d.%d.%d.%d", (int) (ip & 0x000000FF), (int) ((ip & 0x0000FF00) >> 8), - (int) ((ip & 0x00FF0000) >> 16), + (int) ((ip & 0x00FF0000) >> 16), (int) ((ip & 0xFF000000) >> 24)); /* ip rule add table 44 */ diff --git a/call/call.c b/call/call.c index f56dc1a..28baec6 100644 --- a/call/call.c +++ b/call/call.c @@ -7,15 +7,15 @@ /* 25.07.1995 some bug-fixes Alexander Tietzel (DG6XA) */ /* 14.08.1995 merged with mainstream call.c code Jonathan Naylor (G4KLX) */ /* 01.03.1996 support for different screen sizes, fixed 7plus download (DL1BKE) - */ + */ /* 19.08.1996 fixed enter key handling (G4KLX) */ /* 27.08.1996 added Rose support (G4KLX) */ /* 30.11.1996 added the called user in the call windows and set talk mode as - default (IW0FBB) */ + default (IW0FBB) */ /* 07.12.1996 updated status line to cope with callsign, bits and status - message (VK2KTJ) */ + message (VK2KTJ) */ /* 02.02.1997 removed NETROM_PACLEN setting to match Jonathon removing it - from kernel (VK2KTJ) */ + from kernel (VK2KTJ) */ #include <sys/types.h> #include <utime.h> @@ -685,8 +685,8 @@ int start_ab_download(int mode, WINDOW ** swin, wint * wintab, int ret = write(gp->dwn_file, buf+offset, bytes-offset); if (ret == -1) { perror("write"); - if (errno == EWOULDBLOCK || errno == EAGAIN) { - usleep(100000); + if (errno == EWOULDBLOCK || errno == EAGAIN) { + usleep(100000); continue; } close(gp->dwn_file); @@ -703,9 +703,9 @@ int start_ab_download(int mode, WINDOW ** swin, wint * wintab, return -1; break; } - gp->calc_crc = calc_crc((unsigned char *) buf, ret, 0); - gp->dwn_cnt -= ret; - offset += ret; + gp->calc_crc = calc_crc((unsigned char *) buf, ret, 0); + gp->dwn_cnt -= ret; + offset += ret; } } @@ -781,7 +781,7 @@ int ab_down(int mode, WINDOW * swin, wint * wintab, char buf[], int *bytes, close(gp->dwn_file); gp->dwn_file = -1; utime(gp->file_name, &gp->ut); - gp->file_name[0] = '\0'; + gp->file_name[0] = '\0'; if (extrach != 0) { memmove(buf, buf + *bytes, extrach); *bytes = extrach; @@ -1343,7 +1343,7 @@ int searche_key_words(char buf[], int *bytes, char *parms, int *parmsbytes, static char cmpstr[MAX_CMPSTRLEN]; static int cmpstrbyte = 0; static int command = -1; - const char **pkey_words = remote_commands_enabled ? key_words : rkey_words; + const char **pkey_words = remote_commands_enabled ? key_words : rkey_words; int cmdstpos = 0; int cnt = 0; @@ -1676,12 +1676,12 @@ int cmd_call(char *call[], int mode) break; } if (bytes == -1) { - if (errno == EWOULDBLOCK || errno == EAGAIN) { - usleep(100000); + if (errno == EWOULDBLOCK || errno == EAGAIN) { + usleep(100000); continue; } if (errno != ENOTCONN) - perror("read"); + perror("read"); break; } if (gp.dwn_cnt != 0) { @@ -1816,7 +1816,7 @@ int cmd_call(char *call[], int mode) /* bytes == 0? select() indicated that there * is data to read, but read() returned 0 * bytes. -> terminate normaly - */ + */ if (bytes == 0) EOF_on_STDIN = TRUE; else if (bytes == -1) { @@ -2161,8 +2161,8 @@ int cmd_call(char *call[], int mode) if (ret == 0) break; if (ret == -1) { - if (errno == EWOULDBLOCK || errno == EAGAIN) { - usleep(100000); + if (errno == EWOULDBLOCK || errno == EAGAIN) { + usleep(100000); continue; } perror("write"); @@ -2233,12 +2233,12 @@ int cmd_call(char *call[], int mode) statline(mode, s); perror("write"); break; - } + } usleep(100000); continue; } /* if (uplpos / 1024 != (uplpos + bytes) / 1024) - { */ /* printf("\r%ld bytes sent ", uplpos + bytes); */ + { */ /* printf("\r%ld bytes sent ", uplpos + bytes); */ sprintf(s, "%ld", uplpos + bytes); dupdstatw(swin, s, FALSE); /* } */ @@ -2297,7 +2297,7 @@ int main(int argc, char **argv) if (!isatty(STDIN_FILENO)) stdin_is_tty = 0; - setlinebuf(stdin); + setlinebuf(stdin); while ((p = getopt(argc, argv, "b:dhm:p:rs:RStT:vw:W")) != -1) { switch (p) { @@ -2351,7 +2351,7 @@ int main(int argc, char **argv) inactivity_timeout.tv_sec = ((time_t) f) & 0x7fffffff; inactivity_timeout.tv_usec = (time_t ) (f - (double ) (time_t ) f); if (f < 0.001 || f > (double) (0x7fffffff) || (inactivity_timeout.tv_sec == 0 && inactivity_timeout.tv_usec == 0)) { - fprintf(stderr, "call: option '-T' must be > 0.001 (1ms) and < 69 years\n"); + fprintf(stderr, "call: option '-T' must be > 0.001 (1ms) and < 69 years\n"); return 1; } inactivity_timeout_is_set = TRUE; diff --git a/listen/opentracdump.c b/listen/opentracdump.c index c0e7bdc..56b7549 100644 --- a/listen/opentracdump.c +++ b/listen/opentracdump.c @@ -78,7 +78,7 @@ int decode_origination(unsigned char *element, int element_len) { int decode_entityid(unsigned char *element, int element_len) { /* 0x02 Entity ID */ if (element_len > 5) { - memcpy(entity_call, element, 6); + memcpy(entity_call, element, 6); entity_call[6]=0; entity_ssid = extract_ssid(entity_call); } @@ -278,7 +278,7 @@ int decode_availablenets(unsigned char *element, int element_len) { lprintf(T_OPENTRAC, "Available Networks:"); for (c=0; c<element_len; c++) { - lprintf(T_OPENTRAC, " %d", (int)*(element+c)); + lprintf(T_OPENTRAC, " %d", (int)*(element+c)); } lprintf(T_OPENTRAC, "\r\n"); |