最近在学习unix网络编程,需要用到 RAW Socket,但是在xcode下直接debug会出现问题
如创建原始套接字:
int sockfd=Socket(sasend->sa_family, SOCK_RAW,IPPROTO_ICMP);
则会报一下错误
Operation not permitted
解决方案为:
屏幕快照 2019-03-20 下午5.37.51.png
然后选择RUN中 DEBUG Process AS ROOT
最近在学习unix网络编程,需要用到 RAW Socket,但是在xcode下直接debug会出现问题
如创建原始套接字:
int sockfd=Socket(sasend->sa_family, SOCK_RAW,IPPROTO_ICMP);
则会报一下错误
Operation not permitted
解决方案为:
然后选择RUN中 DEBUG Process AS ROOT