Author Topic: IPv4 socket programming in C: sock_init still working correctly in eCS ?  (Read 4766 times)

agena

  • Guest
Hello,

according to a nice primer on socket programming available at

   http://www.edm2.com/0308/socket1.html,

IPv4 communication has first to be initialised by calling the sock_init C function. Is this
still necessary and does this function work correctly in eCS ? 

When booting eCS 2.2 bII, I see the network driver issuing a failure, sock_init() returning
an error, as well - but surprisingly I can open sockets. All other functions like bind, connect,
close etc., however, insist that they did not receive a valid socket handle.

Thank you,

Alex

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: IPv4 socket programming in C: sock_init still working correctly in eCS ?
« Reply #1 on: September 25, 2014, 05:09:52 am »
The article is on the old 16 bit stack that was included up till Warp v4 while the default is now the 32 bit stack and works slightly different. If you want the old functionality you have to define TCPV40HDRS and put usr/lib/tcpipv4 first on the LIBRARY_PATH (or use -L), at least with kLIBC. Search the headers for TCPV40HDRS for the differences.