越来越长,现在我需要IP地址 [英] Getting Length, Now I Need IP Address

查看:138
本文介绍了越来越长,现在我需要IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在获取数据包的长度,如何从数据包的来源获取IP地址?

I''m getting the length of the packet, how do I get the IP address from where the packet comes from?

printf( "length of packet: %d\n", packetHeader->len ); } 

推荐答案

我相信套接字对象知道它所连接的ip.当然,您几乎没有提供任何信息,所以我只是猜测您使用的是CSocket类.
I believe that the socket object knows the ip it''s connected to. Of course, you gave almost no information, so I''m only guessing that your using the CSocket class.


我相信您在这里使用的是第三方库?如果是这样,则需要查找他们的文档.如果您可以提及图书馆的名称,也许有人可以为您提供帮助.
I believe you are using a 3rd party lib here? If so you need to look up their documentation. If you can mention the name of the library perhaps someone may be able to help you.


这篇关于越来越长,现在我需要IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆