Hi all, I finally managed to have a working environment to compile and run applications using StdLib for network communication.
What I want is to just send some TCP commands and read the answer. The code I wrote was based on this: http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f99/www/class26/tcpclient.c Changing the bzero and bcopy to memset and memmove, respectivelly and some other minor changes. But whenever I try to write something to the (connected) socket, it fails. So I took a look at the OobTx.c and verified that it uses the 'send' instead of 'write', I gave it a try (just adding 0 as the last argument) and it worked. Trying to figure out why, if I understood, the write function is defined by BslSocketWrite in BsdSocketLib/write.c as follows: -- ssize_t EFIAPI BslSocketWrite ( struct __filedes *pDescriptor, off_t * pOffset, size_t LengthInBytes, const void * pBuffer ) [...] -- While the send (BsdSocketLib/send.c) is defined as: -- ssize_t send ( int s, CONST void * buffer, size_t length, int flags ) [...] -- So, here are the questions: 1- I guess my problem was the first parameter as I was using the integer that the socket() returns, shouldn't be the integer? I will try to run some tests later to confirm. 2- Is this another case of the EFIAPI used when it shouldn't? Regards, Mauro Faccenda ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
