[Xorp-users] Question on supporting multiple routing tables [PATCH]
Ben Greear
greearb at candelatech.com
Fri Aug 31 09:58:02 PDT 2007
Pavlin Radoslavov wrote:
>> I can do this. One question: In the comments for send_packet, it says
>> if_name is optional for unicast packets..however it looks like the
>> actual code will error out if the ifp is not found:
>>
>> ifp = iftree().find_interface(if_name);
>> if (ifp == NULL) {
>> error_msg = c_format("No interface %s", if_name.c_str());
>> return (XORP_ERROR);
>> }
>>
>> I assume the comments are wrong, or maybe the find_interface will grab
>> some random interface if if_name is blank?
>>
>
> Yes, the comments don't match the current processing, because the
> original semantics were relaxed so for transmitting unicast packets
> the interface/vif name can be omitted (and let the kernel choose
> the outgoing interface). We need to rethink that and decide whether
> to keep the original semantics and fix the code or redefine the
> semantics.
>> For the proto_sock_transmit(), I guess I should just get the name from the ifp
>> and bind to that, or would you rather me pass in if_name ?
>>
>
> You could get the name from the vifp.
>
It was working for me when I used the ifp. What's the difference
between vifp and ifp?
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-users
mailing list