Skip to content

Feature/Fix some error in syscall fcntl and getsockopt #1272

Merged
xwings merged 11 commits intoqilingframework:devfrom
owl129:dev
Dec 2, 2022
Merged

Feature/Fix some error in syscall fcntl and getsockopt #1272
xwings merged 11 commits intoqilingframework:devfrom
owl129:dev

Conversation

@owl129
Copy link
Contributor

@owl129 owl129 commented Nov 17, 2022

Fix syscall fcntl

int fcntl(int fd, int cmd, ... /* arg */ );

when call syscall fcntl with cmd F_SETFL, file descriptor in args was set, Which need mapping FIRST to support different OS/Arch.

Feature add to getsockopt

Add level IPPROTO_TCP support for syscall getsockopt

Also fix exception handle in getsockopt

Implements poll syscall

https://man7.org/linux/man-pages/man2/poll.2.html

#include <poll.h>

int poll(struct pollfd *fds, nfds_t nfds, int timeout);

pollfd params struct

struct pollfd {
   int   fd;         /* file descriptor */
   short events;     /* requested events */
   short revents;    /* returned events */
};

@owl129 owl129 marked this pull request as draft November 21, 2022 04:02
@owl129 owl129 marked this pull request as ready for review November 21, 2022 04:02
@xwings
Copy link
Member

xwings commented Nov 23, 2022

Hi @owl129 there is a conflict based on the recent merge. can you please fix it ?

@owl129
Copy link
Contributor Author

owl129 commented Dec 1, 2022

@xwings can u help review this request?

@xwings
Copy link
Member

xwings commented Dec 2, 2022

Cool and Thanks!

@xwings xwings merged commit 6b4f5c8 into qilingframework:dev Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants