본문 바로가기

카테고리 없음

Raw socket 구현 1

* socket 함수 (linux - ubuntu 18.04)

 

#include <sys/types/h>

#include <sys/socket.h>

 

int socket(int domain, int type, int protocol)

 

* int domain

- specifies a communication domain

- selects the protocol family which will be used for communication

- these failies are defined in <sys/socket.h>

 

* int type

- specifies the communication semantics