This is our old Q&A Site. Please post any new questions and answers at

Hello, I need to dissect a MAC address, but the format FT_ETHER gives me a hard time. I looked into packet_eth.c and used this code:

static int hf_mac = -1;
static void dissect_xxx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
    if (tree) {
        const guint8 *address;
        address = tvb_get_ptr(tvb, 0, 6);

        proto_tree_add_ether(tree, hf_mac, tvb, 0, 6, address);

proto_register_xxx(void) {
    static hf_register_info hf[] = {
            {"MAC", "xxx.mac", FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL}},


When dissecting the packet, wireshark gives me this error:

Expert Info (Error/Malformed): proto.c:2672: failed assertion "hfinfo->type == FT_ETHER"

Why is that? I declared it as FT_ETHER...

Wireshark 1.6.4, dissector as a plugin.

asked 05 Jan '12, 01:19

nniico's gravatar image

accept rate: 100%

My mistake : I was compiling a plug-in with sources from 1.7 and using it with a downloaded stable 1.6.4. Works like a charm on a compiled 1.7.

permanent link

answered 05 Jan '12, 07:12

nniico's gravatar image

accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Jan '12, 01:19

question was seen: 2,508 times

last updated: 05 Jan '12, 07:12

p​o​w​e​r​e​d by O​S​Q​A