一个基本的 DHCP 客户端
我正在用 C 语言编写一个非常简单的 DHCP 客户端。我很难决定它应该使用 UDP 还是 TCP,它应该支持哪些基本命令。我认为它至少应该能够从服务器获取DNS、SMTP、POP3服务器信息。
我还需要知道什么?是否有基本的 DHCP C 实现可以提供帮助?
I am coding a very simple DHCP client in C. I have trouble deciding whether it should use UDP or TCP, what basic commands should it support. I think it should be able to get at least DNS, SMTP, POP3 server information from server.
What else do I need to know? Is there a basic DHCP C implementation available which can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不应该在“决定”使用 TCP 还是 UDP 时遇到麻烦,您应该依赖实际情况DHCP 规范 确定使用什么协议。事实上,对于实现执行其应做的事情的 DHCP 客户端来说,对该规范的依赖或多或少至关重要……因为“它应该做什么”是在规范中定义的。
You shouldn't have trouble "deciding" whether to use TCP or UDP, you should rely on the actual DHCP spec to determine what protocol is used. In fact, reliance on that spec will be more or less critical to implementing a DHCP client that does what it's supposed to do... since "what it's supposed to do" is defined in the spec.