-1

I want to understand what implement an IP stack means.

I explain myself : I've wrote two Java little applications (Client-Server) which communicate over a LAN with TLS. In my code, I didn't have to deal with IP addressing : First I would get IP from the Server with an UDP multicast, and then I would create a SSL Socket and connect it to that IP address.

Now, I have to work on Suse, with C. And I have to implement an IP stack.

I don't understand how an IP stack can be implemented in a application, I thought it was implemented in the OS.

Can someone explain what i'm missing ?

Jean
  • 101
  • 4
  • 2
    Why do you need to implement an IP stack? Linux already has a stock IP stack and C has libraries to interface with it. You *can* implement a custom IP stack by talking directly to the network interface, of course, but is that what you really need? – Ordous Mar 24 '15 at 14:05
  • I think a custom IP stack won't finally be necessary in my case, since I don't have to worry about performances. Anyway, I now understand better what an IP stack is. – Jean Mar 24 '15 at 14:26
  • TCP/IP stack in Z80 assembler: http://konamiman.com/msx/inl2/inl20src.zip . Now you know "how" to implement it. :-) – Konamiman Mar 24 '15 at 14:41

1 Answers1

0

You can implement an IP stack whereever you want, in the kernel, in a driver, in a service, in a library, or in an app. Whatever makes the most sense in your case.

An IP stack is an application just like any other. You write it just like any other … well, actually, with an IP stack you have the huge advantage that you have a precise specification of the desired behavior, and don't have to coax some fuzzy set of imprecise requirements out of a clueless client. The specification is so precise, in fact, that you can interpret the ASCII art diagrams from the RfC and automatically generate packet parsers from that. (That's how the VPRI FONC project is able to implement a full IP stack in 30 lines.)

Jörg W Mittag
  • 101,921
  • 24
  • 218
  • 318