restructure frontend and add network settings
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m41s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m41s
This commit is contained in:
58
frontend/src/types/network.ts
Normal file
58
frontend/src/types/network.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
export interface InterfaceAddress {
|
||||
family: "ipv4" | "ipv6";
|
||||
address: string;
|
||||
prefixlen: number;
|
||||
}
|
||||
|
||||
export interface InterfaceInfo {
|
||||
ifindex: number;
|
||||
name: string;
|
||||
state: string;
|
||||
mac?: string | null;
|
||||
mtu: number;
|
||||
flags: string[];
|
||||
addresses: InterfaceAddress[];
|
||||
}
|
||||
|
||||
export interface RouteInfo {
|
||||
dst?: string | null;
|
||||
gateway?: string | null;
|
||||
prefsrc?: string | null;
|
||||
oif?: number | null;
|
||||
ifname?: string | null;
|
||||
table: number;
|
||||
proto?: number | null;
|
||||
scope?: number | null;
|
||||
type?: number | null;
|
||||
}
|
||||
|
||||
export interface BridgeInterfaceInfo {
|
||||
ifindex: number;
|
||||
ifname: string;
|
||||
state?: string | null;
|
||||
mtu?: number | null;
|
||||
}
|
||||
|
||||
export interface BridgeInfo {
|
||||
ifindex: number;
|
||||
ifname: string;
|
||||
state?: string | null;
|
||||
mtu?: number | null;
|
||||
stp_state?: number | null;
|
||||
members: BridgeInterfaceInfo[];
|
||||
}
|
||||
|
||||
export interface BridgeCreateRequest {
|
||||
name: string;
|
||||
interfaces: string[];
|
||||
}
|
||||
export interface BridgeRemoveRequest {
|
||||
name: string;
|
||||
}
|
||||
|
||||
// full-state response shape
|
||||
export interface FullState {
|
||||
interfaces: InterfaceInfo[];
|
||||
routes: RouteInfo[];
|
||||
bridges: BridgeInfo[];
|
||||
}
|
||||
Reference in New Issue
Block a user