Deleted Added
full compact
print-isakmp.c (111726) print-isakmp.c (124488)
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 318 unchanged lines hidden (view full) ---

327}
328
329static void
330rawprint(caddr_t loc, size_t len)
331{
332 static u_char *p;
333 int i;
334
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 318 unchanged lines hidden (view full) ---

327}
328
329static void
330rawprint(caddr_t loc, size_t len)
331{
332 static u_char *p;
333 int i;
334
335 TCHECK2(*loc, len);
336
335 p = (u_char *)loc;
336 for (i = 0; i < len; i++)
337 printf("%02x", p[i] & 0xff);
337 p = (u_char *)loc;
338 for (i = 0; i < len; i++)
339 printf("%02x", p[i] & 0xff);
340trunc:
341
338}
339
340struct attrmap {
341 char *type;
342 int nvalue;
343 char *value[30]; /*XXX*/
344};
345

--- 709 unchanged lines hidden (view full) ---

1055 u_char *cp;
1056 static int depth = 0;
1057 int i;
1058 struct isakmp_gen e;
1059
1060 cp = (u_char *)ext;
1061
1062 while (np) {
342}
343
344struct attrmap {
345 char *type;
346 int nvalue;
347 char *value[30]; /*XXX*/
348};
349

--- 709 unchanged lines hidden (view full) ---

1059 u_char *cp;
1060 static int depth = 0;
1061 int i;
1062 struct isakmp_gen e;
1063
1064 cp = (u_char *)ext;
1065
1066 while (np) {
1067 TCHECK2(*ext, sizeof(e));
1068
1063 safememcpy(&e, ext, sizeof(e));
1064
1065 if (ep < (u_char *)ext + ntohs(e.len)) {
1066 printf(" [|%s]", NPSTR(np));
1067 cp = ep + 1;
1068 break;
1069 }
1070 depth++;

--- 9 unchanged lines hidden (view full) ---

1080 /* Zero-length subitem */
1081 return NULL;
1082 }
1083
1084 np = e.np;
1085 ext = (struct isakmp_gen *)cp;
1086 }
1087 return cp;
1069 safememcpy(&e, ext, sizeof(e));
1070
1071 if (ep < (u_char *)ext + ntohs(e.len)) {
1072 printf(" [|%s]", NPSTR(np));
1073 cp = ep + 1;
1074 break;
1075 }
1076 depth++;

--- 9 unchanged lines hidden (view full) ---

1086 /* Zero-length subitem */
1087 return NULL;
1088 }
1089
1090 np = e.np;
1091 ext = (struct isakmp_gen *)cp;
1092 }
1093 return cp;
1094trunc:
1095 return NULL;
1088}
1089
1090static char *
1091numstr(int x)
1092{
1093 static char buf[20];
1094 snprintf(buf, sizeof(buf), "#%d", x);
1095 return buf;

--- 122 unchanged lines hidden ---
1096}
1097
1098static char *
1099numstr(int x)
1100{
1101 static char buf[20];
1102 snprintf(buf, sizeof(buf), "#%d", x);
1103 return buf;

--- 122 unchanged lines hidden ---