Skip to content

Commit

Permalink
Merge pull request #1429 from LiuDoo/add_socketopt_const_dev
Browse files Browse the repository at this point in the history
Add socketopt const dev
  • Loading branch information
xwings authored Jan 14, 2024
2 parents 416b685 + cf78110 commit 0f0f950
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions qiling/os/posix/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,31 @@
'IPPROTO_RAW' : 0x00ff,
}


# https://github.com/torvalds/linux/blob/master/tools/include/uapi/asm-generic/socket.h
linux_x86_socket_options = {
"SO_DEBUG" : 0x0001,
"SO_REUSEADDR" : 0x0002,
"SO_KEEPALIVE" : 0x0009,
"SO_TYPE" : 0x0003,
"SO_ERROR" : 0x0004,
"SO_DONTROUTE" : 0x0005,
"SO_BROADCAST" : 0x0006,
"SO_LINGER" : 0x000d,
"SO_OOBINLINE" : 0x000a,
"SO_SNDBUF" : 0x0007,
"SO_RCVBUF" : 0x0008,
"SO_SNDBUFFORCE" : 0x0020,
"SO_RCVBUFFORCE" : 0x0021,
"SO_KEEPALIVE" : 0x0009,
"SO_OOBINLINE" : 0x000a,
"SO_NO_CHECK" : 0x000b,
"SO_PRIORITY" : 0x000c,
"SO_LINGER" : 0x000d,
"SO_BSDCOMPAT" : 0x000e,
"SO_REUSEPORT" : 0x000f,
"SO_SNDLOWAT" : 0x0013,
"SO_PASSCRED" : 0x0010,
"SO_PEERCRED" : 0x0011,
"SO_RCVLOWAT" : 0x0012,
"SO_SNDTIMEO" : 0x0015,
"SO_RCVTIMEO" : 0x0014,
"SO_SNDLOWAT" : 0x0013,
"SO_RCVTIMEO_OLD" : 0x0014,
"SO_SNDTIMEO_OLD" : 0x0015,
}

# https://man7.org/linux/man-pages/man7/ip.7.html
Expand Down

0 comments on commit 0f0f950

Please sign in to comment.