R/Rip-AllClass.R

##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IPv4' 
  ## 
  , contains = 'integer'
  ##
  , slots = (
    c( ipv4 = 'vector'
    ##
    , id = 'character'
    ##
    , length= 'integer' 
    ##
    , cache = 'environment'
    ##
    , hash = 'integer'
    )
  )  
  ##
  , prototype = prototype(
      ipv4   = integer() ## 
    , id     = NULL
    , length = NULL
    ##
    , cache = NULL
    , hash = NULL
  )
)
##________________________________________________________________________________________________________________________

##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IPv4r' 
  ##
  , contains = 'integer' 
  ##
  , slots = (
    c( ipr = 'matrix', id = 'character', length= 'integer' )
  )  
  ##
  , prototype = prototype(
      ipr    =  matrix(0L,nrow=0,ncol=2) ## 
    , id     = NULL 
    , length = -1L
  )
)
##________________________________________________________________________________________________________________________


##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IPv6' 
  ## 
  , contains = 'integer'
  ##
  , slots = (
    c( ipv6 = 'matrix', id = 'character', length= 'integer' )
  ) 
  ##
  , prototype = prototype(
      ipv6   =  matrix(0.,nrow=0,ncol=2) ## 
    , id     = NULL
    , length = 0L ## NULL ##
  )
)
##
##________________________________________________________________________________________________________________________


##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IPv6r' 
  ##
  , contains = 'integer' 
  ##
  , slots = (
    c( ipr = 'matrix', id = 'character', length= 'integer' )
  )  
  ##
  , prototype = prototype(
      ipr    = matrix(0.,nrow=0,ncol=4) ## 
    , id     = NULL
    , length = -1L
  )
)
##________________________________________________________________________________________________________________________

##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IP' 
  ## 
  , contains = 'integer' 
  ##
  , slots = (
    c( ipv4 = 'IPv4', ipv6 = 'IPv6' )
  ) 
)
##________________________________________________________________________________________________________________________

##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'IPr' 
  ## 
  , contains = 'integer' ## 'vector'
  ##
  , slots = (
    c( ipv4r = 'IPv4r', ipv6r = 'IPv6r' )
  ) 
)
##________________________________________________________________________________________________________________________

##________________________________________________________________________________________________________________________
##
##
##
##________________________________________________________________________________________________________________________
##
##
##
setClass(
  'host' 
  ## 
  , contains = 'integer' 
  ##
  , slots = (
    c(
      ## 
      hostname =  'character'
      ##
      , ipv4          = 'IPv4'  , ipv6          = 'IPv6' 
      , ipv4.hptr      = 'vector', ipv6.hptr      = 'vector'
      , ipv4.hostinfo = 'vector', ipv6.hostinfo = 'vector'
    )
  ) 
  ## 
  , prototype = prototype(
      hostname      = NULL
    , ipv4          = NULL, ipv6      = NULL
    , ipv4.hptr     = NULL, ipv6.hptr  = NULL ## total # of IP address for each host
    , ipv4.hostinfo = NULL, ipv6.hostinfo = NULL
  )
)
##________________________________________________________________________________________________________________________

Try the IP package in your browser

Any scripts or data that you put into this service are public.

IP documentation built on May 29, 2024, 2:53 a.m.