[Xorp-hackers] [PIM] Setting a bit in the Encoded source address

chintamani wandhre chintamanisw at gmail.com
Wed Mar 7 07:08:19 PST 2007


On 3/7/07, Pavlin Radoslavov <pavlin at icir.org> wrote:
>
> chintamani wandhre <chintamanisw at gmail.com> wrote:
>
> > hello,
> > We have to set the bidirectional bit in the ENCODED GROUP ADDRESS
> >
> >
> >  0                   1                   2                   3
> >  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
> > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> > |  Addr Family  | Encoding Type |B| Reserved  |Z|  Mask Len     |
> > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> > |                Group multicast Address
> > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
> >
> > By using following function we can get octet but how can we set the
> single
> > bit ( B )?  :)
> >
> > i could not get the flow in the following code :
> >
> > #define GET_OCTET(val, cp, rcvlen)                      \
> > do
> {                                                                    \
> >     if ((size_t)(rcvlen) < (size_t)1)                            \
> >         goto rcvlen_error;                                         \
> >     (rcvlen)--;
> \
> >     ((val) = *(cp)++);                                               \
> > } while (0)
> >
> > thanking you in anticipation
>
> You could use the PUT_OCTET() macro.
> I believe the remaining 7 bits in the Reserved field are suppose to
> be 0. Hence you need to use PUT_OCTET() to set both Reserved and Z
> at the same time (because they belong to the same octet).


hello,
we set that B bit but now we want to check that bit.
we were able to see the BIDIR_CAPABLE Flag in hello messages using
ethereal.How can we do the same for checking this B bit???

We made changes as follows
in file
------------------------------------------------------
-> pim_proto.hh
#define EGADDR _B_BIT    0x80
------------------------------------------------------
-> pim_proto_join_prune_message.cc
group_addr_reserved_flag |= EGADDR _B_BIT
--------------------------------------------------------------------
i hope this will do the work!!!!


thanking you in anticipation
Ashish
Shamita
Chintamani




Regards,
> Pavlin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20070307/7f1ae1ba/attachment.html 


More information about the Xorp-hackers mailing list