This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

NDK - Socket descriptor - implementation at low level



Hi, I need some guru's advice because I have really no idea about how to do the following: I would like to redefine the typical socket calls (socket, accept, bind, recv... etc) to serve my purpose (I really need to do it as I am going to create socket to attend other physical port than ethernet). I have the idea of how to do it more or less, how I want to redefine this calls. The problem is that I need to make it compatible with the socket calls of NDK, and there is when the trouble starts. I need to implement them as the same way as NDK does, and so I need to know more about file descriptors that these calls return.

I need it in this way because I need to rewrite some parts of a big application (we are going to receive ethernet messages over other protocol) and I would like to mantain socket calls linking with my library to do the same over my protocol, as I say this is not the problem, the problem is that need to be 100% compatible with the classic BSD as they are use later in a lot of parts of the code.

So I think I would need to know about what kind of file descriptor are created after a return socket call and how to handle at low level, to create my own socket library compatible.

 

I hope that has sense for you and could help me, I really need some tips about that.

 

Thank you in advance