在ubuntu下用socket原始套接字编程出现错误

s=socket(AF_INET,SOCK_RAW,IPPROTR_TCP)

编译时提示: Protocol not supported

 

解决办法:root用户权限执行