aboutsummaryrefslogtreecommitdiff
path: root/netaddr.go
diff options
context:
space:
mode:
Diffstat (limited to 'netaddr.go')
-rw-r--r--netaddr.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/netaddr.go b/netaddr.go
index 0a8af8b..3836a9c 100644
--- a/netaddr.go
+++ b/netaddr.go
@@ -16,3 +16,9 @@ func NewAddrFromIPPortString(addr string) (res NetAddr) {
func (self NetAddr) Free() { C.netaddr_free(self) }
func (self NetAddr) IsEq(other NetAddr) bool { return bool(C.netaddr_is_eq(self, other)) }
+
+func (self NetAddr) IsNull() bool { return bool(C.netaddr_is_null(self)) }
+
+func (self NetAddr) GetIP() uint32 { return uint32(C.netaddr_get_ip(self)) }
+
+func (self NetAddr) GetPort() uint16 { return uint16(C.netaddr_get_port(self)) }