-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathip-address.d.ts
116 lines (99 loc) · 2.63 KB
/
ip-address.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
export interface SixToFour {
prefix:string;
gateway:string;
}
export interface TeredoMicrosoft {
reserved:boolean;
universalLocal:boolean;
groupIndividual:boolean;
nonce:string;
}
export interface Teredo {
prefix:string;
server4:string;
client4:string;
flags:string;
coneNat:boolean;
udpPort:string;
microsoft: TeredoMicrosoft;
}
export interface ReverseOptions {
omitSuffix:boolean;
}
export abstract class Address {
address:string;
subnet:string;
parsedSubnet:string;
addressMinusSuffix:string;
parsedAddress:Array<string>;
subnetMask:number;
groups:number;
valid:boolean;
v4:boolean;
error:string;
bigInteger():jsbn.BigInteger;
binaryZeroPad():string;
correctForm():string;
endAddress():Address;
startAddress():Address;
isCorrect():boolean;
isValid():boolean;
getBitsBase2(start:number, end:number):string;
mask(numBits?:number):string;
toGroup6():string;
toHex():string;
}
export class Address4 extends Address {
constructor(address:string);
static fromBigInteger(address:jsbn.BigInteger):Address4;
static fromInteger(address:number):Address4;
static fromHex(address:string):Address4;
endAddress():Address4;
startAddress():Address4;
isInSubnet(subnet:Address4):boolean;
toArray():Array<number>;
}
export class Address6 extends Address {
elidedGroups:number;
elisionBegin:number;
elisionEnd:number;
port:number;
zone:string;
constructor(address:string);
static fromBigInteger(address:jsbn.BigInteger):Address6;
static fromAddress4(address:string):Address6;
static fromAddress4(address:Address4):Address6;
static fromByteArray(address:Array<number>):Address6;
static fromUnsignedByteArray(address:Array<number>):Address6;
static fromURL(addressUrl:string):Address6;
endAddress():Address6;
startAddress():Address6;
isInSubnet(subnet:Address6):boolean;
toByteArray():Array<number>;
toUnsignedByteArray():Array<number>;
canonicalForm():string;
decimal():string;
getBits(start?:number, end?:number):jsbn.BigInteger;
getBitsPastSubnet():string;
getScope():string;
getType():string;
inspect6to4():SixToFour;
inspectTeredo():Teredo;
is4():boolean;
is6to4():boolean;
isCanonical():boolean;
isLinkLocal():boolean;
isLoopback():boolean;
isMulticast():boolean;
isTeredo():boolean;
microsoftTranscription():string;
possibleSubnets(subnetSize?:number):RegExp;
regularExpression(substring?:string):RegExp;
regularExpressionString(substring?:string):string;
reverseForm(options?:ReverseOptions):string;
to4():Address4;
to4in6():string;
to6to4():Address6;
toByteArray():Array<number>;
toUnsignedByteArray():Array<number>;
}