유닉스 에러 socket: Address family not supported by protocol
글쓴이: qhdasltjr / 작성시간: 월, 2020/07/13 - 10:28오전
#include
#include
#include
#include
#include
#include
#include
#include
#include
int main(int argc, char **argv)
{
int sock;
if((sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)))
perror("socket");
return 1;
}
}
컴파일까지는 되는데 실행파일을 실행하면 socket: Address family not supported by protocol 라고 에러가 뜹니다. 뭐가 문제인지 도저히 모르겠어요.
Forums:
댓글 달기