code: def _fetch_lancfg_param(self, channel, param, prefixlen=False):
          
          fetchcmd = bytearray((channel, param, 0, 0))
          fetched = self.xraw_command(0xc, 2, data=fetchcmd)
          fetchdata = fetched['data']
          if ord(fetchdata[0]) != 17:
              return None
          if len(fetchdata) == 5:  # IPv4 address
              if prefixlen:
                  return _mask_to_cidr(fetchdata[1:])
              else:
                  ip = socket.inet_ntoa(fetchdata[1:])
                  if ip == '0.0.0.0':
                      return None
                  return ip
          elif len(fetchdata) == 7:  # MAC address
              mac = '{0:02x}:{1:02x}:{2:02x}:{3:02x}:{4:02x}:{5:02x}'.format(
                  *bytearray(fetchdata[1:]))
              if mac == '00:00:00:00:00:00':
                  return None
              return mac
          elif len(fetchdata) == 2:
              return ord(fetchdata[1])
          else:
              raise Exception("Unrecognized data format " + repr(fetchdata))
docs: Internal helper for fetching lan cfg parameters
  
          If the parameter revison != 0x11, bail.  Further, if 4 bytes, return
          string with ipv4.  If 6 bytes, colon delimited hex (mac address).  If
          one byte, return the int value