Add the NLPID value for PPP.

In Q.931 and Q.2931, the TR 9577 values are NLPIDs, so use "nlpid_vals"
to dissect them, and values from "nlpid.h" to refer to them.

svn path=/trunk/; revision=1461
This commit is contained in:
Guy Harris 2000-01-13 05:41:24 +00:00
parent d7816c5985
commit 7368e42aac
4 changed files with 14 additions and 22 deletions

View File

@ -2,7 +2,7 @@
* Definitions of OSI NLPIDs (Network Layer Protocol IDs)
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: nlpid.h,v 1.1 2000/01/13 00:41:11 guy Exp $
* $Id: nlpid.h,v 1.2 2000/01/13 05:41:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -24,7 +24,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Some of these come from RFC 1490. */
/* ISO/IEC TR 9577 NLPID values; gathered from various specifications
(not from TR 9577 itself - it's a 19-page document, for which the
American National Standards Institute wants to charge me USD 62.00). */
#define NLPID_NULL 0x00
#define NLPID_SNAP 0x80
@ -33,6 +35,7 @@
#define NLPID_ISO10589_ISIS 0x83
#define NLPID_ISO9542X25_ESIS 0x8a
#define NLPID_IP 0xcc
#define NLPID_PPP 0xcf
extern const value_string nlpid_vals[];

View File

@ -1,7 +1,7 @@
/* packet-osi.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
* $Id: packet-osi.c,v 1.14 2000/01/13 00:41:11 guy Exp $
* $Id: packet-osi.c,v 1.15 2000/01/13 05:41:24 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
*
* Ethereal - Network traffic analyzer
@ -1590,6 +1590,7 @@ const value_string nlpid_vals[] = {
{ NLPID_ISO10589_ISIS, "ISIS" },
{ NLPID_ISO9542X25_ESIS, "ESIS (X.25)" },
{ NLPID_IP, "IP" },
{ NLPID_PPP, "PPP" },
{ 0, NULL },
};

View File

@ -2,7 +2,7 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q2931.c,v 1.6 1999/12/29 05:19:59 guy Exp $
* $Id: packet-q2931.c,v 1.7 2000/01/13 05:41:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -37,6 +37,7 @@
#include <string.h>
#include "packet.h"
#include "oui.h"
#include "nlpid.h"
#include "packet-q931.h"
#include "packet-arp.h"
@ -769,14 +770,6 @@ static const value_string q2931_uil3_vals[] = {
{ 0, NULL }
};
#define Q2931_TR_9577_IPI_SNAP 0x80
static const value_string q2931_uil3_tr_9577_vals[] = {
{ 0xCC, "IP" },
{ 0xCF, "PPP" },
{ Q2931_TR_9577_IPI_SNAP, "SNAP" },
{ 0x00, NULL }
};
static const value_string lane_pid_vals[] = {
{ 0x0001, "LE Configuration Direct/Control Direct/Control Distribute" },
{ 0x0002, "Ethernet/IEEE 002.3 LE Data Direct" },
@ -934,11 +927,11 @@ l2_done:
add_l3_info |= (pd[offset + 1] & 0x40) >> 6;
proto_tree_add_text(tree, offset, 2,
"Additional layer 3 protocol information: %s",
val_to_str(add_l3_info, q2931_uil3_tr_9577_vals,
val_to_str(add_l3_info, nlpid_vals,
"Unknown (0x%02X)"));
offset += 2;
len -= 2;
if (add_l3_info == Q2931_TR_9577_IPI_SNAP) {
if (add_l3_info == NLPID_SNAP) {
if (len < 6)
return;
offset += 1;

View File

@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q931.c,v 1.12 1999/12/14 23:25:17 guy Exp $
* $Id: packet-q931.c,v 1.13 2000/01/13 05:41:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -36,6 +36,7 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "nlpid.h"
#include "packet-q931.h"
/* Q.931 references:
@ -505,12 +506,6 @@ static const value_string q931_uil3_vals[] = {
{ 0, NULL }
};
static const value_string q931_uil3_tr_9577_vals[] = {
{ 0xCC, "IP" },
{ 0xCF, "PPP" },
{ 0x00, NULL }
};
void
dissect_q931_bearer_capability_ie(const u_char *pd, int offset, int len,
proto_tree *tree)
@ -835,7 +830,7 @@ l2_done:
add_l3_info |= (octet & 0x0F);
proto_tree_add_text(tree, offset, 2,
"Additional layer 3 protocol information: %s",
val_to_str(add_l3_info, q931_uil3_tr_9577_vals,
val_to_str(add_l3_info, nlpid_vals,
"Unknown (0x%02X)"));
offset += 2;
len -= 2;