1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

add cidr-style freebsd ipv4 support and freebsd options

This commit is contained in:
Kelly Brazil
2022-11-07 10:40:07 -08:00
parent 644d3f350d
commit ce680d4082
8 changed files with 47 additions and 15 deletions

View File

@ -51,6 +51,10 @@ Schema:
"tx_overruns": integer, "tx_overruns": integer,
"tx_carrier": integer, "tx_carrier": integer,
"tx_collisions": integer, "tx_collisions": integer,
"options": string,
"options_flags": [
string
],
"status": string, "status": string,
"hw_address": string, "hw_address": string,
"media": string, "media": string,
@ -195,6 +199,7 @@ Examples:
] ]
""" """
import re import re
from ipaddress import IPv4Network
from typing import List, Dict from typing import List, Dict
from jc.jc_types import JSONDictType from jc.jc_types import JSONDictType
import jc.utils import jc.utils
@ -213,6 +218,10 @@ class info():
__version__ = info.version __version__ = info.version
def _convert_cidr_to_quad(string):
return str(IPv4Network('0.0.0.0/' + string).netmask)
def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]: def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]:
""" """
Final processing to conform to the schema. Final processing to conform to the schema.
@ -247,6 +256,10 @@ def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]:
except (ValueError, TypeError, AttributeError): except (ValueError, TypeError, AttributeError):
pass pass
# for new-style freebsd output convert CIDR mask to dotted-quad to match other output
if entry['ipv4_mask'] and not '.' in entry['ipv4_mask']: # type: ignore
entry['ipv4_mask'] = _convert_cidr_to_quad(entry['ipv4_mask'])
# convert state value to an array # convert state value to an array
if 'state' in entry: if 'state' in entry:
try: try:
@ -268,6 +281,10 @@ def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]:
except (ValueError, TypeError, AttributeError): except (ValueError, TypeError, AttributeError):
pass pass
# for new-style freebsd output convert CIDR mask to dotted-quad to match other output
if ip_address['mask'] and not '.' in ip_address['mask']: # type: ignore
ip_address['mask'] = _convert_cidr_to_quad(ip_address['mask']) # type: ignore
# conversions for list of ipv6 addresses # conversions for list of ipv6 addresses
if 'ipv6' in entry: if 'ipv6' in entry:
for ip_address in entry['ipv6']: # type: ignore for ip_address in entry['ipv6']: # type: ignore
@ -276,10 +293,13 @@ def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]:
# final conversions # final conversions
if entry.get('media_flags', None): if entry.get('media_flags', None):
entry['media_flags'] = entry['media_flags'].split(',') entry['media_flags'] = entry['media_flags'].split(',') # type: ignore
if entry.get('nd6_flags', None): if entry.get('nd6_flags', None):
entry['nd6_flags'] = entry['nd6_flags'].split(',') entry['nd6_flags'] = entry['nd6_flags'].split(',') # type: ignore
if entry.get('options_flags', None):
entry['options_flags'] = entry['options_flags'].split(',') # type: ignore
return proc_data return proc_data
@ -498,6 +518,12 @@ def parse(
broadcast\s+(?P<broadcast>(?:[0-9]{1,3}\.){3}[0-9]{1,3}))? broadcast\s+(?P<broadcast>(?:[0-9]{1,3}\.){3}[0-9]{1,3}))?
''', re.IGNORECASE | re.VERBOSE ''', re.IGNORECASE | re.VERBOSE
) )
re_freebsd_ipv4_v2 = re.compile(r'''
inet\s(?P<address>(?:[0-9]{1,3}\.){3}[0-9]{1,3})\/
(?P<mask>\d+)(\s+
broadcast\s+(?P<broadcast>(?:[0-9]{1,3}\.){3}[0-9]{1,3}))?
''', re.IGNORECASE | re.VERBOSE
)
re_freebsd_ipv6 = re.compile(r''' re_freebsd_ipv6 = re.compile(r'''
\s?inet6\s(?P<address>.*)(?:\%\w+\d+)\s \s?inet6\s(?P<address>.*)(?:\%\w+\d+)\s
prefixlen\s(?P<mask>\d+)(?:\s\w+)?\s prefixlen\s(?P<mask>\d+)(?:\s\w+)?\s
@ -544,9 +570,14 @@ def parse(
voltage:\s(?P<module_voltage>.+) voltage:\s(?P<module_voltage>.+)
''', re.IGNORECASE | re.VERBOSE ''', re.IGNORECASE | re.VERBOSE
) )
# RX: 0.52 mW (-2.82 dBm) TX: 0.00 mW (-40.00 dBm)
re_freebsd_tx_rx_power = re.compile(r''' re_freebsd_tx_rx_power = re.compile(r'''
RX:\s+(?P<rx_power>.+)\s+TX:\s(?P<tx_pwer>.+) RX:\s+(?P<rx_power>.+)\s+
TX:\s(?P<tx_pwer>.+)
''', re.IGNORECASE | re.VERBOSE
)
re_freebsd_options = re.compile(r'''
options=(?P<options>[0-9A-Fa-f]+)
<(?P<options_flags>.+)>
''', re.IGNORECASE | re.VERBOSE ''', re.IGNORECASE | re.VERBOSE
) )
@ -559,13 +590,14 @@ def parse(
re_openbsd_rx_stats, re_openbsd_tx, re_openbsd_tx_stats re_openbsd_rx_stats, re_openbsd_tx, re_openbsd_tx_stats
] ]
re_freebsd = [ re_freebsd = [
re_freebsd_interface, re_freebsd_ipv4, re_freebsd_ipv6, re_freebsd_details, re_freebsd_status, re_freebsd_interface, re_freebsd_ipv4, re_freebsd_ipv4_v2, re_freebsd_ipv6,
re_freebsd_nd6_options, re_freebsd_plugged, re_freebsd_vendor_pn_sn_date, re_freebsd_temp_volts, re_freebsd_details, re_freebsd_status, re_freebsd_nd6_options, re_freebsd_plugged,
re_freebsd_hwaddr, re_freebsd_media, re_freebsd_tx_rx_power re_freebsd_vendor_pn_sn_date, re_freebsd_temp_volts, re_freebsd_hwaddr, re_freebsd_media,
re_freebsd_tx_rx_power, re_freebsd_options
] ]
interface_patterns = [re_linux_interface, re_openbsd_interface, re_freebsd_interface] interface_patterns = [re_linux_interface, re_openbsd_interface, re_freebsd_interface]
ipv4_patterns = [re_linux_ipv4, re_openbsd_ipv4, re_freebsd_ipv4] ipv4_patterns = [re_linux_ipv4, re_openbsd_ipv4, re_freebsd_ipv4, re_freebsd_ipv4_v2]
ipv6_patterns = [re_linux_ipv6, re_openbsd_ipv6, re_freebsd_ipv6] ipv6_patterns = [re_linux_ipv6, re_openbsd_ipv6, re_freebsd_ipv6]
if jc.utils.has_data(data): if jc.utils.has_data(data):

View File

@ -1 +1 @@
[{"name":"cxl3","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"00:07:43:3d:b7:70","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"hw_address":"00:07:43:3d:b7:88","media":"Ethernet 10Gbase-LR","media_flags":["full-duplex","rxpause","txpause"],"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-LR (LC)","vendor":"INNOLIGHT","vendor_pn":"TR-PX13L-N00","vendor_sn":"INJBL0431986","vendor_date":"2020-01-04","module_temperature":"21.20 C","module_voltage":"3.16 Volts"}] [{"name":"cxl3","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"00:07:43:3d:b7:70","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"6ec07bb","options_flags":["RXCSUM","TXCSUM","VLAN_MTU","VLAN_HWTAGGING","JUMBO_MTU","VLAN_HWCSUM","TSO4","TSO6","LRO","VLAN_HWTSO","LINKSTATE","RXCSUM_IPV6","TXCSUM_IPV6","HWRXTSTMP","NOMAP"],"hw_address":"00:07:43:3d:b7:88","media":"Ethernet 10Gbase-LR","media_flags":["full-duplex","rxpause","txpause"],"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-LR (LC)","vendor":"INNOLIGHT","vendor_pn":"TR-PX13L-N00","vendor_sn":"INJBL0431986","vendor_date":"2020-01-04","module_temperature":"21.20 C","module_voltage":"3.16 Volts"}]

View File

@ -1 +1 @@
[{"name":"ix0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":9000,"type":null,"mac_addr":"00:1b:21:8b:f8:2c","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"media":"Ethernet autoselect (10Gbase-SR","media_flags":["full-duplex","rxpause","txpause"],"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-SR (LC)","vendor":"Intel Corp","vendor_pn":"FTLX8571D3BCV-IT","vendor_sn":"ALH1AV9","vendor_date":"2011-10-27","module_temperature":"51.27 C","module_voltage":"3.31 Volts","rx_power":"0.49 mW (-3.02 dBm)","tx_pwer":"0.66 mW (-1.74 dBm)"}] [{"name":"ix0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":9000,"type":null,"mac_addr":"00:1b:21:8b:f8:2c","ipv4_addr":"10.10.2.101","ipv4_mask":"255.255.255.0","ipv4_bcast":"10.10.2.255","ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"e53fbb","options_flags":["RXCSUM","TXCSUM","VLAN_MTU","VLAN_HWTAGGING","JUMBO_MTU","VLAN_HWCSUM","TSO4","TSO6","LRO","WOL_UCAST","WOL_MCAST","WOL_MAGIC","VLAN_HWFILTER","VLAN_HWTSO","RXCSUM_IPV6","TXCSUM_IPV6"],"media":"Ethernet autoselect (10Gbase-SR","media_flags":["full-duplex","rxpause","txpause"],"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-SR (LC)","vendor":"Intel Corp","vendor_pn":"FTLX8571D3BCV-IT","vendor_sn":"ALH1AV9","vendor_date":"2011-10-27","module_temperature":"51.27 C","module_voltage":"3.31 Volts","rx_power":"0.49 mW (-3.02 dBm)","tx_pwer":"0.66 mW (-1.74 dBm)","ipv4":[{"address":"10.10.2.101","mask":"255.255.255.0","broadcast":"10.10.2.255"}]}]

View File

@ -1 +1 @@
[{"name":"cxl3","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"00:07:43:3d:b7:70","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"hw_address":"00:07:43:3d:b7:88","media":null,"media_flags":null,"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-LR (LC)","vendor":"INNOLIGHT","vendor_pn":"TR-PX13L-N00","vendor_sn":"INJBL0431986","vendor_date":"2020-01-04","module_temperature":"21.20 C","module_voltage":"3.16 Volts"}] [{"name":"cxl3","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"00:07:43:3d:b7:70","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":0,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"6ec07bb","options_flags":["RXCSUM","TXCSUM","VLAN_MTU","VLAN_HWTAGGING","JUMBO_MTU","VLAN_HWCSUM","TSO4","TSO6","LRO","VLAN_HWTSO","LINKSTATE","RXCSUM_IPV6","TXCSUM_IPV6","HWRXTSTMP","NOMAP"],"hw_address":"00:07:43:3d:b7:88","media":null,"media_flags":null,"status":"active","nd6_options":29,"nd6_flags":["PERFORMNUD","IFDISABLED","AUTO_LINKLOCAL"],"plugged":"SFP/SFP+/SFP28 10G Base-LR (LC)","vendor":"INNOLIGHT","vendor_pn":"TR-PX13L-N00","vendor_sn":"INJBL0431986","vendor_date":"2020-01-04","module_temperature":"21.20 C","module_voltage":"3.16 Volts"}]

View File

@ -1 +1 @@
[{"name":"lo0","flags":8049,"state":["UP","LOOPBACK","RUNNING","MULTICAST"],"mtu":16384,"type":null,"mac_addr":null,"ipv4_addr":"127.0.0.1","ipv4_mask":"255.0.0.0","ipv4_bcast":null,"ipv6_addr":"fe80::1","ipv6_mask":64,"ipv6_scope":"0x1","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"ipv4":[{"address":"127.0.0.1","mask":"255.0.0.0","broadcast":null}],"ipv6":[{"address":"fe80::1","mask":64,"scope":"0x1"}]},{"name":"gif0","flags":8010,"state":["POINTOPOINT","MULTICAST"],"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"stf0","flags":0,"state":null,"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"en0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"68:a8:6d:12:f5:75","ipv4_addr":"192.168.1.81","ipv4_mask":"255.255.255.0","ipv4_bcast":"192.168.1.255","ipv6_addr":"fe80::6aa8:6dff:fe12:f575","ipv6_mask":64,"ipv6_scope":"0x4","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"active","ipv4":[{"address":"192.168.1.81","mask":"255.255.255.0","broadcast":"192.168.1.255"}],"ipv6":[{"address":"fe80::6aa8:6dff:fe12:f575","mask":64,"scope":"0x4"}]},{"name":"en1","flags":963,"state":["UP","BROADCAST","SMART","RUNNING","PROMISC","SIMPLEX"],"mtu":1500,"type":null,"mac_addr":"b2:00:19:cb:f5:50","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"media":"autoselect","media_flags":["full-duplex"],"status":"inactive"},{"name":"p2p0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":2304,"type":null,"mac_addr":"0a:a8:6d:12:f5:75","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"status":"inactive"},{"name":"bridge0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"6a:a8:6d:21:38:00","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"inactive"}] [{"name":"lo0","flags":8049,"state":["UP","LOOPBACK","RUNNING","MULTICAST"],"mtu":16384,"type":null,"mac_addr":null,"ipv4_addr":"127.0.0.1","ipv4_mask":"255.0.0.0","ipv4_bcast":null,"ipv6_addr":"fe80::1","ipv6_mask":64,"ipv6_scope":"0x1","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"3","options_flags":["RXCSUM","TXCSUM"],"nd6_options":1,"nd6_flags":["PERFORMNUD"],"ipv4":[{"address":"127.0.0.1","mask":"255.0.0.0","broadcast":null}],"ipv6":[{"address":"fe80::1","mask":64,"scope":"0x1"}]},{"name":"gif0","flags":8010,"state":["POINTOPOINT","MULTICAST"],"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"stf0","flags":0,"state":null,"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"en0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"68:a8:6d:12:f5:75","ipv4_addr":"192.168.1.81","ipv4_mask":"255.255.255.0","ipv4_bcast":"192.168.1.255","ipv6_addr":"fe80::6aa8:6dff:fe12:f575","ipv6_mask":64,"ipv6_scope":"0x4","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"active","ipv4":[{"address":"192.168.1.81","mask":"255.255.255.0","broadcast":"192.168.1.255"}],"ipv6":[{"address":"fe80::6aa8:6dff:fe12:f575","mask":64,"scope":"0x4"}]},{"name":"en1","flags":963,"state":["UP","BROADCAST","SMART","RUNNING","PROMISC","SIMPLEX"],"mtu":1500,"type":null,"mac_addr":"b2:00:19:cb:f5:50","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"60","options_flags":["TSO4","TSO6"],"media":"autoselect","media_flags":["full-duplex"],"status":"inactive"},{"name":"p2p0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":2304,"type":null,"mac_addr":"0a:a8:6d:12:f5:75","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"status":"inactive"},{"name":"bridge0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"6a:a8:6d:21:38:00","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"63","options_flags":["RXCSUM","TXCSUM","TSO4","TSO6"],"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"inactive"}]

View File

@ -1 +1 @@
[{"name":"lo0","flags":8049,"state":["UP","LOOPBACK","RUNNING","MULTICAST"],"mtu":16384,"type":null,"mac_addr":null,"ipv4_addr":"127.0.0.1","ipv4_mask":"255.0.0.0","ipv4_bcast":null,"ipv6_addr":"fe80::1","ipv6_mask":64,"ipv6_scope":"0x1","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"ipv4":[{"address":"127.0.0.1","mask":"255.0.0.0","broadcast":null}],"ipv6":[{"address":"fe80::1","mask":64,"scope":"0x1"}]},{"name":"gif0","flags":8010,"state":["POINTOPOINT","MULTICAST"],"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"stf0","flags":0,"state":null,"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"en0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"60:c5:47:0a:ce:0b","ipv4_addr":"192.168.1.65","ipv4_mask":"255.255.255.0","ipv4_bcast":"192.168.1.255","ipv6_addr":"fe80::62c5:47ff:fe0a:ce0b","ipv6_mask":64,"ipv6_scope":"0x4","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"active","ipv4":[{"address":"192.168.1.65","mask":"255.255.255.0","broadcast":"192.168.1.255"}],"ipv6":[{"address":"fe80::62c5:47ff:fe0a:ce0b","mask":64,"scope":"0x4"}]},{"name":"en1","flags":963,"state":["UP","BROADCAST","SMART","RUNNING","PROMISC","SIMPLEX"],"mtu":1500,"type":null,"mac_addr":"b2:00:14:06:39:21","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"media":"autoselect","media_flags":["full-duplex"],"status":"inactive"},{"name":"p2p0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":2304,"type":null,"mac_addr":"02:c5:47:0a:ce:0b","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"status":"inactive"},{"name":"bridge0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"62:c5:47:a0:f7:10","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"inactive"}] [{"name":"lo0","flags":8049,"state":["UP","LOOPBACK","RUNNING","MULTICAST"],"mtu":16384,"type":null,"mac_addr":null,"ipv4_addr":"127.0.0.1","ipv4_mask":"255.0.0.0","ipv4_bcast":null,"ipv6_addr":"fe80::1","ipv6_mask":64,"ipv6_scope":"0x1","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"3","options_flags":["RXCSUM","TXCSUM"],"nd6_options":1,"nd6_flags":["PERFORMNUD"],"ipv4":[{"address":"127.0.0.1","mask":"255.0.0.0","broadcast":null}],"ipv6":[{"address":"fe80::1","mask":64,"scope":"0x1"}]},{"name":"gif0","flags":8010,"state":["POINTOPOINT","MULTICAST"],"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"stf0","flags":0,"state":null,"mtu":1280,"type":null,"mac_addr":null,"ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null},{"name":"en0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"60:c5:47:0a:ce:0b","ipv4_addr":"192.168.1.65","ipv4_mask":"255.255.255.0","ipv4_bcast":"192.168.1.255","ipv6_addr":"fe80::62c5:47ff:fe0a:ce0b","ipv6_mask":64,"ipv6_scope":"0x4","ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"active","ipv4":[{"address":"192.168.1.65","mask":"255.255.255.0","broadcast":"192.168.1.255"}],"ipv6":[{"address":"fe80::62c5:47ff:fe0a:ce0b","mask":64,"scope":"0x4"}]},{"name":"en1","flags":963,"state":["UP","BROADCAST","SMART","RUNNING","PROMISC","SIMPLEX"],"mtu":1500,"type":null,"mac_addr":"b2:00:14:06:39:21","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"60","options_flags":["TSO4","TSO6"],"media":"autoselect","media_flags":["full-duplex"],"status":"inactive"},{"name":"p2p0","flags":8843,"state":["UP","BROADCAST","RUNNING","SIMPLEX","MULTICAST"],"mtu":2304,"type":null,"mac_addr":"02:c5:47:0a:ce:0b","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"status":"inactive"},{"name":"bridge0","flags":8863,"state":["UP","BROADCAST","SMART","RUNNING","SIMPLEX","MULTICAST"],"mtu":1500,"type":null,"mac_addr":"62:c5:47:a0:f7:10","ipv4_addr":null,"ipv4_mask":null,"ipv4_bcast":null,"ipv6_addr":null,"ipv6_mask":null,"ipv6_scope":null,"ipv6_type":null,"metric":null,"rx_packets":null,"rx_errors":null,"rx_dropped":null,"rx_overruns":null,"rx_frame":null,"tx_packets":null,"tx_errors":null,"tx_dropped":null,"tx_overruns":null,"tx_carrier":null,"tx_collisions":null,"rx_bytes":null,"tx_bytes":null,"options":"63","options_flags":["RXCSUM","TXCSUM","TSO4","TSO6"],"nd6_options":1,"nd6_flags":["PERFORMNUD"],"status":"inactive"}]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long