Make dissection of AVP: 3GPP-User-Location-Info(22) l=15 f=V-- vnd=TGPP val=303231...
[obnox/wireshark/wip.git] / mkcap.c
diff --git a/mkcap.c b/mkcap.c
index 383d532ac9da61988e1f731dbff616a42ebe98b2..c246c65f84a2fee66bc6e43ec661d8b79cff1823 100644 (file)
--- a/mkcap.c
+++ b/mkcap.c
@@ -2,7 +2,7 @@
  * A small program to generate the ASCII form of a capture with TCP
  * segments of a reasonable nature. The payload is all zeros.
  *
- * $Id: mkcap.c,v 1.2 2003/10/05 14:58:11 sharpe Exp $
+ * $Id$
  *
  * By Ronnie Sahlberg and Richard Sharpe. From a program initially 
  * written by Ronnie.
@@ -492,7 +492,7 @@ makeackedrundroppedtail8kb(int len, int spacing, int ackdelay)
 void usage()
 {
   fprintf(stderr, "Usage: mkcap [OPTIONS], where\n");
-  fprintf(stderr, "\t-a <ack-delay>        is the delay to an ACK (RTT)\n");
+  fprintf(stderr, "\t-a <ack-delay>        is the delay to an ACK (SRT)\n");
   fprintf(stderr, "\t-b <bytes-to-send>    is the bytes to send on connection\n");
   fprintf(stderr, "\t-i <ip-addr-hex>      is the sender IP address in hex\n");
   fprintf(stderr, "\t-I <ip-addr-hex>      is the recipient IP address in hex\n");
@@ -535,7 +535,7 @@ process_drop_list(char *drop_list)
     fprintf(stderr, "Strange drop list. NULL or an empty string. No drops!\n");
     return;
   }
-  save = (char *)strdup(drop_list);
+  save = (char *)g_strdup(drop_list);
 
   for (tok=(char *)strtok(drop_list, ","); tok; tok=(char *)strtok(NULL, ",")) {
     commas++;
@@ -544,11 +544,11 @@ process_drop_list(char *drop_list)
   /* Now, we have commas, divide by two and round up */
 
   seg_drop_count = (commas+1)/2;
-  drops = (seg_drop_t *)malloc(sizeof(seg_drop_t) * seg_drop_count);
+  drops = (seg_drop_t *)g_malloc(sizeof(seg_drop_t) * seg_drop_count);
   if (!drops) {
     fprintf(stderr, "Unable to allocate space for drops ... going without!\n");
     seg_drop_count = 0;
-    free(save);
+    g_free(save);
     return;
   }
 
@@ -563,8 +563,8 @@ process_drop_list(char *drop_list)
       fprintf(stderr, "Error in segment offset or count. Not all digits: %s\n",
              tok);
       fprintf(stderr, "No packet drops being performed!\n");
-      free(save);
-      free(drops);
+      g_free(save);
+      g_free(drops);
       seg_drop_count = 0; drops = NULL;
       return;
     }