TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

46 点作者 r11t超过 14 年前

7 条评论

djcapelis超过 14 年前
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 未加载
keitmo超过 14 年前
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 未加载
kaib超过 14 年前
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.
bpodgursky超过 14 年前
It's not really an IP stack. But it does ping. So a more accurate name would be: Twing
xtacy超过 14 年前
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>
waterlesscloud超过 14 年前
Most of the responses here are perfect indications of why technical people have problems communicating with the rest of the world.
评论 #1722239 未加载
parfe超过 14 年前
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.