[hipl-users] Re: Connect and wrap file

  • From: KKloe Kaishoto <kaishos@xxxxxxxxx>
  • To: hipl-users@xxxxxxxxxxxxx
  • Date: Mon, 31 Aug 2009 15:00:01 +0200

Ahh, so best thing would be to use the opp.library to intercept the connect
call and do my own connect() you mean? We would like to do a communication
between two hip-clients using normal HIP communication so its supports the
security, mobility and multihoming aspects.

On Sun, Aug 30, 2009 at 4:12 PM, Miika Komu <miika.komu@xxxxxxx> wrote:

> KKloe Kaishoto wrote:
>
> Hi,
>
> before I answer any detailed questions, let me first tell what libhipopp
> does in general. It is one realization (*) of so called "opportunistic
> mode". It can be used as follows:
>
> hipconf run opp ssh 193.167.187.134
>
> This would make ssh to connect to one of our test servers using it's IP
> address. However, LD_PRELOAD captures (most of) the socket calls of the
> application to the libopphip library and translates the IP addresses to
> HITs. We have wrote a paper about it:
>
> http://www.tml.tkk.fi/~jklindqv/ccnc09.pdf<http://www.tml.tkk.fi/%7Ejklindqv/ccnc09.pdf>
>
> Remember that opportunistic mode is just one way of using HIP:
>
> http://infrahip.hiit.fi/hipl/manual/ch15.html
>
> (*) Hipfw supports also opportunistic mode at lower layers of the
> networking stack.
>
>
>  Hi there,
>>
>> had a question about the HIPL connect function that is in wrap.c.
>> Firstly:
>> What I can see that when using the connect function you send into it a
>> struct of addrinfo that contains in total 3 addrinfo's, first, next and a
>> next after it and has the following info:
>>
>> 1. the destination HIT,
>>
>> in the first ai_next:
>> 2. there is the ipv4 adress??? had some strange symbols here and I couldnt
>> understand really what the info here was of the ai_addr was but I guess by
>> the ai_family
>>
>> and in the next and last ai_next.
>> 3. there is the ipv6 address?
>>
>> after it is called I guess the connect function in your wrap.c is called.
>> What I could understand of it was that it tries first to translate the
>> socket and address to some other type or??
>>
>> then what I guess some kindof a macro call is done:    err =
>> dl_function_ptr.connect_dlsym(*translated_socket, translated_id,
>> *translated_id_len);
>>
>> then I guess hipd receives the message through recvfrom. then this is
>> called:
>> chars = dl_function_ptr.recvfrom_dlsym( *translated_socket, buf, len,
>> flags, translated_id, translated_id_len);
>>
>> now I wonder as I cant find it, where the logic of : .recvfrom_dlsym();
>> and .connect_dlsym()?, as I cant get further in the chain. What I want to do
>> is add another address in the struct of addrinfo that is passed in connect
>> by the client and then parse it in hipd.
>>
>
>
>

Other related posts: