Skip to content

Commit

Permalink
Kernel+LibC: Stub out SO_{SND_RCV}BUF
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpfard authored and awesomekling committed Feb 15, 2021
1 parent 2db4ab8 commit 1e79c04
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Kernel/Net/LocalSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ KResult LocalSocket::getsockopt(FileDescription& description, int level, int opt
return EFAULT;

switch (option) {
case SO_SNDBUF:
TODO();
case SO_RCVBUF:
TODO();
case SO_PEERCRED: {
if (size < sizeof(ucred))
return EINVAL;
Expand Down
2 changes: 2 additions & 0 deletions Kernel/UnixTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ enum {
SO_TYPE,
SO_ERROR,
SO_PEERCRED,
SO_RCVBUF,
SO_SNDBUF,
SO_REUSEADDR,
SO_BINDTODEVICE,
SO_KEEPALIVE,
Expand Down
4 changes: 4 additions & 0 deletions Userland/Libraries/LibC/sys/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ enum {
SO_TYPE,
SO_ERROR,
SO_PEERCRED,
SO_RCVBUF,
SO_SNDBUF,
SO_REUSEADDR,
SO_BINDTODEVICE,
SO_KEEPALIVE,
Expand All @@ -119,6 +121,8 @@ enum {
#define SO_KEEPALIVE SO_KEEPALIVE
#define SO_TIMESTAMP SO_TIMESTAMP
#define SO_BROADCAST SO_BROADCAST
#define SO_SNDBUF SO_SNDBUF
#define SO_RCVBUF SO_RCVBUF

enum {
SCM_TIMESTAMP,
Expand Down

0 comments on commit 1e79c04

Please sign in to comment.