I needed to set the local callsign on an ax25 connect and ax25_call
wouldn't do the job so I added that feature to call.  It works like
this.... "call -l local_call port remote_call"

If anyone else wants this feature... Here's the diff

--- call.c.orginal      Sun May 30 08:41:20 1999
+++ call.c      Sun May 30 14:33:07 1999
@@ -74,7 +74,7 @@
 int interrupted = FALSE;
 int paclen = 0;
 int fd;
-
+char local_call [9] = "";
 typedef struct {
     char file_name[255];
     long dwn_cnt;
@@ -171,6 +171,7 @@
 {
     int fd = 0;
     int addrlen = 0;
+    char path[20] = "";
     union {
        struct full_sockaddr_ax25 ax25;
        struct sockaddr_rose rose;
@@ -213,7 +214,8 @@
            perror("socket");
            return (-1);
        }
-       convert_call(ax25_config_get_addr(port), &sockaddr.ax25);
+        sprintf(path,"%s %s",local_call,ax25_config_get_addr(port));
+        convert_call(path, &sockaddr.ax25);
        sockaddr.ax25.fsa_ax25.sax25_family = AF_AX25;
        addrlen = sizeof(struct full_sockaddr_ax25);

@@ -1816,8 +1818,12 @@
     int p;
     int mode = TALKMODE;

-    while ((p = getopt(argc, argv, "b:dhm:p:rtvw:")) != -1) {
+    while ((p = getopt(argc, argv, "l:b:dhm:p:rtvw:")) != -1) {
        switch (p) {
+        case 'l':
+            strncpy(local_call,optarg,9);
+            local_call [9] = 0;
+            break;
        case 'b':
            if (*optarg != 'e' && *optarg != 'l') {
                fprintf(stderr, "call: invalid argument for option
'-b'\n");




--
Later...
Bob

http://gw.ko6ri.ampr.org/bbs

Reply via email to