C 语言低级网络相关软件的读物、工具和库
我即将从电子和 TLC 工程专业毕业,并且我在 PHP 和 Java 方面拥有一些不错的 OO 编程经验。
现在我想尝试开始 C 程序员的职业生涯。
我对 C 感兴趣,因为我认为,在不考虑汇编的情况下,这是最适合开发设备驱动程序、固件和其他低级软件的语言。 我特别希望能够从事网络相关主题的工作。 我想在非常接近硬件的地方工作,因为我认为这是我能够有效地完成我的学位,同时在成为一名程序员中找到满足感的唯一方法。
所以我想问你认为我应该读什么,考虑到我已经可以用 C 写一些东西了,不过没什么花哨的,而且我读过几次 K&R。
如果你知道任何工具或库(如 libevent 和 libev)是低级、网络相关的 C 编程领域事实上的标准,了解它们也很高兴。
I'm going to graduate soon in electronics and tlc engineering and I have some decent OO programming experience with PHP and Java.
Now I would like to try starting a career as a C programmer.
I'm interested in C since this is, I think, the most suited language, without considering Assembly, to develop device drivers, firmwares and other low-level softwares in.
In particular I hope to be able to work on network related topics.
I want to work quite close to the hardware since I suppose this is the only way I'll be able to fruitfully spend my degree while at the same time finding gratification in being a programmer.
So I'd like to ask what you think I should read considering that I can already write something in C, nothing fancy though, and that I've read a couple of times the K&R.
If you know of any tools or libraries (like libevent and libev) that are de facto standards in the field of low-level, network related, C programming that would be nice to know as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
排名不分先后:
In no particular order:
必须阅读的书籍:
对于系统级网络代码(您表示对驱动程序等感兴趣),请参阅 OpenBSD 源,因为它紧凑、干净,并且标准网络 API 几乎完全基于 BSD。
Must read books:
For system-level networking code (you expressed an interest in drivers, etc) see OpenBSD sources since it's tight, clean, and the standard networking APIs are based almost completely on BSD.
取决于你想达到多低的水平。 有一个名为 uIP 的小堆栈
这是一本很好的书,它有详细的记录,并且有一些关于它的论文。 它比任何 Linux 套接字/IO 编程更接近硬件,因为没有内核妨碍。
您可能还想看看 tcpdump,它是一个很好的基于 cli 的嗅探器(用 c 语言编写),因此您可以使用它也可以拆开它!
Depending on how low level you want to go. There is a small stack called uIP
which is a good read, its well documented and has a few papers written about it. Its a lot closer to the hardware then any of linux socket/io programming since there is no kernel to get in the way.
You may want to also take a look at tcpdump, its a nice cli based sniffer, (written in c) so you can use it as well as take it apart!
Beej 的网络编程指南是一个很好的地方开始吧。 如果您想深入了解,那么正如许多其他人建议的那样,请阅读 W. Richard Stevens 所著的《Unix 网络编程》第 1-2 卷。
Beej's guide to Network Programming is a good place to get started. If you want to go down the rabbit hole then as many others have recommended take a look at Unix Network Programming, volumes 1-2 by W. Richard Stevens.
libcurl 源怎么样? 请查看此处。
How about the libcurl source? Take a look here.
我用过这个 "Linux I/O 端口编程迷你- HOWTO” 多次。 这是C代码。
还有许多用于串行 I/O 的 C 代码示例。
I've used this "Linux I/O port programming mini-HOWTO" a number of times. This is C code.
There are also a number of C code samples for serial I/O.
不完全是 C 特定的,但像 Wireshark 这样的数据包嗅探器对于测试和分析非常有用。 调试网络相关程序。
Not exactly C specific but packet sniffers like Wireshark can be really useful for testing & debugging network related programs.