Class: Rex::Proto::Kerberos::CredentialCache::Primitive::Krb5CcacheAddress
- Inherits:
-
Krb5CcacheData
- Object
- BinData::Primitive
- Krb5CcacheData
- Rex::Proto::Kerberos::CredentialCache::Primitive::Krb5CcacheAddress
show all
- Defined in:
- lib/rex/proto/kerberos/credential_cache/primitive/krb5_ccache_address.rb
Constant Summary
collapse
- FAMILY =
::Socket::AF_INET
Instance Method Summary
collapse
Instance Method Details
#get ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/rex/proto/kerberos/credential_cache/primitive/krb5_ccache_address.rb', line 12
def get
v = IPAddr.new_ntoh(super)
if self.class::FAMILY != ::Socket::AF_UNSPEC && self.class::FAMILY != v.family
raise IPAddr::AddressFamilyError, 'address family mismatch'
end
v
end
|
#set(v) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/rex/proto/kerberos/credential_cache/primitive/krb5_ccache_address.rb', line 21
def set(v)
if v.is_a?(IPAddr)
if self.class::FAMILY != ::Socket::AF_UNSPEC && self.class::FAMILY != v.family
raise IPAddr::AddressFamilyError, 'address family mismatch'
end
v = v.hton
end
super
end
|