1 | #include <machine/rtems-bsd-user-space.h> |
---|
2 | |
---|
3 | /* |
---|
4 | * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 |
---|
5 | * The Regents of the University of California. All rights reserved. |
---|
6 | * |
---|
7 | * Redistribution and use in source and binary forms, with or without |
---|
8 | * modification, are permitted provided that: (1) source code distributions |
---|
9 | * retain the above copyright notice and this paragraph in its entirety, (2) |
---|
10 | * distributions including binary code include the above copyright notice and |
---|
11 | * this paragraph in its entirety in the documentation or other materials |
---|
12 | * provided with the distribution, and (3) all advertising materials mentioning |
---|
13 | * features or use of this software display the following acknowledgement: |
---|
14 | * ``This product includes software developed by the University of California, |
---|
15 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of |
---|
16 | * the University nor the names of its contributors may be used to endorse |
---|
17 | * or promote products derived from this software without specific prior |
---|
18 | * written permission. |
---|
19 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED |
---|
20 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
---|
21 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
---|
22 | * |
---|
23 | * PPTP support contributed by Motonori Shindo (mshindo@mshindo.net) |
---|
24 | */ |
---|
25 | |
---|
26 | |
---|
27 | #ifndef lint |
---|
28 | static const char rcsid[] _U_ = |
---|
29 | "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.12 2006-06-23 02:03:09 hannes Exp $"; |
---|
30 | #endif |
---|
31 | |
---|
32 | #ifdef HAVE_CONFIG_H |
---|
33 | #include "config.h" |
---|
34 | #endif |
---|
35 | |
---|
36 | #include <tcpdump-stdinc.h> |
---|
37 | |
---|
38 | #include <stdio.h> |
---|
39 | |
---|
40 | #include "interface.h" |
---|
41 | #include "extract.h" |
---|
42 | |
---|
43 | static char tstr[] = " [|pptp]"; |
---|
44 | |
---|
45 | #define PPTP_MSG_TYPE_CTRL 1 /* Control Message */ |
---|
46 | #define PPTP_MSG_TYPE_MGMT 2 /* Management Message (currently not used */ |
---|
47 | #define PPTP_MAGIC_COOKIE 0x1a2b3c4d /* for sanity check */ |
---|
48 | |
---|
49 | #define PPTP_CTRL_MSG_TYPE_SCCRQ 1 |
---|
50 | #define PPTP_CTRL_MSG_TYPE_SCCRP 2 |
---|
51 | #define PPTP_CTRL_MSG_TYPE_StopCCRQ 3 |
---|
52 | #define PPTP_CTRL_MSG_TYPE_StopCCRP 4 |
---|
53 | #define PPTP_CTRL_MSG_TYPE_ECHORQ 5 |
---|
54 | #define PPTP_CTRL_MSG_TYPE_ECHORP 6 |
---|
55 | #define PPTP_CTRL_MSG_TYPE_OCRQ 7 |
---|
56 | #define PPTP_CTRL_MSG_TYPE_OCRP 8 |
---|
57 | #define PPTP_CTRL_MSG_TYPE_ICRQ 9 |
---|
58 | #define PPTP_CTRL_MSG_TYPE_ICRP 10 |
---|
59 | #define PPTP_CTRL_MSG_TYPE_ICCN 11 |
---|
60 | #define PPTP_CTRL_MSG_TYPE_CCRQ 12 |
---|
61 | #define PPTP_CTRL_MSG_TYPE_CDN 13 |
---|
62 | #define PPTP_CTRL_MSG_TYPE_WEN 14 |
---|
63 | #define PPTP_CTRL_MSG_TYPE_SLI 15 |
---|
64 | |
---|
65 | #define PPTP_FRAMING_CAP_ASYNC_MASK 0x00000001 /* Aynchronous */ |
---|
66 | #define PPTP_FRAMING_CAP_SYNC_MASK 0x00000002 /* Synchronous */ |
---|
67 | |
---|
68 | #define PPTP_BEARER_CAP_ANALOG_MASK 0x00000001 /* Analog */ |
---|
69 | #define PPTP_BEARER_CAP_DIGITAL_MASK 0x00000002 /* Digital */ |
---|
70 | |
---|
71 | static const char *pptp_message_type_string[] = { |
---|
72 | "NOT_DEFINED", /* 0 Not defined in the RFC2637 */ |
---|
73 | "SCCRQ", /* 1 Start-Control-Connection-Request */ |
---|
74 | "SCCRP", /* 2 Start-Control-Connection-Reply */ |
---|
75 | "StopCCRQ", /* 3 Stop-Control-Connection-Request */ |
---|
76 | "StopCCRP", /* 4 Stop-Control-Connection-Reply */ |
---|
77 | "ECHORQ", /* 5 Echo Request */ |
---|
78 | "ECHORP", /* 6 Echo Reply */ |
---|
79 | |
---|
80 | "OCRQ", /* 7 Outgoing-Call-Request */ |
---|
81 | "OCRP", /* 8 Outgoing-Call-Reply */ |
---|
82 | "ICRQ", /* 9 Incoming-Call-Request */ |
---|
83 | "ICRP", /* 10 Incoming-Call-Reply */ |
---|
84 | "ICCN", /* 11 Incoming-Call-Connected */ |
---|
85 | "CCRQ", /* 12 Call-Clear-Request */ |
---|
86 | "CDN", /* 13 Call-Disconnect-Notify */ |
---|
87 | |
---|
88 | "WEN", /* 14 WAN-Error-Notify */ |
---|
89 | |
---|
90 | "SLI" /* 15 Set-Link-Info */ |
---|
91 | #define PPTP_MAX_MSGTYPE_INDEX 16 |
---|
92 | }; |
---|
93 | |
---|
94 | /* common for all PPTP control messages */ |
---|
95 | struct pptp_hdr { |
---|
96 | u_int16_t length; |
---|
97 | u_int16_t msg_type; |
---|
98 | u_int32_t magic_cookie; |
---|
99 | u_int16_t ctrl_msg_type; |
---|
100 | u_int16_t reserved0; |
---|
101 | }; |
---|
102 | |
---|
103 | struct pptp_msg_sccrq { |
---|
104 | u_int16_t proto_ver; |
---|
105 | u_int16_t reserved1; |
---|
106 | u_int32_t framing_cap; |
---|
107 | u_int32_t bearer_cap; |
---|
108 | u_int16_t max_channel; |
---|
109 | u_int16_t firm_rev; |
---|
110 | u_char hostname[64]; |
---|
111 | u_char vendor[64]; |
---|
112 | }; |
---|
113 | |
---|
114 | struct pptp_msg_sccrp { |
---|
115 | u_int16_t proto_ver; |
---|
116 | u_int8_t result_code; |
---|
117 | u_int8_t err_code; |
---|
118 | u_int32_t framing_cap; |
---|
119 | u_int32_t bearer_cap; |
---|
120 | u_int16_t max_channel; |
---|
121 | u_int16_t firm_rev; |
---|
122 | u_char hostname[64]; |
---|
123 | u_char vendor[64]; |
---|
124 | }; |
---|
125 | |
---|
126 | struct pptp_msg_stopccrq { |
---|
127 | u_int8_t reason; |
---|
128 | u_int8_t reserved1; |
---|
129 | u_int16_t reserved2; |
---|
130 | }; |
---|
131 | |
---|
132 | struct pptp_msg_stopccrp { |
---|
133 | u_int8_t result_code; |
---|
134 | u_int8_t err_code; |
---|
135 | u_int16_t reserved1; |
---|
136 | }; |
---|
137 | |
---|
138 | struct pptp_msg_echorq { |
---|
139 | u_int32_t id; |
---|
140 | }; |
---|
141 | |
---|
142 | struct pptp_msg_echorp { |
---|
143 | u_int32_t id; |
---|
144 | u_int8_t result_code; |
---|
145 | u_int8_t err_code; |
---|
146 | u_int16_t reserved1; |
---|
147 | }; |
---|
148 | |
---|
149 | struct pptp_msg_ocrq { |
---|
150 | u_int16_t call_id; |
---|
151 | u_int16_t call_ser; |
---|
152 | u_int32_t min_bps; |
---|
153 | u_int32_t max_bps; |
---|
154 | u_int32_t bearer_type; |
---|
155 | u_int32_t framing_type; |
---|
156 | u_int16_t recv_winsiz; |
---|
157 | u_int16_t pkt_proc_delay; |
---|
158 | u_int16_t phone_no_len; |
---|
159 | u_int16_t reserved1; |
---|
160 | u_char phone_no[64]; |
---|
161 | u_char subaddr[64]; |
---|
162 | }; |
---|
163 | |
---|
164 | struct pptp_msg_ocrp { |
---|
165 | u_int16_t call_id; |
---|
166 | u_int16_t peer_call_id; |
---|
167 | u_int8_t result_code; |
---|
168 | u_int8_t err_code; |
---|
169 | u_int16_t cause_code; |
---|
170 | u_int32_t conn_speed; |
---|
171 | u_int16_t recv_winsiz; |
---|
172 | u_int16_t pkt_proc_delay; |
---|
173 | u_int32_t phy_chan_id; |
---|
174 | }; |
---|
175 | |
---|
176 | struct pptp_msg_icrq { |
---|
177 | u_int16_t call_id; |
---|
178 | u_int16_t call_ser; |
---|
179 | u_int32_t bearer_type; |
---|
180 | u_int32_t phy_chan_id; |
---|
181 | u_int16_t dialed_no_len; |
---|
182 | u_int16_t dialing_no_len; |
---|
183 | u_char dialed_no[64]; /* DNIS */ |
---|
184 | u_char dialing_no[64]; /* CLID */ |
---|
185 | u_char subaddr[64]; |
---|
186 | }; |
---|
187 | |
---|
188 | struct pptp_msg_icrp { |
---|
189 | u_int16_t call_id; |
---|
190 | u_int16_t peer_call_id; |
---|
191 | u_int8_t result_code; |
---|
192 | u_int8_t err_code; |
---|
193 | u_int16_t recv_winsiz; |
---|
194 | u_int16_t pkt_proc_delay; |
---|
195 | u_int16_t reserved1; |
---|
196 | }; |
---|
197 | |
---|
198 | struct pptp_msg_iccn { |
---|
199 | u_int16_t peer_call_id; |
---|
200 | u_int16_t reserved1; |
---|
201 | u_int32_t conn_speed; |
---|
202 | u_int16_t recv_winsiz; |
---|
203 | u_int16_t pkt_proc_delay; |
---|
204 | u_int32_t framing_type; |
---|
205 | }; |
---|
206 | |
---|
207 | struct pptp_msg_ccrq { |
---|
208 | u_int16_t call_id; |
---|
209 | u_int16_t reserved1; |
---|
210 | }; |
---|
211 | |
---|
212 | struct pptp_msg_cdn { |
---|
213 | u_int16_t call_id; |
---|
214 | u_int8_t result_code; |
---|
215 | u_int8_t err_code; |
---|
216 | u_int16_t cause_code; |
---|
217 | u_int16_t reserved1; |
---|
218 | u_char call_stats[128]; |
---|
219 | }; |
---|
220 | |
---|
221 | struct pptp_msg_wen { |
---|
222 | u_int16_t peer_call_id; |
---|
223 | u_int16_t reserved1; |
---|
224 | u_int32_t crc_err; |
---|
225 | u_int32_t framing_err; |
---|
226 | u_int32_t hardware_overrun; |
---|
227 | u_int32_t buffer_overrun; |
---|
228 | u_int32_t timeout_err; |
---|
229 | u_int32_t align_err; |
---|
230 | }; |
---|
231 | |
---|
232 | struct pptp_msg_sli { |
---|
233 | u_int16_t peer_call_id; |
---|
234 | u_int16_t reserved1; |
---|
235 | u_int32_t send_accm; |
---|
236 | u_int32_t recv_accm; |
---|
237 | }; |
---|
238 | |
---|
239 | /* attributes that appear more than once in above messages: |
---|
240 | |
---|
241 | Number of |
---|
242 | occurence attributes |
---|
243 | -------------------------------------- |
---|
244 | 2 u_int32_t bearer_cap; |
---|
245 | 2 u_int32_t bearer_type; |
---|
246 | 6 u_int16_t call_id; |
---|
247 | 2 u_int16_t call_ser; |
---|
248 | 2 u_int16_t cause_code; |
---|
249 | 2 u_int32_t conn_speed; |
---|
250 | 6 u_int8_t err_code; |
---|
251 | 2 u_int16_t firm_rev; |
---|
252 | 2 u_int32_t framing_cap; |
---|
253 | 2 u_int32_t framing_type; |
---|
254 | 2 u_char hostname[64]; |
---|
255 | 2 u_int32_t id; |
---|
256 | 2 u_int16_t max_channel; |
---|
257 | 5 u_int16_t peer_call_id; |
---|
258 | 2 u_int32_t phy_chan_id; |
---|
259 | 4 u_int16_t pkt_proc_delay; |
---|
260 | 2 u_int16_t proto_ver; |
---|
261 | 4 u_int16_t recv_winsiz; |
---|
262 | 2 u_int8_t reserved1; |
---|
263 | 9 u_int16_t reserved1; |
---|
264 | 6 u_int8_t result_code; |
---|
265 | 2 u_char subaddr[64]; |
---|
266 | 2 u_char vendor[64]; |
---|
267 | |
---|
268 | so I will prepare print out functions for these attributes (except for |
---|
269 | reserved*). |
---|
270 | */ |
---|
271 | |
---|
272 | /******************************************/ |
---|
273 | /* Attribute-specific print out functions */ |
---|
274 | /******************************************/ |
---|
275 | |
---|
276 | /* In these attribute-specific print-out functions, it't not necessary |
---|
277 | to do TCHECK because they are already checked in the caller of |
---|
278 | these functions. */ |
---|
279 | |
---|
280 | static void |
---|
281 | pptp_bearer_cap_print(const u_int32_t *bearer_cap) |
---|
282 | { |
---|
283 | printf(" BEARER_CAP("); |
---|
284 | if (EXTRACT_32BITS(bearer_cap) & PPTP_BEARER_CAP_DIGITAL_MASK) { |
---|
285 | printf("D"); |
---|
286 | } |
---|
287 | if (EXTRACT_32BITS(bearer_cap) & PPTP_BEARER_CAP_ANALOG_MASK) { |
---|
288 | printf("A"); |
---|
289 | } |
---|
290 | printf(")"); |
---|
291 | } |
---|
292 | |
---|
293 | static void |
---|
294 | pptp_bearer_type_print(const u_int32_t *bearer_type) |
---|
295 | { |
---|
296 | printf(" BEARER_TYPE("); |
---|
297 | switch (EXTRACT_32BITS(bearer_type)) { |
---|
298 | case 1: |
---|
299 | printf("A"); /* Analog */ |
---|
300 | break; |
---|
301 | case 2: |
---|
302 | printf("D"); /* Digital */ |
---|
303 | break; |
---|
304 | case 3: |
---|
305 | printf("Any"); |
---|
306 | break; |
---|
307 | default: |
---|
308 | printf("?"); |
---|
309 | break; |
---|
310 | } |
---|
311 | printf(")"); |
---|
312 | } |
---|
313 | |
---|
314 | static void |
---|
315 | pptp_call_id_print(const u_int16_t *call_id) |
---|
316 | { |
---|
317 | printf(" CALL_ID(%u)", EXTRACT_16BITS(call_id)); |
---|
318 | } |
---|
319 | |
---|
320 | static void |
---|
321 | pptp_call_ser_print(const u_int16_t *call_ser) |
---|
322 | { |
---|
323 | printf(" CALL_SER_NUM(%u)", EXTRACT_16BITS(call_ser)); |
---|
324 | } |
---|
325 | |
---|
326 | static void |
---|
327 | pptp_cause_code_print(const u_int16_t *cause_code) |
---|
328 | { |
---|
329 | printf(" CAUSE_CODE(%u)", EXTRACT_16BITS(cause_code)); |
---|
330 | } |
---|
331 | |
---|
332 | static void |
---|
333 | pptp_conn_speed_print(const u_int32_t *conn_speed) |
---|
334 | { |
---|
335 | printf(" CONN_SPEED(%u)", EXTRACT_32BITS(conn_speed)); |
---|
336 | } |
---|
337 | |
---|
338 | static void |
---|
339 | pptp_err_code_print(const u_int8_t *err_code) |
---|
340 | { |
---|
341 | printf(" ERR_CODE(%u", *err_code); |
---|
342 | if (vflag) { |
---|
343 | switch (*err_code) { |
---|
344 | case 0: |
---|
345 | printf(":None"); |
---|
346 | break; |
---|
347 | case 1: |
---|
348 | printf(":Not-Connected"); |
---|
349 | break; |
---|
350 | case 2: |
---|
351 | printf(":Bad-Format"); |
---|
352 | break; |
---|
353 | case 3: |
---|
354 | printf(":Bad-Valude"); |
---|
355 | break; |
---|
356 | case 4: |
---|
357 | printf(":No-Resource"); |
---|
358 | break; |
---|
359 | case 5: |
---|
360 | printf(":Bad-Call-ID"); |
---|
361 | break; |
---|
362 | case 6: |
---|
363 | printf(":PAC-Error"); |
---|
364 | break; |
---|
365 | default: |
---|
366 | printf(":?"); |
---|
367 | break; |
---|
368 | } |
---|
369 | } |
---|
370 | printf(")"); |
---|
371 | } |
---|
372 | |
---|
373 | static void |
---|
374 | pptp_firm_rev_print(const u_int16_t *firm_rev) |
---|
375 | { |
---|
376 | printf(" FIRM_REV(%u)", EXTRACT_16BITS(firm_rev)); |
---|
377 | } |
---|
378 | |
---|
379 | static void |
---|
380 | pptp_framing_cap_print(const u_int32_t *framing_cap) |
---|
381 | { |
---|
382 | printf(" FRAME_CAP("); |
---|
383 | if (EXTRACT_32BITS(framing_cap) & PPTP_FRAMING_CAP_ASYNC_MASK) { |
---|
384 | printf("A"); /* Async */ |
---|
385 | } |
---|
386 | if (EXTRACT_32BITS(framing_cap) & PPTP_FRAMING_CAP_SYNC_MASK) { |
---|
387 | printf("S"); /* Sync */ |
---|
388 | } |
---|
389 | printf(")"); |
---|
390 | } |
---|
391 | |
---|
392 | static void |
---|
393 | pptp_framing_type_print(const u_int32_t *framing_type) |
---|
394 | { |
---|
395 | printf(" FRAME_TYPE("); |
---|
396 | switch (EXTRACT_32BITS(framing_type)) { |
---|
397 | case 1: |
---|
398 | printf("A"); /* Async */ |
---|
399 | break; |
---|
400 | case 2: |
---|
401 | printf("S"); /* Sync */ |
---|
402 | break; |
---|
403 | case 3: |
---|
404 | printf("E"); /* Either */ |
---|
405 | break; |
---|
406 | default: |
---|
407 | printf("?"); |
---|
408 | break; |
---|
409 | } |
---|
410 | printf(")"); |
---|
411 | } |
---|
412 | |
---|
413 | static void |
---|
414 | pptp_hostname_print(const u_char *hostname) |
---|
415 | { |
---|
416 | printf(" HOSTNAME(%.64s)", hostname); |
---|
417 | } |
---|
418 | |
---|
419 | static void |
---|
420 | pptp_id_print(const u_int32_t *id) |
---|
421 | { |
---|
422 | printf(" ID(%u)", EXTRACT_32BITS(id)); |
---|
423 | } |
---|
424 | |
---|
425 | static void |
---|
426 | pptp_max_channel_print(const u_int16_t *max_channel) |
---|
427 | { |
---|
428 | printf(" MAX_CHAN(%u)", EXTRACT_16BITS(max_channel)); |
---|
429 | } |
---|
430 | |
---|
431 | static void |
---|
432 | pptp_peer_call_id_print(const u_int16_t *peer_call_id) |
---|
433 | { |
---|
434 | printf(" PEER_CALL_ID(%u)", EXTRACT_16BITS(peer_call_id)); |
---|
435 | } |
---|
436 | |
---|
437 | static void |
---|
438 | pptp_phy_chan_id_print(const u_int32_t *phy_chan_id) |
---|
439 | { |
---|
440 | printf(" PHY_CHAN_ID(%u)", EXTRACT_32BITS(phy_chan_id)); |
---|
441 | } |
---|
442 | |
---|
443 | static void |
---|
444 | pptp_pkt_proc_delay_print(const u_int16_t *pkt_proc_delay) |
---|
445 | { |
---|
446 | printf(" PROC_DELAY(%u)", EXTRACT_16BITS(pkt_proc_delay)); |
---|
447 | } |
---|
448 | |
---|
449 | static void |
---|
450 | pptp_proto_ver_print(const u_int16_t *proto_ver) |
---|
451 | { |
---|
452 | printf(" PROTO_VER(%u.%u)", /* Version.Revision */ |
---|
453 | EXTRACT_16BITS(proto_ver) >> 8, |
---|
454 | EXTRACT_16BITS(proto_ver) & 0xff); |
---|
455 | } |
---|
456 | |
---|
457 | static void |
---|
458 | pptp_recv_winsiz_print(const u_int16_t *recv_winsiz) |
---|
459 | { |
---|
460 | printf(" RECV_WIN(%u)", EXTRACT_16BITS(recv_winsiz)); |
---|
461 | } |
---|
462 | |
---|
463 | static void |
---|
464 | pptp_result_code_print(const u_int8_t *result_code, int ctrl_msg_type) |
---|
465 | { |
---|
466 | printf(" RESULT_CODE(%u", *result_code); |
---|
467 | if (vflag) { |
---|
468 | switch (ctrl_msg_type) { |
---|
469 | case PPTP_CTRL_MSG_TYPE_SCCRP: |
---|
470 | switch (*result_code) { |
---|
471 | case 1: |
---|
472 | printf(":Successful channel establishment"); |
---|
473 | break; |
---|
474 | case 2: |
---|
475 | printf(":General error"); |
---|
476 | break; |
---|
477 | case 3: |
---|
478 | printf(":Command channel already exists"); |
---|
479 | break; |
---|
480 | case 4: |
---|
481 | printf(":Requester is not authorized to establish a command channel"); |
---|
482 | break; |
---|
483 | case 5: |
---|
484 | printf(":The protocol version of the requester is not supported"); |
---|
485 | break; |
---|
486 | default: |
---|
487 | printf(":?"); |
---|
488 | break; |
---|
489 | } |
---|
490 | break; |
---|
491 | case PPTP_CTRL_MSG_TYPE_StopCCRP: |
---|
492 | case PPTP_CTRL_MSG_TYPE_ECHORP: |
---|
493 | switch (*result_code) { |
---|
494 | case 1: |
---|
495 | printf(":OK"); |
---|
496 | break; |
---|
497 | case 2: |
---|
498 | printf(":General Error"); |
---|
499 | break; |
---|
500 | default: |
---|
501 | printf(":?"); |
---|
502 | break; |
---|
503 | } |
---|
504 | break; |
---|
505 | case PPTP_CTRL_MSG_TYPE_OCRP: |
---|
506 | switch (*result_code) { |
---|
507 | case 1: |
---|
508 | printf(":Connected"); |
---|
509 | break; |
---|
510 | case 2: |
---|
511 | printf(":General Error"); |
---|
512 | break; |
---|
513 | case 3: |
---|
514 | printf(":No Carrier"); |
---|
515 | break; |
---|
516 | case 4: |
---|
517 | printf(":Busy"); |
---|
518 | break; |
---|
519 | case 5: |
---|
520 | printf(":No Dial Tone"); |
---|
521 | break; |
---|
522 | case 6: |
---|
523 | printf(":Time-out"); |
---|
524 | break; |
---|
525 | case 7: |
---|
526 | printf(":Do Not Accept"); |
---|
527 | break; |
---|
528 | default: |
---|
529 | printf(":?"); |
---|
530 | break; |
---|
531 | } |
---|
532 | break; |
---|
533 | case PPTP_CTRL_MSG_TYPE_ICRP: |
---|
534 | switch (*result_code) { |
---|
535 | case 1: |
---|
536 | printf(":Connect"); |
---|
537 | break; |
---|
538 | case 2: |
---|
539 | printf(":General Error"); |
---|
540 | break; |
---|
541 | case 3: |
---|
542 | printf(":Do Not Accept"); |
---|
543 | break; |
---|
544 | default: |
---|
545 | printf(":?"); |
---|
546 | break; |
---|
547 | } |
---|
548 | break; |
---|
549 | case PPTP_CTRL_MSG_TYPE_CDN: |
---|
550 | switch (*result_code) { |
---|
551 | case 1: |
---|
552 | printf(":Lost Carrier"); |
---|
553 | break; |
---|
554 | case 2: |
---|
555 | printf(":General Error"); |
---|
556 | break; |
---|
557 | case 3: |
---|
558 | printf(":Admin Shutdown"); |
---|
559 | break; |
---|
560 | case 4: |
---|
561 | printf(":Request"); |
---|
562 | default: |
---|
563 | printf(":?"); |
---|
564 | break; |
---|
565 | break; |
---|
566 | } |
---|
567 | default: |
---|
568 | /* assertion error */ |
---|
569 | break; |
---|
570 | } |
---|
571 | } |
---|
572 | printf(")"); |
---|
573 | } |
---|
574 | |
---|
575 | static void |
---|
576 | pptp_subaddr_print(const u_char *subaddr) |
---|
577 | { |
---|
578 | printf(" SUB_ADDR(%.64s)", subaddr); |
---|
579 | } |
---|
580 | |
---|
581 | static void |
---|
582 | pptp_vendor_print(const u_char *vendor) |
---|
583 | { |
---|
584 | printf(" VENDOR(%.64s)", vendor); |
---|
585 | } |
---|
586 | |
---|
587 | /************************************/ |
---|
588 | /* PPTP message print out functions */ |
---|
589 | /************************************/ |
---|
590 | static void |
---|
591 | pptp_sccrq_print(const u_char *dat) |
---|
592 | { |
---|
593 | struct pptp_msg_sccrq *ptr = (struct pptp_msg_sccrq *)dat; |
---|
594 | |
---|
595 | TCHECK(ptr->proto_ver); |
---|
596 | pptp_proto_ver_print(&ptr->proto_ver); |
---|
597 | TCHECK(ptr->reserved1); |
---|
598 | TCHECK(ptr->framing_cap); |
---|
599 | pptp_framing_cap_print(&ptr->framing_cap); |
---|
600 | TCHECK(ptr->bearer_cap); |
---|
601 | pptp_bearer_cap_print(&ptr->bearer_cap); |
---|
602 | TCHECK(ptr->max_channel); |
---|
603 | pptp_max_channel_print(&ptr->max_channel); |
---|
604 | TCHECK(ptr->firm_rev); |
---|
605 | pptp_firm_rev_print(&ptr->firm_rev); |
---|
606 | TCHECK(ptr->hostname); |
---|
607 | pptp_hostname_print(&ptr->hostname[0]); |
---|
608 | TCHECK(ptr->vendor); |
---|
609 | pptp_vendor_print(&ptr->vendor[0]); |
---|
610 | |
---|
611 | return; |
---|
612 | |
---|
613 | trunc: |
---|
614 | printf("%s", tstr); |
---|
615 | } |
---|
616 | |
---|
617 | static void |
---|
618 | pptp_sccrp_print(const u_char *dat) |
---|
619 | { |
---|
620 | struct pptp_msg_sccrp *ptr = (struct pptp_msg_sccrp *)dat; |
---|
621 | |
---|
622 | TCHECK(ptr->proto_ver); |
---|
623 | pptp_proto_ver_print(&ptr->proto_ver); |
---|
624 | TCHECK(ptr->result_code); |
---|
625 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_SCCRP); |
---|
626 | TCHECK(ptr->err_code); |
---|
627 | pptp_err_code_print(&ptr->err_code); |
---|
628 | TCHECK(ptr->framing_cap); |
---|
629 | pptp_framing_cap_print(&ptr->framing_cap); |
---|
630 | TCHECK(ptr->bearer_cap); |
---|
631 | pptp_bearer_cap_print(&ptr->bearer_cap); |
---|
632 | TCHECK(ptr->max_channel); |
---|
633 | pptp_max_channel_print(&ptr->max_channel); |
---|
634 | TCHECK(ptr->firm_rev); |
---|
635 | pptp_firm_rev_print(&ptr->firm_rev); |
---|
636 | TCHECK(ptr->hostname); |
---|
637 | pptp_hostname_print(&ptr->hostname[0]); |
---|
638 | TCHECK(ptr->vendor); |
---|
639 | pptp_vendor_print(&ptr->vendor[0]); |
---|
640 | |
---|
641 | return; |
---|
642 | |
---|
643 | trunc: |
---|
644 | printf("%s", tstr); |
---|
645 | } |
---|
646 | |
---|
647 | static void |
---|
648 | pptp_stopccrq_print(const u_char *dat) |
---|
649 | { |
---|
650 | struct pptp_msg_stopccrq *ptr = (struct pptp_msg_stopccrq *)dat; |
---|
651 | |
---|
652 | TCHECK(ptr->reason); |
---|
653 | printf(" REASON(%u", ptr->reason); |
---|
654 | if (vflag) { |
---|
655 | switch (ptr->reason) { |
---|
656 | case 1: |
---|
657 | printf(":None"); |
---|
658 | break; |
---|
659 | case 2: |
---|
660 | printf(":Stop-Protocol"); |
---|
661 | break; |
---|
662 | case 3: |
---|
663 | printf(":Stop-Local-Shutdown"); |
---|
664 | break; |
---|
665 | default: |
---|
666 | printf(":?"); |
---|
667 | break; |
---|
668 | } |
---|
669 | } |
---|
670 | printf(")"); |
---|
671 | TCHECK(ptr->reserved1); |
---|
672 | TCHECK(ptr->reserved2); |
---|
673 | |
---|
674 | return; |
---|
675 | |
---|
676 | trunc: |
---|
677 | printf("%s", tstr); |
---|
678 | } |
---|
679 | |
---|
680 | static void |
---|
681 | pptp_stopccrp_print(const u_char *dat) |
---|
682 | { |
---|
683 | struct pptp_msg_stopccrp *ptr = (struct pptp_msg_stopccrp *)dat; |
---|
684 | |
---|
685 | TCHECK(ptr->result_code); |
---|
686 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_StopCCRP); |
---|
687 | TCHECK(ptr->err_code); |
---|
688 | pptp_err_code_print(&ptr->err_code); |
---|
689 | TCHECK(ptr->reserved1); |
---|
690 | |
---|
691 | return; |
---|
692 | |
---|
693 | trunc: |
---|
694 | printf("%s", tstr); |
---|
695 | } |
---|
696 | |
---|
697 | static void |
---|
698 | pptp_echorq_print(const u_char *dat) |
---|
699 | { |
---|
700 | struct pptp_msg_echorq *ptr = (struct pptp_msg_echorq *)dat; |
---|
701 | |
---|
702 | TCHECK(ptr->id); |
---|
703 | pptp_id_print(&ptr->id); |
---|
704 | |
---|
705 | return; |
---|
706 | |
---|
707 | trunc: |
---|
708 | printf("%s", tstr); |
---|
709 | } |
---|
710 | |
---|
711 | static void |
---|
712 | pptp_echorp_print(const u_char *dat) |
---|
713 | { |
---|
714 | struct pptp_msg_echorp *ptr = (struct pptp_msg_echorp *)dat; |
---|
715 | |
---|
716 | TCHECK(ptr->id); |
---|
717 | pptp_id_print(&ptr->id); |
---|
718 | TCHECK(ptr->result_code); |
---|
719 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_ECHORP); |
---|
720 | TCHECK(ptr->err_code); |
---|
721 | pptp_err_code_print(&ptr->err_code); |
---|
722 | TCHECK(ptr->reserved1); |
---|
723 | |
---|
724 | return; |
---|
725 | |
---|
726 | trunc: |
---|
727 | printf("%s", tstr); |
---|
728 | } |
---|
729 | |
---|
730 | static void |
---|
731 | pptp_ocrq_print(const u_char *dat) |
---|
732 | { |
---|
733 | struct pptp_msg_ocrq *ptr = (struct pptp_msg_ocrq *)dat; |
---|
734 | |
---|
735 | TCHECK(ptr->call_id); |
---|
736 | pptp_call_id_print(&ptr->call_id); |
---|
737 | TCHECK(ptr->call_ser); |
---|
738 | pptp_call_ser_print(&ptr->call_ser); |
---|
739 | TCHECK(ptr->min_bps); |
---|
740 | printf(" MIN_BPS(%u)", EXTRACT_32BITS(&ptr->min_bps)); |
---|
741 | TCHECK(ptr->max_bps); |
---|
742 | printf(" MAX_BPS(%u)", EXTRACT_32BITS(&ptr->max_bps)); |
---|
743 | TCHECK(ptr->bearer_type); |
---|
744 | pptp_bearer_type_print(&ptr->bearer_type); |
---|
745 | TCHECK(ptr->framing_type); |
---|
746 | pptp_framing_type_print(&ptr->framing_type); |
---|
747 | TCHECK(ptr->recv_winsiz); |
---|
748 | pptp_recv_winsiz_print(&ptr->recv_winsiz); |
---|
749 | TCHECK(ptr->pkt_proc_delay); |
---|
750 | pptp_pkt_proc_delay_print(&ptr->pkt_proc_delay); |
---|
751 | TCHECK(ptr->phone_no_len); |
---|
752 | printf(" PHONE_NO_LEN(%u)", EXTRACT_16BITS(&ptr->phone_no_len)); |
---|
753 | TCHECK(ptr->reserved1); |
---|
754 | TCHECK(ptr->phone_no); |
---|
755 | printf(" PHONE_NO(%.64s)", ptr->phone_no); |
---|
756 | TCHECK(ptr->subaddr); |
---|
757 | pptp_subaddr_print(&ptr->subaddr[0]); |
---|
758 | |
---|
759 | return; |
---|
760 | |
---|
761 | trunc: |
---|
762 | printf("%s", tstr); |
---|
763 | } |
---|
764 | |
---|
765 | static void |
---|
766 | pptp_ocrp_print(const u_char *dat) |
---|
767 | { |
---|
768 | struct pptp_msg_ocrp *ptr = (struct pptp_msg_ocrp *)dat; |
---|
769 | |
---|
770 | TCHECK(ptr->call_id); |
---|
771 | pptp_call_id_print(&ptr->call_id); |
---|
772 | TCHECK(ptr->peer_call_id); |
---|
773 | pptp_peer_call_id_print(&ptr->peer_call_id); |
---|
774 | TCHECK(ptr->result_code); |
---|
775 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_OCRP); |
---|
776 | TCHECK(ptr->err_code); |
---|
777 | pptp_err_code_print(&ptr->err_code); |
---|
778 | TCHECK(ptr->cause_code); |
---|
779 | pptp_cause_code_print(&ptr->cause_code); |
---|
780 | TCHECK(ptr->conn_speed); |
---|
781 | pptp_conn_speed_print(&ptr->conn_speed); |
---|
782 | TCHECK(ptr->recv_winsiz); |
---|
783 | pptp_recv_winsiz_print(&ptr->recv_winsiz); |
---|
784 | TCHECK(ptr->pkt_proc_delay); |
---|
785 | pptp_pkt_proc_delay_print(&ptr->pkt_proc_delay); |
---|
786 | TCHECK(ptr->phy_chan_id); |
---|
787 | pptp_phy_chan_id_print(&ptr->phy_chan_id); |
---|
788 | |
---|
789 | return; |
---|
790 | |
---|
791 | trunc: |
---|
792 | printf("%s", tstr); |
---|
793 | } |
---|
794 | |
---|
795 | static void |
---|
796 | pptp_icrq_print(const u_char *dat) |
---|
797 | { |
---|
798 | struct pptp_msg_icrq *ptr = (struct pptp_msg_icrq *)dat; |
---|
799 | |
---|
800 | TCHECK(ptr->call_id); |
---|
801 | pptp_call_id_print(&ptr->call_id); |
---|
802 | TCHECK(ptr->call_ser); |
---|
803 | pptp_call_ser_print(&ptr->call_ser); |
---|
804 | TCHECK(ptr->bearer_type); |
---|
805 | pptp_bearer_type_print(&ptr->bearer_type); |
---|
806 | TCHECK(ptr->phy_chan_id); |
---|
807 | pptp_phy_chan_id_print(&ptr->phy_chan_id); |
---|
808 | TCHECK(ptr->dialed_no_len); |
---|
809 | printf(" DIALED_NO_LEN(%u)", EXTRACT_16BITS(&ptr->dialed_no_len)); |
---|
810 | TCHECK(ptr->dialing_no_len); |
---|
811 | printf(" DIALING_NO_LEN(%u)", EXTRACT_16BITS(&ptr->dialing_no_len)); |
---|
812 | TCHECK(ptr->dialed_no); |
---|
813 | printf(" DIALED_NO(%.64s)", ptr->dialed_no); |
---|
814 | TCHECK(ptr->dialing_no); |
---|
815 | printf(" DIALING_NO(%.64s)", ptr->dialing_no); |
---|
816 | TCHECK(ptr->subaddr); |
---|
817 | pptp_subaddr_print(&ptr->subaddr[0]); |
---|
818 | |
---|
819 | return; |
---|
820 | |
---|
821 | trunc: |
---|
822 | printf("%s", tstr); |
---|
823 | } |
---|
824 | |
---|
825 | static void |
---|
826 | pptp_icrp_print(const u_char *dat) |
---|
827 | { |
---|
828 | struct pptp_msg_icrp *ptr = (struct pptp_msg_icrp *)dat; |
---|
829 | |
---|
830 | TCHECK(ptr->call_id); |
---|
831 | pptp_call_id_print(&ptr->call_id); |
---|
832 | TCHECK(ptr->peer_call_id); |
---|
833 | pptp_peer_call_id_print(&ptr->peer_call_id); |
---|
834 | TCHECK(ptr->result_code); |
---|
835 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_ICRP); |
---|
836 | TCHECK(ptr->err_code); |
---|
837 | pptp_err_code_print(&ptr->err_code); |
---|
838 | TCHECK(ptr->recv_winsiz); |
---|
839 | pptp_recv_winsiz_print(&ptr->recv_winsiz); |
---|
840 | TCHECK(ptr->pkt_proc_delay); |
---|
841 | pptp_pkt_proc_delay_print(&ptr->pkt_proc_delay); |
---|
842 | TCHECK(ptr->reserved1); |
---|
843 | |
---|
844 | return; |
---|
845 | |
---|
846 | trunc: |
---|
847 | printf("%s", tstr); |
---|
848 | } |
---|
849 | |
---|
850 | static void |
---|
851 | pptp_iccn_print(const u_char *dat) |
---|
852 | { |
---|
853 | struct pptp_msg_iccn *ptr = (struct pptp_msg_iccn *)dat; |
---|
854 | |
---|
855 | TCHECK(ptr->peer_call_id); |
---|
856 | pptp_peer_call_id_print(&ptr->peer_call_id); |
---|
857 | TCHECK(ptr->reserved1); |
---|
858 | TCHECK(ptr->conn_speed); |
---|
859 | pptp_conn_speed_print(&ptr->conn_speed); |
---|
860 | TCHECK(ptr->recv_winsiz); |
---|
861 | pptp_recv_winsiz_print(&ptr->recv_winsiz); |
---|
862 | TCHECK(ptr->pkt_proc_delay); |
---|
863 | pptp_pkt_proc_delay_print(&ptr->pkt_proc_delay); |
---|
864 | TCHECK(ptr->framing_type); |
---|
865 | pptp_framing_type_print(&ptr->framing_type); |
---|
866 | |
---|
867 | return; |
---|
868 | |
---|
869 | trunc: |
---|
870 | printf("%s", tstr); |
---|
871 | } |
---|
872 | |
---|
873 | static void |
---|
874 | pptp_ccrq_print(const u_char *dat) |
---|
875 | { |
---|
876 | struct pptp_msg_ccrq *ptr = (struct pptp_msg_ccrq *)dat; |
---|
877 | |
---|
878 | TCHECK(ptr->call_id); |
---|
879 | pptp_call_id_print(&ptr->call_id); |
---|
880 | TCHECK(ptr->reserved1); |
---|
881 | |
---|
882 | return; |
---|
883 | |
---|
884 | trunc: |
---|
885 | printf("%s", tstr); |
---|
886 | } |
---|
887 | |
---|
888 | static void |
---|
889 | pptp_cdn_print(const u_char *dat) |
---|
890 | { |
---|
891 | struct pptp_msg_cdn *ptr = (struct pptp_msg_cdn *)dat; |
---|
892 | |
---|
893 | TCHECK(ptr->call_id); |
---|
894 | pptp_call_id_print(&ptr->call_id); |
---|
895 | TCHECK(ptr->result_code); |
---|
896 | pptp_result_code_print(&ptr->result_code, PPTP_CTRL_MSG_TYPE_CDN); |
---|
897 | TCHECK(ptr->err_code); |
---|
898 | pptp_err_code_print(&ptr->err_code); |
---|
899 | TCHECK(ptr->cause_code); |
---|
900 | pptp_cause_code_print(&ptr->cause_code); |
---|
901 | TCHECK(ptr->reserved1); |
---|
902 | TCHECK(ptr->call_stats); |
---|
903 | printf(" CALL_STATS(%.128s)", ptr->call_stats); |
---|
904 | |
---|
905 | return; |
---|
906 | |
---|
907 | trunc: |
---|
908 | printf("%s", tstr); |
---|
909 | } |
---|
910 | |
---|
911 | static void |
---|
912 | pptp_wen_print(const u_char *dat) |
---|
913 | { |
---|
914 | struct pptp_msg_wen *ptr = (struct pptp_msg_wen *)dat; |
---|
915 | |
---|
916 | TCHECK(ptr->peer_call_id); |
---|
917 | pptp_peer_call_id_print(&ptr->peer_call_id); |
---|
918 | TCHECK(ptr->reserved1); |
---|
919 | TCHECK(ptr->crc_err); |
---|
920 | printf(" CRC_ERR(%u)", EXTRACT_32BITS(&ptr->crc_err)); |
---|
921 | TCHECK(ptr->framing_err); |
---|
922 | printf(" FRAMING_ERR(%u)", EXTRACT_32BITS(&ptr->framing_err)); |
---|
923 | TCHECK(ptr->hardware_overrun); |
---|
924 | printf(" HARDWARE_OVERRUN(%u)", EXTRACT_32BITS(&ptr->hardware_overrun)); |
---|
925 | TCHECK(ptr->buffer_overrun); |
---|
926 | printf(" BUFFER_OVERRUN(%u)", EXTRACT_32BITS(&ptr->buffer_overrun)); |
---|
927 | TCHECK(ptr->timeout_err); |
---|
928 | printf(" TIMEOUT_ERR(%u)", EXTRACT_32BITS(&ptr->timeout_err)); |
---|
929 | TCHECK(ptr->align_err); |
---|
930 | printf(" ALIGN_ERR(%u)", EXTRACT_32BITS(&ptr->align_err)); |
---|
931 | |
---|
932 | return; |
---|
933 | |
---|
934 | trunc: |
---|
935 | printf("%s", tstr); |
---|
936 | } |
---|
937 | |
---|
938 | static void |
---|
939 | pptp_sli_print(const u_char *dat) |
---|
940 | { |
---|
941 | struct pptp_msg_sli *ptr = (struct pptp_msg_sli *)dat; |
---|
942 | |
---|
943 | TCHECK(ptr->peer_call_id); |
---|
944 | pptp_peer_call_id_print(&ptr->peer_call_id); |
---|
945 | TCHECK(ptr->reserved1); |
---|
946 | TCHECK(ptr->send_accm); |
---|
947 | printf(" SEND_ACCM(0x%08x)", EXTRACT_32BITS(&ptr->send_accm)); |
---|
948 | TCHECK(ptr->recv_accm); |
---|
949 | printf(" RECV_ACCM(0x%08x)", EXTRACT_32BITS(&ptr->recv_accm)); |
---|
950 | |
---|
951 | return; |
---|
952 | |
---|
953 | trunc: |
---|
954 | printf("%s", tstr); |
---|
955 | } |
---|
956 | |
---|
957 | void |
---|
958 | pptp_print(const u_char *dat) |
---|
959 | { |
---|
960 | const struct pptp_hdr *hdr; |
---|
961 | u_int32_t mc; |
---|
962 | u_int16_t ctrl_msg_type; |
---|
963 | |
---|
964 | printf(": pptp"); |
---|
965 | |
---|
966 | hdr = (struct pptp_hdr *)dat; |
---|
967 | |
---|
968 | TCHECK(hdr->length); |
---|
969 | if (vflag) { |
---|
970 | printf(" Length=%u", EXTRACT_16BITS(&hdr->length)); |
---|
971 | } |
---|
972 | TCHECK(hdr->msg_type); |
---|
973 | if (vflag) { |
---|
974 | switch(EXTRACT_16BITS(&hdr->msg_type)) { |
---|
975 | case PPTP_MSG_TYPE_CTRL: |
---|
976 | printf(" CTRL-MSG"); |
---|
977 | break; |
---|
978 | case PPTP_MSG_TYPE_MGMT: |
---|
979 | printf(" MGMT-MSG"); |
---|
980 | break; |
---|
981 | default: |
---|
982 | printf(" UNKNOWN-MSG-TYPE"); |
---|
983 | break; |
---|
984 | } |
---|
985 | } |
---|
986 | |
---|
987 | TCHECK(hdr->magic_cookie); |
---|
988 | mc = EXTRACT_32BITS(&hdr->magic_cookie); |
---|
989 | if (mc != PPTP_MAGIC_COOKIE) { |
---|
990 | printf(" UNEXPECTED Magic-Cookie!!(%08x)", mc); |
---|
991 | } |
---|
992 | if (vflag || mc != PPTP_MAGIC_COOKIE) { |
---|
993 | printf(" Magic-Cookie=%08x", mc); |
---|
994 | } |
---|
995 | TCHECK(hdr->ctrl_msg_type); |
---|
996 | ctrl_msg_type = EXTRACT_16BITS(&hdr->ctrl_msg_type); |
---|
997 | if (ctrl_msg_type < PPTP_MAX_MSGTYPE_INDEX) { |
---|
998 | printf(" CTRL_MSGTYPE=%s", |
---|
999 | pptp_message_type_string[ctrl_msg_type]); |
---|
1000 | } else { |
---|
1001 | printf(" UNKNOWN_CTRL_MSGTYPE(%u)", ctrl_msg_type); |
---|
1002 | } |
---|
1003 | TCHECK(hdr->reserved0); |
---|
1004 | |
---|
1005 | dat += 12; |
---|
1006 | |
---|
1007 | switch(ctrl_msg_type) { |
---|
1008 | case PPTP_CTRL_MSG_TYPE_SCCRQ: |
---|
1009 | pptp_sccrq_print(dat); |
---|
1010 | break; |
---|
1011 | case PPTP_CTRL_MSG_TYPE_SCCRP: |
---|
1012 | pptp_sccrp_print(dat); |
---|
1013 | break; |
---|
1014 | case PPTP_CTRL_MSG_TYPE_StopCCRQ: |
---|
1015 | pptp_stopccrq_print(dat); |
---|
1016 | break; |
---|
1017 | case PPTP_CTRL_MSG_TYPE_StopCCRP: |
---|
1018 | pptp_stopccrp_print(dat); |
---|
1019 | break; |
---|
1020 | case PPTP_CTRL_MSG_TYPE_ECHORQ: |
---|
1021 | pptp_echorq_print(dat); |
---|
1022 | break; |
---|
1023 | case PPTP_CTRL_MSG_TYPE_ECHORP: |
---|
1024 | pptp_echorp_print(dat); |
---|
1025 | break; |
---|
1026 | case PPTP_CTRL_MSG_TYPE_OCRQ: |
---|
1027 | pptp_ocrq_print(dat); |
---|
1028 | break; |
---|
1029 | case PPTP_CTRL_MSG_TYPE_OCRP: |
---|
1030 | pptp_ocrp_print(dat); |
---|
1031 | break; |
---|
1032 | case PPTP_CTRL_MSG_TYPE_ICRQ: |
---|
1033 | pptp_icrq_print(dat); |
---|
1034 | break; |
---|
1035 | case PPTP_CTRL_MSG_TYPE_ICRP: |
---|
1036 | pptp_icrp_print(dat); |
---|
1037 | break; |
---|
1038 | case PPTP_CTRL_MSG_TYPE_ICCN: |
---|
1039 | pptp_iccn_print(dat); |
---|
1040 | break; |
---|
1041 | case PPTP_CTRL_MSG_TYPE_CCRQ: |
---|
1042 | pptp_ccrq_print(dat); |
---|
1043 | break; |
---|
1044 | case PPTP_CTRL_MSG_TYPE_CDN: |
---|
1045 | pptp_cdn_print(dat); |
---|
1046 | break; |
---|
1047 | case PPTP_CTRL_MSG_TYPE_WEN: |
---|
1048 | pptp_wen_print(dat); |
---|
1049 | break; |
---|
1050 | case PPTP_CTRL_MSG_TYPE_SLI: |
---|
1051 | pptp_sli_print(dat); |
---|
1052 | break; |
---|
1053 | default: |
---|
1054 | /* do nothing */ |
---|
1055 | break; |
---|
1056 | } |
---|
1057 | |
---|
1058 | return; |
---|
1059 | |
---|
1060 | trunc: |
---|
1061 | printf("%s", tstr); |
---|
1062 | } |
---|