glibc, glibc sockets - Networking

This is a discussion on glibc, glibc sockets - Networking ; Hi all, I have a couple questions: 1. Where exactly in the glibc soouce code are the functions for the socket api found (It seems to me like everything in soxket/ is a stub). 2. I have compiled and installed ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: glibc, glibc sockets

  1. glibc, glibc sockets

    Hi all,
    I have a couple questions:
    1. Where exactly in the glibc soouce code are the functions for the
    socket api found (It seems to me like everything in soxket/ is a
    stub).
    2. I have compiled and installed an older version of glibc (from 2.7
    to 2.5.1) with the prefix=/usr. I see both libraries in /lib, and I
    have run /sbin/ldconfig. But it seems like everything is still linked
    up with the previous library that I have (for example the libc.so.6
    and ld-linux.2.so still have symlinks to the 2.7, and not the 2.5.1 I
    installed. How do I make the system aware of that.
    [What I am trying to do is modify some socket functions in glibc and
    install it, for a school class project].
    Thanks,

  2. Re: glibc, glibc sockets

    On Mar 11, 9:20 pm, begin.middle....@gmail.com wrote:

    > [What I am trying to do is modify some socket functions in glibc and
    > install it, for a school class project].


    The socket functions are just very thin wrappers around kernel calls.
    If you want to trap/modify them, the best way is probably to do it in
    your own library. Google for 'LD_PRELOAD' and 'RTLD_NEXT'.

  3. Re: glibc, glibc sockets

    On Mar 12, 12:43*pm, David Schwartz wrote:
    > On Mar 11, 9:20 pm, begin.middle....@gmail.com wrote:
    >
    > > [What I am trying to do is modify some socket functions in glibc and
    > > install it, for a school class project].

    >
    > The socket functions are just very thin wrappers around kernel calls.
    > If you want to trap/modify them, the best way is probably to do it in
    > your own library. Google for 'LD_PRELOAD' and 'RTLD_NEXT'.


    Thank you. I will explore that option.

+ Reply to Thread