groups:
  - id: registry.network
    type: attribute_group
    display_name: Network Attributes
    brief: >
        These attributes may be used for any network related operation.
    attributes:
      - id: network.carrier.icc
        type: string
        stability: development
        brief: "The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network."
        examples: "DE"
      - id: network.carrier.mcc
        type: string
        stability: development
        brief: "The mobile carrier country code."
        examples: "310"
      - id: network.carrier.mnc
        type: string
        stability: development
        brief: "The mobile carrier network code."
        examples: "001"
      - id: network.carrier.name
        type: string
        stability: development
        brief: "The name of the mobile carrier."
        examples: "sprint"
      - id: network.connection.subtype
        type:
          members:
            - id: gprs
              brief: GPRS
              value: "gprs"
              stability: development
            - id: edge
              brief: EDGE
              value: "edge"
              stability: development
            - id: umts
              brief: UMTS
              value: "umts"
              stability: development
            - id: cdma
              brief: CDMA
              value: "cdma"
              stability: development
            - id: evdo_0
              brief: EVDO Rel. 0
              value: "evdo_0"
              stability: development
            - id: evdo_a
              brief: "EVDO Rev. A"
              value: "evdo_a"
              stability: development
            - id: cdma2000_1xrtt
              brief: CDMA2000 1XRTT
              value: "cdma2000_1xrtt"
              stability: development
            - id: hsdpa
              brief: HSDPA
              value: "hsdpa"
              stability: development
            - id: hsupa
              brief: HSUPA
              value: "hsupa"
              stability: development
            - id: hspa
              brief: HSPA
              value: "hspa"
              stability: development
            - id: iden
              brief: IDEN
              value: "iden"
              stability: development
            - id: evdo_b
              brief: "EVDO Rev. B"
              value: "evdo_b"
              stability: development
            - id: lte
              brief: LTE
              value: "lte"
              stability: development
            - id: ehrpd
              brief: EHRPD
              value: "ehrpd"
              stability: development
            - id: hspap
              brief: HSPAP
              value: "hspap"
              stability: development
            - id: gsm
              brief: GSM
              value: "gsm"
              stability: development
            - id: td_scdma
              brief: TD-SCDMA
              value: "td_scdma"
              stability: development
            - id: iwlan
              brief: IWLAN
              value: "iwlan"
              stability: development
            - id: nr
              brief: "5G NR (New Radio)"
              value: "nr"
              stability: development
            - id: nrnsa
              brief: "5G NRNSA (New Radio Non-Standalone)"
              value: "nrnsa"
              stability: development
            - id: lte_ca
              brief: LTE CA
              value: "lte_ca"
              stability: development
        stability: development
        brief: 'This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.'
        examples: 'LTE'
      - id: network.connection.type
        type:
          members:
            - id: wifi
              value: "wifi"
              stability: development
            - id: wired
              value: "wired"
              stability: development
            - id: cell
              value: "cell"
              stability: development
            - id: unavailable
              value: "unavailable"
              stability: development
            - id: unknown
              value: "unknown"
              stability: development
        stability: development
        brief: 'The internet connection type.'
        examples: 'wifi'
      - id: network.local.address
        stability: stable
        type: string
        brief: Local address of the network connection - IP address or Unix domain socket name.
        examples: ['10.1.2.80', '/tmp/my.sock']
      - id: network.local.port
        stability: stable
        type: int
        brief: Local port number of the network connection.
        examples: [65123]
      - id: network.peer.address
        stability: stable
        type: string
        brief: Peer address of the network connection - IP address or Unix domain socket name.
        examples: ['10.1.2.80', '/tmp/my.sock']
      - id: network.peer.port
        stability: stable
        type: int
        brief: Peer port number of the network connection.
        examples: [65123]
      - id: network.protocol.name
        stability: stable
        type: string
        brief: '[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.'
        note: The value SHOULD be normalized to lowercase.
        examples: ['amqp', 'http', 'mqtt']
      - id: network.protocol.version
        stability: stable
        type: string
        brief: The actual version of the protocol used for network communication.
        examples: ['1.1', '2']
        note: >
          If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)),
          this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known,
          this attribute SHOULD NOT be set.
      - id: network.transport
        stability: stable
        type:
          members:
            - id: tcp
              value: 'tcp'
              brief: "TCP"
              stability: stable
            - id: udp
              value: 'udp'
              brief: "UDP"
              stability: stable
            - id: pipe
              value: "pipe"
              brief: 'Named or anonymous pipe.'
              stability: stable
            - id: unix
              value: 'unix'
              brief: "Unix domain socket"
              stability: stable
            - id: quic
              value: 'quic'
              brief: "QUIC"
              stability: stable
        brief: >
          [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or
          [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).
        note: |
          The value SHOULD be normalized to lowercase.

          Consider always setting the transport when setting a port number, since
          a port number is ambiguous without knowing the transport. For example
          different processes could be listening on TCP port 12345 and UDP port 12345.
        examples: ['tcp', 'udp']
      - id: network.type
        stability: stable
        type:
          members:
            - id: ipv4
              value: 'ipv4'
              brief: "IPv4"
              stability: stable
            - id: ipv6
              value: 'ipv6'
              brief: "IPv6"
              stability: stable
        brief: '[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.'
        note: The value SHOULD be normalized to lowercase.
        examples: ['ipv4', 'ipv6']
      - id: network.io.direction
        type:
          members:
            - id: transmit
              value: 'transmit'
              stability: development
            - id: receive
              value: 'receive'
              stability: development
        stability: development
        brief: "The network IO operation direction."
        examples: ["transmit"]
      - id: network.interface.name
        type: string
        brief: 'The network interface name.'
        examples: [ 'lo', 'eth0' ]
        stability: development
      - id: network.connection.state
        type:
          members:
            - id: closed
              value: 'closed'
              stability: development
            - id: close_wait
              value: 'close_wait'
              stability: development
            - id: closing
              value: 'closing'
              stability: development
            - id: established
              value: 'established'
              stability: development
            - id: fin_wait_1
              value: 'fin_wait_1'
              stability: development
            - id: fin_wait_2
              value: 'fin_wait_2'
              stability: development
            - id: last_ack
              value: 'last_ack'
              stability: development
            - id: listen
              value: 'listen'
              stability: development
            - id: syn_received
              value: 'syn_received'
              stability: development
            - id: syn_sent
              value: 'syn_sent'
              stability: development
            - id: time_wait
              value: 'time_wait'
              stability: development
        stability: development
        brief: "The state of network connection"
        note: "Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)"
        examples: [ "close_wait" ]
