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

I'm writting a dissector for the modludp64 protocol. It's work, this is cool and I release it in few days. But before I want to add some features. To distinguish messages, I need to know if the destination ip address is unicast or multicast, but I don't know how to retreive this informations.

Someone can help me.

asked 20 Mar '11, 14:15

chronidev's gravatar image

chronidev
11557
accept rate: 0%


This should result in TRUE for multicast addresses (untested YMMV).

((pinfo->net_dst.type == AT_IPv4) && (((*(guint8 *)(pinfo->net_dst.data) & 0xF0) == 0xE0)) || ((pinfo->net_dst.type == AT_IPv6) && ((*(guint8 *)(pinfo->net_dst.data) == 0xFF))))

permanent link

answered 21 Mar '11, 06:11

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×637
×158
×20

question asked: 20 Mar '11, 14:15

question was seen: 3,342 times

last updated: 21 Mar '11, 06:11

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