TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tiny IP stack, small enough to fit in a "tweet"

46 pointsby r11tover 14 years ago

7 comments

djcapelisover 14 years ago
If it receives anything <i>but</i> ICMP packets, it breaks miserably. This should have just been called a tiny ping responder program. (And it can't deal with any problems or normal network issues at all even to do that.) It has no relation to an IP stack other than it reading network data raw.
评论 #1721325 未加载
keitmoover 14 years ago
Not only is it nonfunctional, it's also at least 8 bytes longer than it really needs to be:<p>short s[70];*l=s;t;main(){for(;;){read(0,s,140);if((s[4]&#62;&#62;8)==1&#38;s[10]==8)s[10]=0,s[11]+=8,t=l[4],l[4]=l[3],l[3]=t,write(1,s,140);}}<p>I feel so dirty now.
评论 #1721352 未加载
评论 #1721402 未加载
kaibover 14 years ago
While the tweeted 'stack' only responds to pings the other work by sics in general and Adam Dunkels in particular is very interesting. I've ran their Contiki OS and uip stack on a atmega8 microcontroller that had 8 kB of Flash and 1 kB of SRAM. If you are into tiny or embedded operating systems and network stacks I highly recommend taking a look at Contiki.
bpodgurskyover 14 years ago
It's not really an IP stack. But it does ping. So a more accurate name would be: Twing
xtacyover 14 years ago
An IP stack has to expose basic IP functionality, not just responding to pings. Can it, for e.g., do IP forwarding? (that would be an awesome full fledged router) IP checksums?<p>Also, this program is vulnerable to the classic Ping of Death attack. ;)<p><a href="http://en.wikipedia.org/wiki/Ping_of_death" rel="nofollow">http://en.wikipedia.org/wiki/Ping_of_death</a>
waterlesscloudover 14 years ago
Most of the responses here are perfect indications of why technical people have problems communicating with the rest of the world.
评论 #1722239 未加载
parfeover 14 years ago
I love all the condescending know-it-all replies here when the author says in the second sentence:<p><i>Ok, so it is very far away from a real IP stack,</i><p>It's sad how often posters here miss the point and jump to semantics as if it matters at all.