Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

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 ?

share|improve this question

closed as too broad by Kilian Foth, Blrfl, MichaelT, durron597, Ampt Mar 26 at 15:53

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

1  
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 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. –  JeanRene Mar 24 at 14:26
    
TCP/IP stack in Z80 assembler: konamiman.com/msx/inl2/inl20src.zip . Now you know "how" to implement it. :-) –  Konamiman Mar 24 at 14:41

1 Answer 1

up vote 0 down vote accepted

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.)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.