[Xorp-users] Xorp HIP support

Pavlin Radoslavov pavlin at icir.org
Tue Mar 27 15:12:26 PDT 2007


> I have a difficult(for me) question. I want to modify xorp mld6igmp part, to 
> accept and use HIT identifiers (Host Identity Tag in Host Identity Protocol) 
> besides IP addresses. These identifiers are like IPv6 addresses, 128 bit 
> long. I have already written a small client which can send HIT identifiers 
> in ICMP6 packets. 
> 
> My aim is that xorp accepts the ICMP6 package which contain HIT identifiers 
> and forward them toward PIM module. Its a difficult task to modify xorp like 
> this, or its possible at all? 

Yes, it should be possible. How difficult? Well, it won't be few
lines of code, but it won't be a major refactoring either.

> I have already looked into the source codes. There is something which I 
> don’t understand.

First, I presume that your ICMP6 packets will have a new type.
In that case the first thing to do is to modify the MFEA so it won't
block them. Inside fea/mfea_proto_comm.cc method
ProtoComm::open_proto_sockets() there is code like:

#ifdef HAVE_IPV6_MULTICAST_ROUTING
            if (module_id() == XORP_MODULE_MLD6IGMP) {
                // Filter all non-MLD ICMPv6 messages
                ICMP6_FILTER_SETBLOCKALL(&filter);
                ICMP6_FILTER_SETPASS(MLD_LISTENER_QUERY, &filter);
                ICMP6_FILTER_SETPASS(MLD_LISTENER_REPORT, &filter);
                ICMP6_FILTER_SETPASS(MLD_LISTENER_DONE, &filter);
                ICMP6_FILTER_SETPASS(MLD_MTRACE_RESP, &filter);
                ICMP6_FILTER_SETPASS(MLD_MTRACE, &filter);
#ifdef MLDV2_LISTENER_REPORT
                ICMP6_FILTER_SETPASS(MLDV2_LISTENER_REPORT, &filter);
#endif
            }
#endif // HAVE_IPV6_MULTICAST_ROUTING

You need to add another ICMP6_FILTER_SETPASS(YOUR_ICMP6_TYPE, &filter);
for your ICMPv6 messages type.

>  - how does mld module call pim module?

The PIM module registeres interest in the MLD/IGMP module using the
mld6igmp/0.1/add_protocol{4,6} XRLs.

Then, whenever the MLD/IGMP module detects multicast membership
change, it uses the mld6igmp_client/0.1/add_membership{4,6} and 
mld6igmp_client/0.1/delete_membership{4,6} XRLs to inform the PIM
module about the change.

Hence, as you see there is no XRL interface to forward control
packets from MLD/IGMP to PIM. You need to add such interface, and
the easiest way is to modify the xrl/interfaces/mld6igmp_client.xif
XRL interface. Then, inside the mld6igmp.xif interface you need to
add another set of add/delete XRLs that will allow PIM to register
interest with MLD/IGMP in receiving specific control packets.

>  - how does xorp send query message to the interfaces? (I followed the query 
> sending, but I lost in mfea_xif.cc)

It uses the mfea/0.1/send_protocol_message{4,6} XRLs. The payload
goes via XRL to the MFEA, and then the MFEA transmits the message on
the wire using the kernel API.

>  - where(in which function) does xorp receive the raw message from socket? 

The multicast specific protocols use the MFEA for sending and
receiving raw IP packets. The rest of the protocols that need to
send/receive raw IP packets (currently only OSPF) use the FEA raw IP
socket interface (FYI, the reason there are two mechanisms for
sending/receiving raw IP packets is historic; in the future there
should be one single mechanism).

The particular function inside the MFEA that reads the packets is
ProtoComm::proto_socket_read() inside fea/mfea_proto_comm.cc
The corresponding function inside the FEA is
RawSocket::proto_socket_read() inside fea/rawsock.cc.

Then the paylod from the received packet is sent by using XRLs to
the interested parties.
For the MFEA clients, the XRL is
mfea_client/0.1/recv_protocol_message{4,6}, while for the FEA
clients the XRL is raw_packet{4,6}_client/0.1/recv.

BTW, currently there is no mechanism to send/receive raw link-level
packets, but it is on our TODO list.

Regards,
Pavlin



More information about the Xorp-users mailing list