diff options
| author | bhgv <bhgv.empire@gmail.com> | 2018-03-01 16:54:45 +0200 |
|---|---|---|
| committer | bhgv <bhgv.empire@gmail.com> | 2018-03-01 16:54:45 +0200 |
| commit | b786f20bbab5a59046aa78a2c6c2a11536497202 (patch) | |
| tree | 0851ecdec889eb9b7ba3751cc04d4f0b474e4a9e /module/ipattr.m | |
inferno-os tree was separated from the inferno-os-android (separated from the Android driver)
Diffstat (limited to 'module/ipattr.m')
| -rw-r--r-- | module/ipattr.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/module/ipattr.m b/module/ipattr.m new file mode 100644 index 0000000..bad57f6 --- /dev/null +++ b/module/ipattr.m @@ -0,0 +1,20 @@ +IPattr: module +{ + + PATH: con "/dis/lib/ipattr.dis"; + + Netattr: adt { + name: string; + pairs: list of ref Attrdb->Attr; + net: IP->IPaddr; + mask: IP->IPaddr; + }; + + init: fn(attrdb: Attrdb, ip: IP); + + dbattr: fn(s: string): string; + findnetattr: fn(db: ref Attrdb->Db, attr: string, val: string, rattr: string): (string, string); + findnetattrs: fn(db: ref Attrdb->Db, attr: string, val: string, rattrs: list of string): (list of (IP->IPaddr, list of ref Netattr), string); + valueof: fn(l: list of ref Netattr, attr: string): list of string; + netvalueof: fn(l: list of ref Netattr, attr: string, ip: IP->IPaddr): list of string; +}; |
