forked from abandonware/wireless-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathifconfig.d.ts
34 lines (30 loc) · 1.17 KB
/
ifconfig.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export interface Status {
interface: string,
link: string,
address?: string,
ipv4_address: string,
ipv4_broadcast?: string,
ipv4_subnet_mask: string,
up: boolean,
running?: boolean,
multicast?: boolean,
loobpack?: boolean,
broadcast?: boolean,
}
export interface Options {
interface: string,
ipv4_address?: string,
ipv4_broadcast?: string,
ipv4_subnet_mask?: string,
}
declare interface IfConfig {
status: typeof status,
statusAll: typeof statusAll,
down: typeof down,
up: typeof up,
}
export const ifconfig: IfConfig;
export const status: <T extends ((err: Error, data: Status) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, Status, void>;
export const statusAll: <T extends ((err: Error, data: Status[]) => any) | undefined = undefined>(callback?: T) => TypeOrPromise<T, Status[], void>;
export const down: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, void>;
export const up: <T extends ((err: Error) => any) | undefined = undefined>(options: Options, callback?: T) => TypeOrPromise<T, void, void>;