Networking Forums

Networking Forums > Computer Networking > Linux Networking > glibc, glibc sockets

Reply
Thread Tools Display Modes

glibc, glibc sockets

 
 
begin.middle.end@gmail.com
Guest
Posts: n/a

 
      03-12-2008, 03:20 AM
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,
 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      03-12-2008, 03:43 PM
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'.
 
Reply With Quote
 
begin.middle.end@gmail.com
Guest
Posts: n/a

 
      03-13-2008, 03:23 AM
On Mar 12, 12:43*pm, David Schwartz <dav...@webmaster.com> 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 With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS glibc functions confused by trailing hyphen in host name davelasker@gmail.com Linux Networking 1 05-23-2008 08:22 PM
DNS glibc functions confused by trailing slash in host name davelasker@gmail.com Linux Networking 7 05-21-2008 07:53 PM
glibc: socket and fdopen Thomas Jollans Linux Networking 8 09-05-2004 12:21 AM
UDP sockets Sven Jacobs Linux Networking 0 05-10-2004 06:06 AM
Sockets Anthony T. Wilson Linux Networking 1 12-25-2003 07:45 PM



1 2 3 4 5 6 7 8 9 10 11