feat: kernel network statistics reporting, new Network configuration applet
This commit is contained in:
1 parent
017a8a28ac
commit
af48ab0e1e
28 files changed
+1167
-115
No files matched your search
@@ -58,6 +58,7 @@ namespace Montauk {
|
||||
static constexpr uint64_t SYS_FMKDIR = 78;
|
||||
static constexpr uint64_t SYS_DRIVELIST = 79;
|
||||
static constexpr uint64_t SYS_DRIVELABEL = 124;
|
||||
static constexpr uint64_t SYS_NETSTATUS = 125;
|
||||
static constexpr uint64_t SYS_TERMSCALE = 43;
|
||||
static constexpr uint64_t SYS_RESOLVE = 44;
|
||||
static constexpr uint64_t SYS_GETRANDOM = 45;
|
||||
@@ -142,6 +143,16 @@ namespace Montauk {
|
||||
uint32_t dnsServer; // network byte order
|
||||
};
|
||||
|
||||
struct NetStatus {
|
||||
uint8_t initialized;
|
||||
uint8_t linkUp;
|
||||
uint8_t polling;
|
||||
uint8_t _pad0;
|
||||
char driver[32];
|
||||
uint64_t rxPackets;
|
||||
uint64_t txPackets;
|
||||
};
|
||||
|
||||
struct DateTime {
|
||||
uint16_t Year;
|
||||
uint8_t Month;
|
||||
|
||||
@@ -185,6 +185,7 @@ namespace montauk {
|
||||
// Network configuration
|
||||
inline void get_netcfg(Montauk::NetCfg* out) { syscall1(Montauk::SYS_GETNETCFG, (uint64_t)out); }
|
||||
inline int set_netcfg(const Montauk::NetCfg* cfg) { return (int)syscall1(Montauk::SYS_SETNETCFG, (uint64_t)cfg); }
|
||||
inline int net_status(Montauk::NetStatus* out) { return (int)syscall1(Montauk::SYS_NETSTATUS, (uint64_t)out); }
|
||||
|
||||
// Sockets
|
||||
inline int socket(int type) {
|
||||
|
||||
Reference in new issue
Block a user