Hacker News new | past | comments | ask | show | jobs | submit login

> Wtf is a TCP/IP stack?

You may want to consider toning it down. Readers here would be expected to know all this.

And yes TAP is a user mode raw interface to the NIC.




> You may want to consider toning it down.

FWIW I didn’t take OP’s comment to be of a criticizing tone, I just assumed they were legitimately curious and looking to improve their understanding. I don’t think there’s anything for them to “tone down” in that regard.


> Readers here would be expected to know all this.

I'm not asking about the OSI model. I've long moved beyond that. Sorry that wasn't clear from my message I was typing in haste. I suspect very few readers here have implemented a TCP/IP stack or would even know where to begin. So, I'm acknowledging this.

There is a comment in this thread asking, "How did you even get started with this?" and it was able to successfully solicit the response that I was looking for.


TCP was designed in 1974. Ethernet was designed in 1980. UDP was designed in 1980. ICMP was designed in 1981. ARP was designed in 1982. Think about the computing power available in 1974 or 1980-1982. If you break it down into chunks and follow the RFCs it's manageable. tap gives you easy access to read/write ethernet packets. From there you can start sending ARP queries and responding to ARP requests. ICMP is simple, adds support for that and now you can ping. UDP? just as simple. TCP is more work but most of that is error handling and timeouts so skip them for now.


Start at the hardware/IP layer. Easiest would be serial port for the hardware, and there are at least two methods of sending IP over serial, SLIP and PPP---there are documents out there that describe how those work. Then work on IP. IP itself is fairly easy---it's just best effort and IP options are just that---options. Then ICMP. Once you have that, then you can at least ping the device. UDP is the next easiest to implement, it's just portnumbers to an otherwise IP packet.


the osi model layers describe exactly what is going on in embedded systems (well all), though. look at a mcu board with ethernet. find the magjack. then the PHY, then the MAC, then...


> the osi model layers describe exactly what is going on in embedded systems

Unless it doesn't. OSI describes non-existing stack from the long gone past.


The OSI model describes the OSI protocols, does not really describe what goes on exactly.


That's a big assumption. Who says they are expected to know this?


Personally I say yes but who cares what I say. Let's see what this poll says in a few hours.

https://news.ycombinator.com/item?id=38092364


Your poll is asking a different question. You said people expected to know this. Implying that there is a minimum level of knowledge required to participate in hacker news.

Your poll is asking do they know what a TCP IP stack is. Even if 100 percent of respondents know, it doesn't validate your claim that hacker news requires this knowledge.

Btw I got really good responses to my questions about networking recently. Should I not be asking these types of questions?

https://news.ycombinator.com/item?id=37842863


the purpose of using TAP is to be able to write IP stack in user mode code; however TAP is not the only way on linux, you could also use raw(AF_PACKET)or XDP socket, they also allow you bypass kernel IP stack




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: