You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
User Infidel 018e1911c4 SCTP socket added 2 years ago
bin SCTP socket added 2 years ago
src SCTP socket added 2 years ago
.gitignore Add gitignore 2 years ago SCTP socket added 2 years ago

Kernel Queue (kqueue) Utilization

This is your lame attempt to understand how those Network Virtual Functions sofware works as well to sharpen your understanding on C++ and C programming language.

Why not epoll or select

Using epoll or select would make your system spend most of its time looking at and fiddling sith the data structures and has very little time for anything else.


  • Compile using g++ for the file watcher

To trace the function calls on FreeBSD based system use truss() instead of strace.

The kqueue_socket.c is my attempt on create a socket watcher timer program using kevent.

    // --------------------------------------------
    struct kevent my_event;
    struct kevent my_change;

    EV_SET(&my_change, ...); // Initialize the kevent



TCP 01

  • Pointer of kevent

TCP 02

  • Array of kevent


  • Listening
  • Init ACK

Find out how to make a stateless connection over SCTP.


  • Understand the difference between c++ and C
  • Understand how strcuct works and the difference between it on c++ and C
  • Understand


  • Modification to target file only detected after 2 or more interrupt