- Today
- Total
목록kernel (6)
Byeo
이전 포스트 (bind system call 1: __sys_bind)https://byeo.tistory.com/entry/bind-system-call-1 bind system call 1 (__sys_bind)BSD socket API에서 socket을 생성한 뒤에는 server-side 측에서 bind를 실행합니다. bind는 나의 ip:port를 socket과 연결하는 역할을 수행하죠. 이 번에는 BSD socket API중에서 bind를 분석해보려고 합니다. 이전byeo.tistory.com 현재까지의 흐름도3. inet_bind__sys_bind에서 그 다음으로 호출하는 함수는 sock->ops->bind였습니다.// net/socket.c/__sys_bind() :1693 err =..
BSD socket API에서 socket을 생성한 뒤에는 server-side 측에서 bind를 실행합니다. bind는 나의 ip:port를 socket과 연결하는 역할을 수행하죠. 이 번에는 BSD socket API중에서 bind를 분석해보려고 합니다. 이전 포스트 (socket system call)https://byeo.tistory.com/entry/socket-system-call socket system call 1 (syscall_socket ~ __sock_create)int socket(int domain, int type, int protocol); socket 시스템 콜의 동작을 한 번 들여다봅니다! https://man7.org/linux/man-pages/man2/socket...
이전 포스트: https://byeo.tistory.com/entry/socket-system-call-3 socket system call 3 (tcp_v4_init_sock)이전 포스트: https://byeo.tistory.com/entry/socket-system-call-2 socket system call 2 이전 포스트: https://byeo.tistory.com/entry/socket-system-call socket system call 1 int socket(int domain, int type, int protocol); socket 시스템 콜의 동byeo.tistory.com 7. sock_map_fd마지막으로 sock_map_fd 함수를 거칩니다. 이 함수는 기존에 tcp_ip..
이전 포스트: https://byeo.tistory.com/entry/socket-system-call-2 socket system call 2이전 포스트: https://byeo.tistory.com/entry/socket-system-call socket system call 1 int socket(int domain, int type, int protocol); socket 시스템 콜의 동작을 한 번 들여다 봅니다! https://man7.org/linux/man-pages/man2/socket.2.html linubyeo.tistory.com inet_create까지의 발걸음 6. tcp_v4_init_sock// net/ipv4/tcp_ipv4.c/tcp_v4_init_sock() :2236st..
int socket(int domain, int type, int protocol); socket 시스템 콜의 동작을 한 번 들여다봅니다! https://man7.org/linux/man-pages/man2/socket.2.html linux 5.15 기준입니다. 1. syscall_64.tbl 이전 포스트에서 리눅스 시스템 콜을 추가하면 서 확인했던 점은 시스템 콜의 시작 부분이 syscall_64.tbl에 등록되어 있다는 점이었습니다. 마찬가지로 linux 5.15 기준으로 socket 함수를 찾아봅니다. ... 40commonsendfilesys_sendfile64 41commonsocketsys_socket 42commonconnectsys_connect ... 이는 마찬가지로 syscalls.h..
개요 리눅스 코드를 살펴보고 구현해보는 과정을 간단히 체험해보기 위해서 가장 쉬운 시스템 콜 추가하기를 해봅니다. 해당 과정을 위해 [블로그]와 [커널 문서]를 참고하였습니다. 커널 문서에서는 시스템 콜 구현 디자인 가이드라인을 제공하고 있습니다. 내용 1. syscall_64.tbl linux-5.15/arch/x86/entry/syscalls/syscall_64.tbl 파일에는 x86 아키텍쳐에서 사용할 수 있는 시스템콜이 나열되어 있습니다. 형태는 다음과 같습니다. # The format is: # 가장 마지막에 있는 448 다음에 우리가 추가할 시스템 콜 이름과 실제 커널 내에서 호출할 함수 명을 나열해줍시다. 449commonbyeo_hellosys_byeo_hello 2. sys_byeo_he..