/* dfilter-scanner.l
* Scanner for display filters
*
- * $Id: dfilter-scanner.l,v 1.21 1999/10/15 04:22:47 itojun Exp $
+ * $Id: dfilter-scanner.l,v 1.22 1999/10/15 05:46:17 itojun Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
dfilter_lval.variable.id = dfilter_lookup_token(yytext);
if (dfilter_lval.variable.id < 0) {
dfilter_lval.string = g_strdup(yytext);
- return T_VAL_UNQUOTED_STRING;
+ if (strncmp("0x", yytext, 2) == 0
+ || strncmp("0X", yytext, 2) == 0) {
+ return T_VAL_NUMBER_STRING;
+ } else
+ return T_VAL_UNQUOTED_STRING;
}
ftype = proto_registrar_get_ftype(dfilter_lval.variable.id);
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
- * $Id: packet-ipsec.c,v 1.7 1999/10/15 05:30:40 itojun Exp $
+ * $Id: packet-ipsec.c,v 1.8 1999/10/15 05:46:18 itojun Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
static int hf_esp_spi = -1;
static int hf_esp_sequence = -1;
static int proto_ipcomp = -1;
+static int hf_ipcomp_flags = -1;
static int hf_ipcomp_cpi = -1;
struct newah {
offset + offsetof(struct ipcomp, comp_nxt), 1,
"Next Header: %s (0x%02x)",
ipprotostr(ipcomp.comp_nxt), ipcomp.comp_nxt);
- proto_tree_add_text(ipcomp_tree,
+ proto_tree_add_item(ipcomp_tree, hf_ipcomp_flags,
offset + offsetof(struct ipcomp, comp_flags), 1,
- "Flags: 0x%02x", ipcomp.comp_flags);
+ ipcomp.comp_flags);
p = val_to_str(ntohs(ipcomp.comp_cpi), cpi2val, "");
if (p[0] == '\0') {
proto_tree_add_item(ipcomp_tree, hf_ipcomp_cpi,
};
static hf_register_info hf_ipcomp[] = {
+ { &hf_ipcomp_flags,
+ { "Flags", "ipcomp.flags", FT_UINT8, BASE_HEX, NULL, 0x0,
+ "" }},
{ &hf_ipcomp_cpi,
{ "CPI", "ipcomp.cpi", FT_UINT16, BASE_HEX, NULL, 0x0,
"" }},