Files
banan-os/kernel/include/kernel/FS/Socket.h
Bananymous 1dc26d3c06 Kernel: Cleanup inode stat updating
Inode now handles stat upates itself and calls sync function to make
updates visible on the underlying filesystem
2026-05-19 13:00:05 +03:00

49 lines
643 B
C++

#pragma once
#include <kernel/FS/Inode.h>
namespace Kernel
{
class Socket : public Inode
{
public:
enum class Domain
{
INET,
INET6,
UNIX,
};
enum class Type
{
STREAM,
DGRAM,
SEQPACKET,
};
struct Info
{
mode_t mode;
uid_t uid;
gid_t gid;
};
public:
const FileSystem* filesystem() const final override { return nullptr; }
protected:
Socket(const Info& info)
{
m_mode = info.mode;
m_uid = info.uid;
m_gid = info.gid;
}
private:
BAN::ErrorOr<void> sync_inode(SyncType) final override { return {}; }
BAN::ErrorOr<void> sync_data() final override { return {}; }
};
}