print-ipx.c (17681) | print-ipx.c (17692) |
---|---|
1/* 2 * Copyright (c) 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 177 unchanged lines hidden (view full) --- 186 ipx++; 187 length -= 2; 188 189 switch (command) { 190 case 1: 191 (void)printf("ipx-rip-req"); 192 if (length > 0) { 193 TCHECK(ipx[3]); | 1/* 2 * Copyright (c) 1994, 1995, 1996 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 177 unchanged lines hidden (view full) --- 186 ipx++; 187 length -= 2; 188 189 switch (command) { 190 case 1: 191 (void)printf("ipx-rip-req"); 192 if (length > 0) { 193 TCHECK(ipx[3]); |
194 (void)printf(" %u/%d.%d", EXTRACT_32BITS(&ipx[0]), | 194 (void)printf(" %x/%d.%d", EXTRACT_32BITS(&ipx[0]), |
195 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3])); 196 } 197 break; 198 case 2: 199 (void)printf("ipx-rip-resp"); 200 for (i = 0; i < 50 && length > 0; i++) { 201 TCHECK(ipx[3]); | 195 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3])); 196 } 197 break; 198 case 2: 199 (void)printf("ipx-rip-resp"); 200 for (i = 0; i < 50 && length > 0; i++) { 201 TCHECK(ipx[3]); |
202 (void)printf(" %u/%d.%d", EXTRACT_32BITS(&ipx[0]), | 202 (void)printf(" %x/%d.%d", EXTRACT_32BITS(&ipx[0]), |
203 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3])); 204 205 ipx += 4; 206 length -= 8; 207 } 208 break; 209 default: 210 (void)printf("ipx-rip-?%x", command); 211 } 212 return; 213trunc: 214 printf("[|ipx %d]", length); 215} 216 | 203 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3])); 204 205 ipx += 4; 206 length -= 8; 207 } 208 break; 209 default: 210 (void)printf("ipx-rip-?%x", command); 211 } 212 return; 213trunc: 214 printf("[|ipx %d]", length); 215} 216 |