# C Radio APIs

**Detailed Description**

This section contains C Radio APIs related to Cellular-V2X operation. Applications need to have “radio” Linux group permissions to be able to operate successfully with underlying services. For any new CV2x development, it is recommended to use the C++ telux::cv2x::\* APIs.

- *group* Telematics\_cv2x\_c\_radio

    - Abstraction of the radio driver parameters for a V2X broadcast socket interface, including 3GPP CV2X QoS bandwidth contracts.

Defines

- V2X\_RADIO\_HANDLE\_BAD

    - Invalid handle returned by v2x\_radio\_init() and [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) upon an error.

- V2X\_MAX\_RADIO\_SESSIONS

    - Limit on the number of simultaneous RmNet Radio interfaces this library can have open at once.

Typically, there are only a few actual radios. On the same radio however, one interface can be for IP traffic, and another interface can be for non-IP traffic.

- V2X\_RX\_WILDCARD\_PORTNUM

    - Wildcard value for a port number. When the wildcard is used, all V2X received traffic is routed.

- MAX\_POOL\_IDS\_LIST\_LEN

    - Maximum length of the pool ID list that is returned in [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342).

- MAX\_MALICIOUS\_IDS\_LIST\_LEN

    - Maximum length of the malicious ID list that can be passed in [v2x\_radio\_update\_trusted\_ue\_list()](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#a00061_1ga878f25d4e2393edf2cab5d125dad30d5).

- MAX\_TRUSTED\_IDS\_LIST\_LEN

    - Maximum length of the trusted ID list that can be passed in [v2x\_radio\_update\_trusted\_ue\_list()](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#a00061_1ga878f25d4e2393edf2cab5d125dad30d5).

- MAX\_SUBSCRIBE\_SIDS\_LIST\_LEN

    - Maximum length for the subscribed service ID list that can be passed in [v2x\_radio\_rx\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaf830f2dc06421da78984a388cb1a4d29.html#a00061_1gaf830f2dc06421da78984a388cb1a4d29).

- MAX\_FILTER\_IDS\_LIST\_LEN

    - Maximum length for the L2 ID list that can be passed in [v2x\_set\_l2\_filters()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga3cdc742555181bdf6b99999b486fc0e9.html#a00061_1ga3cdc742555181bdf6b99999b486fc0e9) and v2x\_cancel\_l2\_filters.

- V2X\_MAX\_ANTENNAS\_SUPPORTED

    - Maximum number of antennas that is supported. Used in [v2x\_tx\_status\_report\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00359.html#a00359)

- V2X\_MAX\_TX\_POOL\_NUM

    - Maximum number of V2X Tx pools that is supported. Used in [v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00339.html#a00339)

- V2X\_MAX\_RX\_POOL\_NUM

    - Maximum number of V2X Rx pools that is supported. Used in [v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00339.html#a00339)

- V2X\_MAX\_SLSS\_SYNC\_REF\_UE\_NUM

    - Maximum number of detected SLSS sync reference UEs. Used in [v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00351.html#a00351)

Typedefs

- typedef int v2x\_radio\_handle\_t

    - Radio data handle to the interface.

- typedef [traffic\_ip\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417traffic_ip_type_t) traffic\_ip\_type

    - 

- typedef struct [src\_l2\_filter\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv420src_l2_filter_info_t) src\_l2\_filter\_info

    - Contains remote UE source L2 ID that expecting to filter.

- typedef void (\*v2x\_tx\_status\_report\_listener)(const [v2x\_tx\_status\_report\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_tx_status_report_t) info)

    - Callback made when a CV2X transport block is transmitted in low layer if a listener has been registered by calling [v2x\_register\_tx\_status\_report\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaf4c7816730eeb3f86290a57ccf0e516e.html#a00061_1gaf4c7816730eeb3f86290a57ccf0e516e).

- **Associated data types**
    - [v2x\_tx\_status\_report\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00359.html#a00359)

- Param info:

    - **[in]** V2X Tx status report information.

- typedef void (\*v2x\_ext\_radio\_status\_listener)(const [v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_radio_status_ex_t) \*status)

    - Callback made when CV2X Tx/Rx status is changed and a listener has been registered by calling [v2x\_register\_ext\_radio\_status\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga01a63baf76459f59793a89b597da4e07.html#a00061_1ga01a63baf76459f59793a89b597da4e07).

- **Associated data types**
    - [v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00339.html#a00339)

- Param status:

    - **[out]** Pointer to V2X overall Tx/Rx status and per pool status.

- typedef void (\*v2x\_slss\_rx\_listener)(const [v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_slss_rx_info_t) \*info)

    - Called when CV2X SLSS Rx is enabled and any of below events has occurred:

- A new SLSS synce reference UE is detected, lost, or selected as the timing source, report the present sync reference UEs.
- UE timing source switches from SLSS to GNSS, report 0 sync reference UE.
- SLSS Rx is disabled, report 0 sync reference UE.
- Cv2x is stopped, report 0 sync reference UE.

- **Associated data types**
    - [v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00351.html#a00351)

- Param info:

    - **[out]** Pointer to V2X SLSS Rx information.

Enums

- enum v2x\_concurrency\_sel\_t

    - Describes whether the radio chip modem should attempt or support concurrent 3GPP CV2X operation with a WWAN 4G/5G data call.

Some chips are only capable of operating on CV2X. In this case:

- The callers can only request V2X\_WWAN\_NONCONCURRENT.
- The interface parameters that are returned list v2x\_concurrency\_sel\_t as the value for V2X\_WAN\_NONCONCURRENT.

*Values:*

- enumerator V2X\_WWAN\_NONCONCURRENT

    - No simultaneous WWAN + CV2X on this interface.

- enumerator V2X\_WWAN\_CONCURRENT

    - Interface allows requests for concurrent support of WWAN + CV2X connections.

- enum v2x\_event\_t

    - Event indications sent asynchronously from the radio via callbacks that indicate the state of the radio. The state can change in response to the loss of timing precision or a geofencing change. Deprecated This enum type is deprecated, please consider use v2x\_radio\_status\_ex\_t instead.

*Values:*

- enumerator V2X\_INACTIVE

    - V2X communication is disabled.

- enumerator V2X\_ACTIVE

    - V2X communication is enabled. Transmit and receive are possible.

- enumerator V2X\_TX\_SUSPENDED

    - Small loss of timing precision occurred. Transmit is no longer supported.

- enumerator V2X\_RX\_SUSPENDED

    - Radio can no longer receive any messages.

- enumerator V2X\_TXRX\_SUSPENDED

    - Radio can no longer transmit or receive for some reason.

- enum v2x\_priority\_et

    - Range of supported priority levels, where a lower number means a higher priority. For example, 8 is the current 3GPP standard.

*Values:*

- enumerator V2X\_PRIO\_MOST\_URGENT

    - Highest priority.

- enumerator V2X\_PRIO\_1

    - 

- enumerator V2X\_PRIO\_2

    - 

- enumerator V2X\_PRIO\_3

    - 

- enumerator V2X\_PRIO\_4

    - 

- enumerator V2X\_PRIO\_5

    - 

- enumerator V2X\_PRIO\_6

    - 

- enumerator V2X\_PRIO\_BACKGROUND

    - Lowest priority.

- enum v2x\_service\_status\_t

    - Valid service availability states.

*Values:*

- enumerator SERVICE\_UNAVAILABLE

    - 

- enumerator SERVICE\_AVAILABLE

    - 

- enumerator SERVICE\_FAILED

    -

- enum v2x\_radio\_status\_type\_t

    - Defines possible values for CV2X radio RX/TX status.

1. If Rx is in inactive state, Tx should also be in inactive state.
2. If Rx is in active state, Tx should be in active(normal case) or suspended state(sensing or tunnel mode).
3. If Rx is in suspended state, Tx should be in suspended state. Used in [v2x\_status\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00336.html#a00336)

*Values:*

- enumerator V2X\_RADIO\_STATUS\_INACTIVE

    - RX/TX is inactive

- enumerator V2X\_RADIO\_STATUS\_ACTIVE

    - RX/TX is active

- enumerator V2X\_RADIO\_STATUS\_SUSPENDED

    - RX/TX is suspended

- enumerator V2X\_RADIO\_STATUS\_UNKNOWN

    - RX/TX status unknown

- enum v2x\_radio\_cause\_type\_t

    - Defines possible values for cause of CV2X radio failure. The cause code is only associated with cv2x suspend/inactive status, if cv2x is active, the cause code has no meaning. Used in [v2x\_status\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00336.html#a00336)

*Values:*

- enumerator V2X\_RADIO\_CAUSE\_TIMING

    - CV2X is suspended due to the outage of timing reference.

- enumerator V2X\_RADIO\_CAUSE\_CONFIG

    - CV2X is inactive due to v2x.xml is missing, invalid, or expired.

- enumerator V2X\_RADIO\_CAUSE\_UE\_MODE

    - CV2X is inactive due to CV2X mode is not started.

- enumerator V2X\_RADIO\_CAUSE\_GEOPOLYGON

    - CV2X is inactive due to UE enters a geo-polygon that does not support cv2x.

- enumerator V2X\_RADIO\_CAUSE\_THERMAL

    - CV2X is suspended when the device’s temperature is high.

- enumerator V2X\_RADIO\_CAUSE\_THERMAL\_ECALL

    - CV2X is suspended when the device’s temperature is high and emergency call is ongoing.

- enumerator V2X\_RADIO\_CAUSE\_GEOPOLYGON\_SWITCH

    - CV2X is suspended when UE switches to a new geopolygon that also supports CV2X and UE is already in CV2X active status, CV2X status will change to active after the update is done.

- enumerator V2X\_RADIO\_CAUSE\_SENSING

    - CV2X Tx is suspended when GNSS signal recovers or CV2X mode just starts. UE needs sensing for 1 second before Tx can begin, Tx status will change to active after sensing is done.

- enumerator V2X\_RADIO\_CAUSE\_LPM

    - CV2X is inactive due to unexpected operating mode.

- enumerator V2X\_RADIO\_CAUSE\_DISABLED

    - CV2X is inactive due to CV2X is disabled in the EFS.

- enumerator V2X\_RADIO\_CAUSE\_NO\_GNSS

    - CV2X is inactive due to GNSS signal is not available when starting CV2X.

- enumerator V2X\_RADIO\_CAUSE\_INVALID\_LICENSE

    - CV2X is inactive due to invalid license.

- enumerator V2X\_RADIO\_CAUSE\_NOT\_READY

    - CV2X is inactive due to low layer is not ready to start CV2X.

- enumerator V2X\_RADIO\_CAUSE\_NTN

    - CV2X is suspended due to NTN is in progress.

- enumerator V2X\_RADIO\_CAUSE\_NO\_DATA\_CALL

    - CV2X is inactive due to no cv2x data call.

- enumerator V2X\_RADIO\_CAUSE\_UNKNOWN

    - Invalid cause type only used internally.

- enum v2x\_auto\_retransmit\_policy\_t

    - V2X Tx retransmission policies supported by the modem.

*Values:*

- enumerator V2X\_AUTO\_RETRANSMIT\_DISABLED

    - Retransmit mode is disabled.

- enumerator V2X\_AUTO\_RETRANSMIT\_ENABLED

    - Retransmit mode is enabled.

- enumerator V2X\_AUTO\_RETRANSMIT\_DONT\_CARE

    - Modem falls back to its default behavior.

- enum v2x\_slss\_sync\_pattern\_t

    - Defines possible values for SLSS sync pattern. Used in [v2x\_slss\_sync\_ref\_ue\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00350.html#a00350)

*Values:*

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_OFFSET\_IND\_1

    - UE transmits SLSS in subframes indicated by the syncOffsetIndicator1 specified in V2X configuration.

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_OFFSET\_IND\_2

    - UE transmits SLSS in subframes indicated by the syncOffsetIndicator2 specified in V2X configuration.

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_OFFSET\_IND\_3

    - UE transmits SLSS in subframes indicated by the syncOffsetIndicator3 specified in V2X configuration.

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_ODD\_RESERVED

    - UE transmits SLSS in odd-numbered reserved subframes.

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_EVEN\_RESERVED

    - UE transmits SLSS in even-numbered reserved subframes.

- enumerator V2X\_SLSS\_SYNC\_PATTERN\_UNKNOWN

    - Unkown SLSS sync pattern.

- enum traffic\_ip\_type\_t

    - V2X Ip Types

*Values:*

- enumerator TRAFFIC\_IP

    - Use Ip type traffic.

- enumerator TRAFFIC\_NON\_IP

    - Use Non-Ip type traffic.

- enum rf\_status\_t

    - Fault detection for Tx chain that including PA and front end.

*Values:*

- enumerator INACTIVE

    - The Tx chain is not working.

- enumerator OPERATIONAL

    - The Tx chain is operational.

- enumerator FAULT

    - Fault detected on the Tx chain.

- enum v2x\_segment\_type\_t

    - Defines possible values for the segment type of a transport block.

*Values:*

- enumerator FIRST

    - V2X packet is segmented, it’s the first transport block.

- enumerator LAST

    - V2X packet is segmented, it’s the last transport block.

- enumerator MIDDLE

    - V2X packet is segmented, it’s a transport block between first and last.

- enumerator ONLY\_ONE

    - V2X packet is not segmented, it’s the only one transport block.

- enum v2x\_tx\_type\_t

    - Defines new Tx or re-Tx type relevant to a transport block.

*Values:*

- enumerator V2X\_NEW\_TX

    - New Tx of the V2X transport block.

- enumerator V2X\_RE\_TX

    - Re-Tx of the V2X transport block.

- enumerator V2X\_SLSS\_TX

    - Tx of SLSS.

Functions

- uint16\_t v2x\_convert\_priority\_to\_traffic\_class([v2x\_priority\_et](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_priority_et) priority)

    - Converts a traffic priority to one of the 255 IPv6 traffic class bytes that are used in the data plane to indicate per-packet priority on non-SPS (event driven) data ports.

- **Associated data types**
    - [v2x\_priority\_et](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga71faa5469e5a8a6f9ff4252b98ad14aa.html#a00061_1ga71faa5469e5a8a6f9ff4252b98ad14aa)

- **Detailed description**
    - This function is symmetric and is a reverse operation.

- 
    - The traffic priority is one of the values between min\_priority\_value and max\_priority\_value returned in the [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342) query.

- Parameters:

    - **priority** – **[in]** Packet priority that is to be converted to an IPv6 traffic class.  This priority is between the lowest and highest priority values returned in [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342).

- Returns:

    - IPv6 traffic class for achieving the calling input parameter priority level.

- [v2x\_priority\_et](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_priority_et) v2x\_convert\_traffic\_class\_to\_priority(uint16\_t traffic\_class)

    - Maps an IPv6 traffic class to a V2X priority value.

- **Detailed description**
    - This function is the inverse of the [v2x\_convert\_priority\_to\_traffic\_class()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gac8862a7ab60fcb2a746fc73064face4f.html#a00061_1gac8862a7ab60fcb2a746fc73064face4f) function. It is symmetric and is a reverse operation.

- Parameters:

    - **traffic\_class** – **[in]** IPv6 traffic classification that came in a packet from the radio.

- Returns:

    - Priority level (between highest and lowest priority values) equivalent to the input IPv6 traffic class parameter.

- [v2x\_api\_ver\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv413v2x_api_ver_t) v2x\_radio\_api\_version()

    - Method used to query the platform SDK for its version number, build information, and build date.

- Returns:

    - [v2x\_api\_ver\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00329.html#a00329) - Contains the build date and API version number.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_query\_capabilities([v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv424v2x_iface_capabilities_t) \*caps)

    - Gets the capabilities of CV2X radio.

- **Associated data types**
    - [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342)

- 
    - Error code - If there is a problem (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- Parameters:

    - **caps** – **[out]** Pointer to the [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342) structure, which contains the capabilities of this specific interface.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6) - The radio is ready for data-plane sockets to be created and bound.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_deinit([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle)

    - De-initializes a specific Radio interface.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - **handle** – **[in]** Handle to the Radio that was initialized.

- Returns:

    - Indication of success or failure (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- int v2x\_radio\_rx\_sock\_create\_and\_bind([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, int \*sock, struct sockaddr\_in6 \*rx\_sockaddr)

    - Opens a new V2X radio receive socket, and initializes the given sockaddr buffer. The socket is also bound as an AF\_INET6 UDP type socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - You can execute any sockopts that are appropriate for this type of socket (AF\_INET6).

- 
    - The port number for the receive path is not exposed, but it is in the sockaddr\_in6 structure (if the caller is interested).

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface.
- **sock** – **[out]** Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **rx\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket. The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind.

- Returns:

    - 0 — On success.

- int v2x\_radio\_rx\_sock\_create\_and\_bind\_v2([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, int id\_ist\_len, uint32\_t \*id\_list, int \*sock, struct sockaddr\_in6 \*rx\_sockaddr)

    - Opens a new V2X radio receive socket with specific service IDs for subscription, and initializes the given sockaddr buffer. The socket is also bound as an AF\_INET6 UDP type socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - You can execute any sockopts that are appropriate for this type of socket (AF\_INET6).

- 
    - This API can be used to subscribe wildcard, catchall port, or specifc service IDs. The Rx port should be set with v2x\_set\_rx\_port() before any subscription via this API, otherwise a default port number 9000 will be used.

- 
    - Wildcard is used to receive all traffic. Only one port can be registered as wildcard port. Once wildcard is registered successfully, all received packets will be directed to wildcard port, and any subscription for specific service IDs or catchall port at other ports will be invalid. The parameter id\_list of this API should be set to a null list for wildcard subscription.

- 
    - Catchall port is used to receive packets with non-registered service IDs (via specific service IDs subscription). Only one port can be registered as catchall port. If catchall port is registered successfully, received packets with non-registered service ID will be directed to catchall port. All specific service IDs subscription (if any) should be performed before catchall port subscription. The parameter id\_list of this API should include all non-registered service IDs for catchall port subscription.

- 
    - Any port different from catchall port can be used to receive packets with specific service IDs. Only one port can be registered for a single service ID, a list of service IDs can be registered at a single port. To subscribe specific service IDs at a given Rx port, a Tx flow must be pre-setup with the Tx service ID set to any service ID included in the list of specific service IDs and the Tx source port set to the same port number as Rx port. The parameter id\_list of this API should include all interested service IDs for the given Rx port.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init(). The handle from that function must be used as the parameter in this function. The Rx port must be pre-set with v2x\_set\_rx\_port(), otherwise a default port number will be used. For any specific service ID subscription, a Tx flow must be pre-setup using one of the following methods:

- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73)
- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a)
- [v2x\_radio\_tx\_sps\_only\_create()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga7661fcb16ff795d13b257324007fe939.html#a00061_1ga7661fcb16ff795d13b257324007fe939)
- [v2x\_radio\_tx\_sps\_only\_create\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga5aaacc392602ba1004aea6583825bc64.html#a00061_1ga5aaacc392602ba1004aea6583825bc64)
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8)
- v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2()
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga86ad09275394775286576b482fbe5a2f.html#a00061_1ga86ad09275394775286576b482fbe5a2f)

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface.
- **id\_ist\_len** – **[in]** Identifies the length of service ID list.
- **id\_list** – **[in]** Pointer to the service ID list for subscription, subscribe wildcard if input nullptr.
- **sock** – **[out]** Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **rx\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket. The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind.

- Returns:

    - 0 — On success.

- int v2x\_radio\_rx\_sock\_create\_and\_bind\_v3([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, uint16\_t port\_num, int id\_ist\_len, uint32\_t \*id\_list, int \*sock, struct sockaddr\_in6 \*rx\_sockaddr)

    - Opens a new V2X radio receive socket with specific service IDs for subscription and specifc port number for the receive path, and initializes the given sockaddr buffer. The socket is also bound as an AF\_INET6 UDP type socket.

This v2x\_radio\_rx\_sock\_create\_and\_bind\_v3() method differs from [v2x\_radio\_rx\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaf830f2dc06421da78984a388cb1a4d29.html#a00061_1gaf830f2dc06421da78984a388cb1a4d29) in that you can use the port\_num parameter to specify the port number for the receive path.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - You can execute any sockopts that are appropriate for this type of socket (AF\_INET6).

- 
    - This API can be used to subscribe wildcard, catchall port, or specifc service IDs.

- 
    - Wildcard is used to receive all traffic. Only one port can be registered as wildcard port. Once wildcard is registered successfully, all received packets will be directed to wildcard port, and any subscription for specific service IDs or catchall port at other ports will be invalid. The parameter id\_list of this API should be set to a null list for wildcard subscription.

- 
    - Catchall port is used to receive packets with non-registered service IDs (via specific service IDs subscription). Only one port can be registered as catchall port. If catchall port is registered successfully, received packets with non-registered service ID will be directed to catchall port. All specific service IDs subscription (if any) should be performed before catchall port subscription. The parameter id\_list of this API should include all non-registered service IDs for catchall port subscription.

- 
    - Any port different from catchall port can be used to receive packets with specific service IDs. Only one port can be registered for a single service ID, a list of service IDs can be registered at a single port. To subscribe specific service IDs at a given Rx port, a Tx flow must be pre-setup with the Tx service ID set to any service ID included in the list of specific service IDs and the Tx source port set to the same port number as Rx port. The parameter id\_list of this API should include all interested service IDs for the given Rx port.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init(). The handle from that function must be used as the parameter in this function. For any specific service ID subscription, a Tx flow must be pre-setup using one of the following methods:

- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73)
- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a)
- [v2x\_radio\_tx\_sps\_only\_create()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga7661fcb16ff795d13b257324007fe939.html#a00061_1ga7661fcb16ff795d13b257324007fe939)
- [v2x\_radio\_tx\_sps\_only\_create\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga5aaacc392602ba1004aea6583825bc64.html#a00061_1ga5aaacc392602ba1004aea6583825bc64)
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8)
- v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2()
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga86ad09275394775286576b482fbe5a2f.html#a00061_1ga86ad09275394775286576b482fbe5a2f)

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface.
- **port\_num** – **[in]** Identifies the port number for the receive path.
- **id\_ist\_len** – **[in]** Identifies the length of service ID list.
- **id\_list** – **[in]** Pointer to the service ID list for subscription, subscribe wildcard if input nullptr.
- **sock** – **[out]** Pointer to the socket that, on success, returns the socket descriptor. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **rx\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket. The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind.

- Returns:

    - 0 — On success.

- int v2x\_radio\_enable\_rx\_meta\_data([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, bool enable, int id\_list\_len, uint32\_t \*id\_list)

    - Enable or disable the meta data report for the packets corresponding to the service IDs.

If enabled, the meta data report would be generated in addition to the actual OTA payload packet, and it comes from the same data interface as the OTA packet itself, it consist of RF RSSI (received signal strength indicator) status, 32-bit SCI Format 1 (3GPP TS 36.213, section 14.1), packet delay estimation, L2 destination ID, and the resource blocks used for the packet’s transmission: subframe, subchannel index.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_INFO permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - This function extracts the received packet’s meta data from the payload, currently only NON-IP packets can have the meta data reported, it is not supported yet for IP packets.

- 
    - If the meta data report is enabled for certain services, call [v2x\_parse\_rx\_meta\_data](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00060_1ga54a9fc93c5fef10026ff49cf4bea8678.html#a00060_1ga54a9fc93c5fef10026ff49cf4bea8678) to extract the meta data by providing a pointer to a object of type [rx\_packet\_meta\_data\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00335.html#a00335), and the real payload.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface.
- **enable** – **[in]** enable or disable the meta data
- **id\_list\_len** – **[in]** number of the service IDs provided in the id\_list
- **id\_list** – **[in]** Pointer to the Rx service ID list

- Returns:

    - 0 — On success.

- int v2x\_radio\_sock\_create\_and\_bind([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_tx_sps_flow_info_t) \*tx\_flow\_info, [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv431v2x_per_sps_reservation_calls_t) \*calls, int tx\_sps\_portnum, int tx\_event\_portnum, int rx\_portnum, [v2x\_sid\_list\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv414v2x_sid_list_t) \*rx\_id\_list, [v2x\_sock\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_sock_info_t) \*tx\_sps\_sock, [v2x\_sock\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_sock_info_t) \*tx\_event\_sock, [v2x\_sock\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_sock_info_t) \*rx\_sock)

    - Creates Tx SPS socket, Tx Event socket and Rx socket with specified parameters. The socket is also bound as an AF\_INET6 UDP type socket.

This v2x\_radio\_sock\_create\_and\_bind() method is the combination of function [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a)/v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2 in the transmit direction and function [v2x\_radio\_rx\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga73293d70edd6e8ec1277e04cef3571db.html#a00061_1ga73293d70edd6e8ec1277e04cef3571db) in the receiving direction.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - You can execute any sockopts that are appropriate for this type of socket (AF\_INET6).

- 
    - This API can be used for the registeration of both Tx and Rx. It sets up sockets on the requested port numbers. A negative port number corresponds to no actions for Tx or Rx.

- 
    - Wildcard is used to receive all traffic. Only one port can be registered as wildcard port. Once wildcard is registered successfully, all received packets will be directed to wildcard port, and any subscription for specific service IDs or catchall port at other ports will be invalid. The parameter rx\_id\_list of this API should be set to a null list for wildcard subscription.

- 
    - Catchall port is used to receive packets with non-registered service IDs (via specific service IDs subscription). Only one port can be registered as catchall port. If catchall port is registered successfully, received packets with non-registered service ID will be directed to catchall port. All specific service IDs subscription (if any) should be performed before catchall port subscription. The parameter rx\_id\_list of this API should include all non-registered service IDs for catchall port subscription.

- 
    - Any port different from catchall port can be used to receive packets with specific service IDs. Only one port can be registered for a single service ID, a list of service IDs can be registered at a single port. To subscribe specific service IDs at a given Rx port, a Tx flow should also be set up using this API. The parameter rx\_id\_list should include all interested service IDs for the given Rx port, the parameter tx\_flow\_info.reservation.v2xid should be set to one of the service ID included in rx\_id\_list, the parmenter tx\_sps\_portnum or tx\_event\_portnum should be set to the same port number as rx\_portnum.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init(). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface.
- **tx\_flow\_info** – **[in]** Pointer to the Tx SPS or event flow information. To create event flow, set reservation.v2xid and flow\_info in this structure.
- **calls** – **[in]** Pointer to reservation callbacks or listeners.  This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic.  This parameter passes NULL if no callbacks are required.
- **tx\_sps\_portnum** – **[in]** Requested Tx source port number for SPS transmissions, or -1 for no Tx sps flow.
- **tx\_event\_portnum** – **[in]** Requested Tx source port number for event transmissions, or -1 for no Tx event flow.
- **rx\_portnum** – **[in]** Requested Rx destination port number, or -1 for no Rx subscription.
- **rx\_id\_list** – **[in]** Pointer to the Rx service ID list for subscription, subscribe wildcard if input nullptr.
- **tx\_sps\_sock** – **[out]** Pointer to the Tx sps socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **tx\_event\_sock** – **[out]** Pointer to the Tx event socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **rx\_sock** – **[out]** Pointer to the Rx socket that, on success, returns the socket descriptor and the IPv6 socket address. The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).

- Returns:

    - 0 — On success.

- int v2x\_radio\_tx\_sps\_sock\_create\_and\_bind([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv430v2x_tx_bandwidth_reservation_t) \*res, [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv431v2x_per_sps_reservation_calls_t) \*calls, int sps\_portnum, int event\_portnum, int \*sps\_sock, struct sockaddr\_in6 \*sps\_sockaddr, int \*event\_sock, struct sockaddr\_in6 \*event\_sockaddr)

    - Creates and binds a socket with a bandwidth-reserved (SPS) Tx flow with the requested ID, priority, periodicity, and size on a specified source port number. The socket is created as an IPv6 UDP socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0) [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00344.html#a00344) [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00349.html#a00349)

- **Detailed description**
    - The radio attempts to reserve the flow with the specified size and rate passed in the request parameters.

- 
    - This function is used only for Tx. It sets up two UDP sockets on the requested two HLOS port numbers.

- 
    - For only a single SPS flow, indicate the event port number by using a negative number or NULL for the event\_sockaddr. For a single event-driven port, use [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8) instead.

- 
    - Because the modem endpoint requires a specific global address, all data sent on these sockets must have a configurable IPv6 destination address for the non-IP traffic.

- 
    - The Priority parameter of the SPS reservation is used only for the reserved Tx bandwidth (SPS) flow. The non-SPS/event-driven data sent to the event\_portnum parameter is prioritized on the air, based on the IPv67 Traffic Class of the packet.

- 
    - The caller is expected to identify two unused local port numbers to use for binding: one for the event-driven flow and one for the SPS flow.

- 
    - This call is a blocking call. When it returns, the sockets are ready to use, assuming there is no error.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface on which this data connection is made.
- **res** – **[in]** Pointer to the parameter structure (how often the structure is sent, how many bytes are reserved, and so on).
- **calls** – **[in]** Pointer to reservation callbacks or listeners.  This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic.  This parameter passes NULL if no callbacks are required.
- **sps\_portnum** – **[in]** Requested source port number for the bandwidth reserved SPS transmissions.
- **event\_portnum** – **[in]** Requested source port number for the bandwidth reserved event transmissions, or -1 for no event port.
- **sps\_sock** – **[out]** Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth.
- **sps\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.
- **event\_sock** – **[out]** Pointer to the socket that is bound to the event-driven transmission port.
- **event\_sockaddr** – **[out]** Pointer to the IPV6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.

- Returns:

    - 0 - On success.

- int v2x\_radio\_tx\_sps\_only\_create([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv430v2x_tx_bandwidth_reservation_t) \*res, [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv431v2x_per_sps_reservation_calls_t) \*calls, int sps\_portnum, int \*sps\_sock, struct sockaddr\_in6 \*sps\_sockaddr)

    - Creates a socket with a bandwidth-reserved (SPS) Tx flow.

Only SPS transmissions are to be implemented for the socket, which is created as an IPv6 UDP socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0) [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00344.html#a00344) [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00349.html#a00349)

- **Detailed description**
    - The radio attempts to reserve the flow with the specified size and rate passed in the request parameters.

- 
    - This function is used only for Tx. It sets up a UDP socket on the requested HLOS port number. Because the modem endpoint requires a specific global address, all data sent on the socket must have a configurable IPv6 destination address for the non-IP traffic.

- 
    - The Priority parameter of the SPS reservation is used only for the reserved Tx bandwidth (SPS) flow.

- 
    - The caller is expected to identify an unused local port number for the SPS flow.

- 
    - This call is a blocking call. When it returns, the socket is ready to use, assuming there is no error.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EINVAL - On failure to find the interface or get bad parameters.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface on which this data connection is made.
- **res** – **[in]** Pointer to the parameter structure (how often the structure is sent, how many bytes are reserved, and so on).
- **calls** – **[in]** Pointer to reservation callbacks or listeners.  This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic.  This parameter passes NULL if no callbacks are required.
- **sps\_portnum** – **[in]** Requested source port number for the bandwidth reserved SPS transmissions.
- **sps\_sock** – **[out]** Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth.
- **sps\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.

- Returns:

    - 0 — On success.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_tx\_reservation\_change(int \*sps\_sock, [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv430v2x_tx_bandwidth_reservation_t) \*updated\_reservation)

    - Adjusts the reservation for transmit bandwidth.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00344.html#a00344)

- **Detailed description**
    - This function can be used as follows:

- When the bandwidth requirement changes in periodicity (for example, due to an application layer DCC algorithm)
- Because the packet size is increasing (for example, due to a growing path history size in a BSM).
- When user wants to update reservation priority.

- 
    - When the reservation change is complete, a callback to the structure is passed in a v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) call.

- 
    - Error code - If there is a problem (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- **Dependencies**
    - An SPS flow must have been successfully initialized with the [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73).

- Parameters:

    - - **sps\_sock** – **[out]** Pointer to the socket bound to the requested port.
- **updated\_reservation** – **[in]** Pointer to a bandwidth reservation with new reservation information.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- int v2x\_radio\_tx\_event\_sock\_create\_and\_bind(const char \*interface, int v2x\_id, int event\_portnum, struct sockaddr\_in6 \*event\_sock\_addr, int \*sock)

    - Opens and binds an event-driven socket (one with no bandwidth reservation). The socket is bound as an AF\_INET6 UDP type socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Detailed description**
    - This function is used only for Tx when no periodicity is available for the application type. If you know your transmit data periodicity, use [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73) instead.

- 
    - These event-driven sockets pay attention to QoS parameters in the IP socket.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- Parameters:

    - - **interface** – **[in]** Pointer to the operating system name to use. This interface is an RmNet interface (HLOS).
- **v2x\_id** – **[in]** Used for transmissions that are ultimately mapped to an L2 destination address.
- **event\_portnum** – **[in]** Local port number to which the socket is bound. Used for transmissions of this ID.
- **event\_sock\_addr** – **[out]** Pointer to the sockaddr\_ll structure buffer to be initialized.
- **sock** – **[out]** Pointer to the file descriptor. Loaded when the function is successful.

- Returns:

    - 0 - On success.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_start\_measurements([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_chan\_meas\_params\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_chan_meas_params_t) \*measure\_this\_way)

    - Requests a channel utilization (CBP/CBR) measurement result on a channel.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0) [v2x\_chan\_meas\_params\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00345.html#a00345)

- **Detailed description**
    - This function uses the callbacks passed in during initialization to deliver the measurements. Measurement callbacks continue until the Radio interface is closed.

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) - CBR measurement is not supported yet.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Handle to the port.
- **measure\_this\_way** – **[in]** Indicates how and what to measure, and how often to send results.  Some higher-level standards (like J2945/1 and ETSI TS102687 DCC) have specific time windows and items to measure.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6) - The radio is now ready for data-plane sockets to be created and bound.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_stop\_measurements([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle)

    - Discontinues any periodic MAC/Phy channel measurements and the reporting of them via listener calls.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Dependencies**
    - The measurements must have been started with [v2x\_radio\_start\_measurements()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gadd7d3bb6f2da85b91cb5af57643f9d6f.html#a00061_1gadd7d3bb6f2da85b91cb5af57643f9d6f).

- Parameters:

    - **handle** – **[in]** Handle to the radio measurements to be stopped.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- int v2x\_radio\_sock\_close(int \*sock\_fd)

    - Closes a specified socket file descriptor and deregisters any modem resources associated with it (such as reserved SPS bandwidth contracts).

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Detailed description**
    - This function works on receive, SPS, or event-driven sockets.

- 
    - The socket file descriptor must be closed when the client exits. We recommend using a trap to catch controlled shutdowns.

- **Dependencies**
    - The socket must have been opened with one of the following methods:

- [v2x\_radio\_rx\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga7a4502010f4ca044831048c1810d6cb3.html#a00061_1ga7a4502010f4ca044831048c1810d6cb3)
- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73)
- [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a)
- [v2x\_radio\_tx\_sps\_only\_create()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga7661fcb16ff795d13b257324007fe939.html#a00061_1ga7661fcb16ff795d13b257324007fe939)
- [v2x\_radio\_tx\_sps\_only\_create\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga5aaacc392602ba1004aea6583825bc64.html#a00061_1ga5aaacc392602ba1004aea6583825bc64)
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8)
- v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2()
- [v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga86ad09275394775286576b482fbe5a2f.html#a00061_1ga86ad09275394775286576b482fbe5a2f)

- Parameters:

    - **sock\_fd** – **[in]** Socket file descriptor.

- Returns:

    - Integer value of the close(sock) operation.

- void v2x\_radio\_set\_log\_level(int new\_level, int use\_syslog)

    - Configures the V2X log level and destination for SDK and lower layers.

- Parameters:

    - - **new\_level** – **[in]** Log level to set to one of the standard syslog levels (LOG\_ERR, LOG\_INFO, and so on).
- **use\_syslog** – **[in]** Destination: send to stdout (0) or syslog (otherwise).

- Returns:

    - None.

- [v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv411v2x_event_t) cv2x\_status\_poll(uint64\_t \*status\_age\_useconds)

    - Polls for the recent V2X status.

- **Detailed description**
    - This function does not generate any modem control traffic. For efficiency, it simply returns the most recently cached value that was reported from the modem (often reported at a high rate or frequent rate from the modem).

- Parameters:

    - **status\_age\_useconds** – **[out]** Pointer to the age in microseconds of the last event (radio status) that is being reported.

- Returns:

    - Indication of success or failure (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- int v2x\_radio\_trigger\_l2\_update([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle)

    - Triggers the modem to change its source L2 address by randomly generating a new address.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - When the change is complete, clients are notified of the new L2 address via the [v2x\_radio\_calls\_t::v2x\_radio\_l2\_addr\_changed\_listener()](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347_1a84847906dce5de6f54cdd1022f580a78) callback function.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- Parameters:

    - **handle** – **[in]** Initialized Radio interface on which this data connection is made.

- Returns:

    - 0 - On success.

- int v2x\_radio\_update\_trusted\_ue\_list(unsigned int malicious\_list\_len, unsigned int malicious\_list[MAX\_MALICIOUS\_IDS\_LIST\_LEN], unsigned int trusted\_list\_len, [trusted\_ue\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417trusted_ue_info_t) trusted\_list[MAX\_TRUSTED\_IDS\_LIST\_LEN])

    - Updates the list of malicious and trusted IDs tracked by the modem.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- **Associated data types**
    - [trusted\_ue\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00340.html#a00340)

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- Parameters:

    - - **malicious\_list\_len** – **[in]** Number of malicious IDs in malicious\_list.
- **malicious\_list** – **[in]** List of malicious IDs.
- **trusted\_list\_len** – **[in]** Number of trusted IDs in trusted\_list.
- **trusted\_list** – **[in]** List of trusted IDs.

- Returns:

    - 0 - On success.

- int v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_tx_sps_flow_info_t) \*sps\_flow\_info, [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv431v2x_per_sps_reservation_calls_t) \*calls, int sps\_portnum, int event\_portnum, int \*sps\_sock, struct sockaddr\_in6 \*sps\_sockaddr, int \*event\_sock, struct sockaddr\_in6 \*event\_sockaddr)

    - Creates and binds a socket with a bandwidth-reserved (SPS) Tx flow with the requested ID, priority, periodicity, and size on a specified source port number. The socket is created as an IPv6 UDP socket.

This v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2() method differs from [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73) in that you can use the sps\_flow\_info parameter to specify transmission resource information about the Tx flow.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0) [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00355.html#a00355) [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00349.html#a00349)

- **Detailed description**
    - The radio attempts to reserve the flow with the specified size and rate passed in the request parameters.

- 
    - This function is used only for Tx. It sets up two UDP sockets on the requested two HLOS port numbers.

- 
    - For only a single SPS flow, indicate the event port number by using a negative number or NULL for the event\_sockaddr. For a single event-driven port, use [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8) or v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2() or [v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga86ad09275394775286576b482fbe5a2f.html#a00061_1ga86ad09275394775286576b482fbe5a2f) instead.

- 
    - Because the modem endpoint requires a specific global address, all data sent on these sockets must have a configurable IPv6 destination address for the non-IP traffic.

- 
    - The Priority parameter of the SPS reservation is used only for the reserved Tx bandwidth (SPS) flow. The non-SPS/event-driven data sent to the event\_portnum parameter is prioritized on the air, based on the IPv67 Traffic Class of the packet.

- 
    - The caller is expected to identify two unused local port numbers to use for binding: one for the event-driven flow and one for the SPS flow.

- 
    - This call is a blocking call. When it returns, the sockets are ready to use, assuming there is no error.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface on which this data connection is made.
- **sps\_flow\_info** – **[in]** Pointer to the flow information in the [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00355.html#a00355) structure.
- **calls** – **[in]** Pointer to reservation callbacks or listeners.  This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic.  This parameter passes NULL if no callbacks are required.
- **sps\_portnum** – **[in]** Requested source port number for the bandwidth reserved SPS transmissions.
- **event\_portnum** – **[in]** Requested source port number for the bandwidth reserved event transmissions, or -1 for no event port.
- **sps\_sock** – **[out]** Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth.
- **sps\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.
- **event\_sock** – **[out]** Pointer to the socket that is bound to the event-driven transmission port.
- **event\_sockaddr** – **[out]** Pointer to the IPV6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.

- Returns:

    - 0 - On success.

- int v2x\_radio\_tx\_sps\_only\_create\_v2([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_tx_sps_flow_info_t) \*sps\_flow\_info, [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv431v2x_per_sps_reservation_calls_t) \*calls, int sps\_portnum, int \*sps\_sock, struct sockaddr\_in6 \*sps\_sockaddr)

    - Creates a socket with a bandwidth-reserved (SPS) Tx flow.

Only SPS transmissions are to be implemented for the socket, which is created as an IPv6 UDP socket.

This v2x\_radio\_tx\_sps\_only\_create\_v2() method differs from [v2x\_radio\_tx\_sps\_only\_create()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga7661fcb16ff795d13b257324007fe939.html#a00061_1ga7661fcb16ff795d13b257324007fe939) in that you can use the sps\_flow\_info parameter to specify transmission resource information about the Tx flow.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0) [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00355.html#a00355) [v2x\_per\_sps\_reservation\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00349.html#a00349)

- **Detailed description**
    - The radio attempts to reserve the flow with the specified size and rate passed in the request parameters.

- 
    - This function is used only for Tx. It sets up a UDP socket on the requested HLOS port number. Because the modem endpoint requires a specific global address, all data sent on the socket must have a configurable IPv6 destination address for the non-IP traffic.

- 
    - The caller is expected to identify an unused local port number to use for binding the SPS flow.

- 
    - This call is a blocking call. When it returns, the socket is ready to use, assuming there is no error.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EINVAL - On failure to find the interface or get bad parameters.

- **Dependencies**
    - The interface must be pre-initialized with v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface on which this data connection is made.
- **sps\_flow\_info** – **[in]** Pointer to the flow information in the [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00355.html#a00355) structure.
- **calls** – **[in]** Pointer to reservation callbacks or listeners.  This parameter is called when underlying radio MAC parameters change related to the SPS bandwidth contract. For example, the callback after a reservation change, or if the timing offset of the SPS adjusts itself in response to traffic.  This parameter passes NULL if no callbacks are required.
- **sps\_portnum** – **[in]** Requested source port number for the bandwidth reserved SPS transmissions.
- **sps\_sock** – **[out]** Pointer to the socket that is bound to the requested port for Tx with reserved bandwidth.
- **sps\_sockaddr** – **[out]** Pointer to the IPv6 UDP socket.  The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function. The caller can then use the buffer for subsequent sendto() function calls.

- Returns:

    - 0 - On success.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_tx\_reservation\_change\_v2(int \*sps\_sock, [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_tx_sps_flow_info_t) \*updated\_flow\_info)

    - Adjusts the reservation for transmit bandwidth.

This v2x\_radio\_tx\_reservation\_change\_v2() method differs from [v2x\_radio\_tx\_reservation\_change()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaeb4020d2ce86c2ab2f7a377845b282bc.html#a00061_1gaeb4020d2ce86c2ab2f7a377845b282bc) in that you can use the updated\_flow\_info parameter to specify transmission resource information about the Tx flow.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_tx\_sps\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00355.html#a00355)

- **Detailed description**
    - This function can be used as follows:

- When the bandwidth requirement changes in periodicity (for example, due to an application layer DCC algorithm)
- Because the packet size is increasing (for example, due to a growing path history size in a BSM).
- When user wants to update reservation priority.

- 
    - When the reservation change is complete, a callback to the structure is passed in a v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) call.

- 
    - Error code - On failure (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- **Dependencies**
    - An SPS flow must have been successfully initialized with [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73) or [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a).

- Parameters:

    - - **sps\_sock** – **[out]** Pointer to the socket bound to the requested port.
- **updated\_flow\_info** – **[in]** Pointer to the new reservation information.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_radio\_tx\_event\_flow\_info\_change(int \*sock, [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_tx_flow_info_t) \*updated\_flow\_info)

    - Adjusts the flow parameters for an existing Tx event socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- **Associated data types**
    - [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00352.html#a00352)

- **Detailed description**
    - When the reservation change is complete, a callback to the structure is passed in a v2x\_radio\_init() or [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) call.

- 
    - This call is a blocking call. When it returns, the socket is ready to be use, assuming there is no error.

- 
    - Error code - On failure (see [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)).

- **Dependencies**
    - An event flow must have been successfully initialized with [v2x\_radio\_tx\_event\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8.html#a00061_1gaac5bf87a1f4c2d5cb25c2ca95af505d8) or v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2() [v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga86ad09275394775286576b482fbe5a2f.html#a00061_1ga86ad09275394775286576b482fbe5a2f).

- Parameters:

    - - **sock** – **[out]** Pointer to the socket bound to the requested port.
- **updated\_flow\_info** – **[in]** Pointer to the new flow parameters.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) start\_v2x\_mode()

    - Starts V2X mode.

The V2X radio status must be INACTIVE. If the status is ACTIVE or SUSPENDED (see [v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1ga3d41faf0302655759df57978a1ef5ff9)), call [stop\_v2x\_mode()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga449fc2f1c94654b702279133942f28f9.html#a00061_1ga449fc2f1c94654b702279133942f28f9) first.

This call is a blocking call. When it returns, V2X mode has been started, assuming there is no error.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_OPS permission to successfully invoke this API.

- 
    - Otherwise:

- [V2X\_STATUS\_EALREADY](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427daefdf22f24b42df1417a7a4e3099af64c) - Failure because V2X mode is already started.
- [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) - Other failure.

- **Dependencies**
    - V2X radio status must be [V2X\_INACTIVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1gga3d41faf0302655759df57978a1ef5ff9a8cdd9c02dc690f27962204715d3c43e8) ([v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1ga3d41faf0302655759df57978a1ef5ff9)).

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) stop\_v2x\_mode()

    - Stops V2X mode.

The V2X radio status must be ACTIVE or SUSPENDED (see [v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1ga3d41faf0302655759df57978a1ef5ff9)). If the status is INACTIVE, call [start\_v2x\_mode()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaf25436925df7b8a699bcf37b598dfafa.html#a00061_1gaf25436925df7b8a699bcf37b598dfafa) first.

This call is a blocking call. When it returns, V2X mode has been stopped, assuming there is no error.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_OPS permission to successfully invoke this API.

- 
    - Otherwise:

- [V2X\_STATUS\_EALREADY](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427daefdf22f24b42df1417a7a4e3099af64c) - Failure because V2X mode is already stopped.
- [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) - Other failure.

- **Dependencies**
    - V2X radio status must be [V2X\_ACTIVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1gga3d41faf0302655759df57978a1ef5ff9ac6d9a555b5849db4fe1fd1cea799268f), [V2X\_TX\_SUSPENDED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1gga3d41faf0302655759df57978a1ef5ff9a4ffdf18eed219a89e02f4f0bbf683d08), [V2X\_RX\_SUSPENDED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1gga3d41faf0302655759df57978a1ef5ff9afffefc8f8433a9e976a551a30bd2e979), or [V2X\_TXRX\_SUSPENDED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1gga3d41faf0302655759df57978a1ef5ff9ab663e5c0ff2ab2014789a3f2eb4015cc).

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) v2x\_radio\_init\_v2([traffic\_ip\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417traffic_ip_type_t) ip\_type, [v2x\_concurrency\_sel\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_concurrency_sel_t) mode, [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_radio_calls_t) \*callbacks\_p, void \*ctx\_p)

    - Deprecated This API has been deprecated. Please use [v2x\_radio\_init\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaaaab550139d34affcd9d786242617e10.html#a00061_1gaaaab550139d34affcd9d786242617e10) instead.

Initializes the Radio interface and sets the callback that will be used when events in the radio change (including when radio initialization is complete).

- **Associated data types**
    - [traffic\_ip\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga7bf4c3b7e59246a1efeacf3851643c7b.html#a00061_1ga7bf4c3b7e59246a1efeacf3851643c7b) [v2x\_concurrency\_sel\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1gaa1ad8d1b5f8b9e3c5e3bdfdf3d7248d3.html#a00061_1gaa1ad8d1b5f8b9e3c5e3bdfdf3d7248d3) [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347)

- **Detailed description**
    - This function call is a blocking, and it is a control plane action.

- 
    - Use [v2x\_radio\_deinit()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gafdd89efa5df27dd3e49b218298102217.html#a00061_1gafdd89efa5df27dd3e49b218298102217) when radio operations are complete.

- 
    - Callback [is](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347_1aed61828d42a787a7c5e4699a25c3ba96) made when initialization is complete.

- 
    - [V2X\_RADIO\_HANDLE\_BAD](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#a00061_1ga714b4eed826cec39d2ff71a204442a78) — If there is an error. No initialization callback is made.

- Parameters:

    - - **ip\_type** – **[in]** The Ip or non-Ip interface.
- **mode** – **[in]** WAN concurrency mode, although the radio might not support concurrency. Errors can be generated.
- **callbacks\_p** – **[in]** Pointer to the [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347) structure that is prepopulated with function pointers used during radio events (such as loss of time synchronization or accuracy) for subscribers.  This parameter also points to a callback for this initialization function.
- **ctx\_p** – **[in]** Voluntary pointer to the first parameter on the callback.

- Returns:

    - Handle to the specified initialized radio. The handle is used for reconfiguring, opening or changing, and closing reservations.

- int v2x\_radio\_init\_v3([v2x\_concurrency\_sel\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_concurrency_sel_t) mode, [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_radio_calls_t) \*callbacks\_p, void \*ctx\_p, [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) \*ip\_handle\_p, [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) \*non\_ip\_handle\_p)

    - Initializes Cv2x radio and sets the callback that will be used when events in the radio change (including when radio initialization is complete). The callers can get the handles of Cv2x IP and non-IP interface on success. The handle of interface is used for reconfiguring, opening or changing, and closing reservations.

- **Associated data types**
    - [v2x\_concurrency\_sel\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1gaa1ad8d1b5f8b9e3c5e3bdfdf3d7248d3.html#a00061_1gaa1ad8d1b5f8b9e3c5e3bdfdf3d7248d3) [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347)

- **Detailed description**
    - This function call is a blocking, and it is a control plane action.

- 
    - Use [v2x\_radio\_deinit()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gafdd89efa5df27dd3e49b218298102217.html#a00061_1gafdd89efa5df27dd3e49b218298102217) with either IP or non-IP handle when radio operations are complete.

- 
    - Callback [is](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347_1aed61828d42a787a7c5e4699a25c3ba96) made when initialization is complete.

- 
    - Otherwise:

- EINVAL - Invalid input parmaters.
- EPERM - Radio initialization failed.

- **Dependencies**
    - This API might fail if the underlying Cv2x status is currently in an inactive state. Use [v2x\_register\_ext\_radio\_status\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga01a63baf76459f59793a89b597da4e07.html#a00061_1ga01a63baf76459f59793a89b597da4e07) to register a listener for CV2X overall Tx/Rx status, then use [v2x\_get\_ext\_radio\_status](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gabdf104b32989a1df866bc04a55bf49f6.html#a00061_1gabdf104b32989a1df866bc04a55bf49f6) to get current V2X overall radio status.

- Parameters:

    - - **mode** – **[in]** WAN concurrency mode, although the radio might not support concurrency. Errors can be generated.
- **callbacks\_p** – **[in]** Pointer to the [v2x\_radio\_calls\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00347.html#a00347) structure that is prepopulated with function pointers used during radio events (such as loss of time synchronization or accuracy) for subscribers.  This parameter also points to a callback for this initialization function.
- **ctx\_p** – **[in]** Voluntary pointer to the first parameter on the callback.
- **ip\_handle\_p** – **[out]** Pointer to the handle of IP interface. Pass nullptr if IP interface is not used.
- **non\_ip\_handle\_p** – **[out]** Pointer to the handle of non-IP interface. Pass nullptr if non-IP interface is not used.

- Returns:

    - 0 - On success.

- int v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3([traffic\_ip\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417traffic_ip_type_t) ip\_type, int v2x\_id, int event\_portnum, [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_tx_flow_info_t) \*event\_flow\_info, struct sockaddr\_in6 \*event\_sockaddr, int \*sock)

    - Opens and binds an event-driven socket (one with no bandwidth reservation). The socket is bound as an AF\_INET6 UDP type socket.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

This v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v3() method differs from v2x\_radio\_tx\_event\_sock\_create\_and\_bind\_v2() in that you can use the traffic\_ip\_type\_t parameter to specify traffic ip type instead of requiring the interface name.

- **Associated data types**
    - [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00352.html#a00352) traffic\_ip\_type\_t

- **Detailed description**
    - This function is used only for Tx when no periodicity is available for the application type. If you know your transmit data periodicity, use [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73) or [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga988e98f326e6877059d8ae9874e7973a.html#a00061_1ga988e98f326e6877059d8ae9874e7973a) instead.

- 
    - These event-driven sockets pay attention to QoS parameters in the IP socket.

- 
    - Otherwise:

- EPERM - Socket creation failed; for more details, check errno.h.
- EAFNOSUPPORT - On failure to find the interface.
- EACCES - On failure to get the MAC address of the device.

- Parameters:

    - - **ip\_type** – **[in]** traffice\_ip\_type.
- **v2x\_id** – **[in]** Used for transmissions that are ultimately mapped to an L2 destination address.
- **event\_portnum** – **[in]** Local port number to which the socket is bound. Used for transmissions of this ID.
- **event\_flow\_info** – **[in]** Pointer to the event flow parameters.
- **event\_sockaddr** – **[out]** Pointer to the sockaddr\_ll structure buffer to be initialized.
- **sock** – **[out]** Pointer to the file descriptor. Loaded when the function is successful.

- Returns:

    - 0 - On success.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) get\_iface\_name([traffic\_ip\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417traffic_ip_type_t) ip\_type, char \*iface\_name, size\_t buffer\_len)

    - Returns interface name set during radio initialization.

- **Associated data types**
    - traffic\_ip\_type\_t

- **Detailed description**
    - This function should only be called after successfully initializing a radio.

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) - If there is an error. Interface name will be an empty string.

- Parameters:

    - - **ip\_type** – **[in]** traffic\_ip\_type\_t
- **iface\_name** – **[out]** pointer to buffer for interface name
- **buffer\_len** – **[in]** length of the buffer passed for interface name. Must be at least the max buffer size for an interface name (IFNAMSIZE).

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- int v2x\_radio\_tcp\_sock\_create\_and\_bind([v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_handle_t) handle, const [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_tx_flow_info_t) \*event\_info, const [socket\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv413socket_info_t) \*sock\_info, int \*sock\_fd, struct sockaddr\_in6 \*sockaddr)

    - Creates a TCP socket for event Tx and Rx. The socket is bound as an AF\_INET6 TCP type socket.

This v2x\_radio\_tcp\_sock\_create\_and\_bind() API creates a new TCP socket and binds the socket to the IPv6 address of local IP interface with specified source port. Additionally, this API also registers a Tx event flow and subscribes Rx with specified service ID to enable TCP control and data packets in both transmitting and receiving directions.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_FLOW\_OPS permission to successfully invoke this API.

- 
    - If the created socket is expected to work as TCP client mode, the caller must establish a connection to the address specifed using function connect(), and then use the socket for send() and recv() on successful connection. The caller must release the created socket and associated resources with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).

- 
    - If the created socket is expected to work as TCP server mode, the caller must mark the created socket as a listening socket with function listen(), that is, as a socket that will be used to accept incoming connection requests using accept(). The caller can then use the connected socket returned by accept() for send() and recv(). The caller must close all connected sockets returned by accept() with function close() first, and then release the listening socket and associated resources with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).

- 
    - This call is a blocking call. When it returns, the created TCP socket is ready to use, assuming there is no error.

- **Associated data types**
    - [v2x\_radio\_handle\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0.html#a00061_1gaa3bab5bc173b1add8afc8b4850fdfed0)

- **Detailed description**
    - You can execute any sockopts that are appropriate for this type of socket (AF\_INET6).

- 
    - 

- 
    - Otherwise:

- EINVAL - On failure to find the interface or get bad parameters.
- EPERM - Socket operation failed; for more details, check errno.h.

- **Dependencies**
    - The interface used for IP communication must be pre-initialized with v2x\_radio\_init(). The handle from that function must be used as the parameter in this function.

- Parameters:

    - - **handle** – **[in]** Identifies the initialized Radio interface. The caller must specify IP interface for raido initilization.
- **event\_info** – **[in]** Pointer to the Tx event flow information.
- **sock\_info** – **[in]** Pointer to the TCP socket information.
- **sock\_fd** – **[out]** Pointer to the socket that, on success, returns the TCP socket descriptor.  The caller must release this socket with [v2x\_radio\_sock\_close()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gad5df0058f7169323001f262186b171a9.html#a00061_1gad5df0058f7169323001f262186b171a9).
- **sockaddr** – **[out]** Pointer to the address of TCP socket. The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind.

- Returns:

    - 0 - On success.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_set\_peak\_tx\_power(int8\_t txPower)

    - Set RF peak cv2x transmit power. This affects the power for all existing flows and for any flow created int the future.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

Precondition — v2x mode enabled.

- Parameters:

    - **txPower** – **[in]** Desired global Cv2x peak tx power in dBm, The value should be in the range from -40 to 31. CV2X modem will set the TX power to -40dBm or 31dBm respectively if the value provided is less than -40 or bigger than 31.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_set\_l2\_filters(uint32\_t list\_len, [src\_l2\_filter\_info](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418src_l2_filter_info) \*list\_array)

    - Set src L2 ID list for filtering. This affects/disables receiving packets from the src L2 IDs in the list.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- Parameters:

    - - **list\_len** – **[in]** number of rc L2 IDs, max value 50
- **list\_array** – **[in]** array that stores the src L2 IDs, durations and pppp values for filter

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_remove\_l2\_filters(uint32\_t list\_len, uint32\_t \*l2\_id\_list)

    - Remove specific src L2 ID list for filtering. This affects/enables receiving packets from the src L2 IDs in the list.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- Parameters:

    - - **list\_len** – **[in]** number of rc L2 IDs, max value 50
- **l2\_id\_list** – **[in]** array that stores the src L2 IDs

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_register\_tx\_status\_report\_listener(uint16\_t port, [v2x\_tx\_status\_report\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv429v2x_tx_status_report_listener) callback)

    - Registers a listener for CV2X Tx status report.

- **Associated data types**
    - v2x\_tx\_status\_report\_listener

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) — If there is an error.

- **Dependencies**
    - CV2X radio must be pre-initialized with [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) or [v2x\_radio\_init\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaaaab550139d34affcd9d786242617e10.html#a00061_1gaaaab550139d34affcd9d786242617e10).

- Parameters:

    - - **port** – **[in]** Set this value to the port number of registered Tx Flow if user wants to receive Tx status report associated with its own Tx flow. If user wants to receive Tx status report associated with all Tx flows in system, set this value to 0.
- **callback** – **[in]** Callback function of [v2x\_tx\_status\_report\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gabe9384c4258de179d7ba5537fe9cc39b.html#a00061_1gabe9384c4258de179d7ba5537fe9cc39b) structure that is called on Tx status reports.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_deregister\_tx\_status\_report\_listener(uint16\_t port)

    - Deregisters a listener for CV2X Tx status report.

- **Associated data types**
    - v2x\_tx\_status\_report\_listener

- **Detailed description**
    - User will not receive Tx status reports after the deregistration.

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) — If there is an error.

- **Dependencies**
    - CV2X radio must be pre-initialized with [v2x\_radio\_init\_v2()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga06cdcda69be72b9ec93881efd4c24ba0.html#a00061_1ga06cdcda69be72b9ec93881efd4c24ba0) or [v2x\_radio\_init\_v3()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaaaab550139d34affcd9d786242617e10.html#a00061_1gaaaab550139d34affcd9d786242617e10).

- Parameters:

    - **port** – **[in]** Port number of previously registered [v2x\_tx\_status\_report\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gabe9384c4258de179d7ba5537fe9cc39b.html#a00061_1gabe9384c4258de179d7ba5537fe9cc39b) that is to be deregistered. If the listener is registered with port number 0, set this value to 0 to deregister the listener.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_set\_global\_IPaddr(uint8\_t prefix\_len, uint8\_t \*ipv6\_addr)

    - Set CV2X global IP address for the IP interface.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- Parameters:

    - - **prefix\_len** – **[in]** CV2X global IP address prefix length in bits, range [64, 128]
- **ipv6\_addr** – **[in]** CV2X global IP address.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_set\_ip\_routing\_info(uint8\_t \*dest\_mac\_addr)

    - Set CV2X IP interface global IP unicast routing information.

- Parameters:

    - **dest\_mac\_addr** – **[in]** CV2X destination L2 address for unicast routing purpose. expecting a 6 bytes array address, in which the L2 addr stored in the last 3 entries in big endian order.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_get\_ext\_radio\_status([v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_radio_status_ex_t) \*status)

    - Get current V2X overall radio status and per pool status.

- Parameters:

    - **status** – **[out]** Pointer to structure [v2x\_radio\_status\_ex\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00339.html#a00339), which contains V2X overall radio status and per pool status on success.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_register\_ext\_radio\_status\_listener([v2x\_ext\_radio\_status\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv429v2x_ext_radio_status_listener) callback)

    - Registers a listener for CV2X overall Tx/Rx status and per pool status.

- **Associated data types**
    - v2x\_ext\_radio\_status\_listener

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) — If there is an error.

- Parameters:

    - **callback** – **[in]** Callback function of [v2x\_ext\_radio\_status\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1ga8a01495c991b9fb5651d5365d6d9a855.html#a00061_1ga8a01495c991b9fb5651d5365d6d9a855) structure that is called on CV2X Tx/Rx status change.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_get\_slss\_rx\_info([v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_slss_rx_info_t) \*slss\_info)

    - Get the current V2X SLSS Rx information.

- Parameters:

    - **slss\_info** – **[out]** Pointer to structure [v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00351.html#a00351), which contains V2X SLSS Rx information on success.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_register\_slss\_rx\_listener([v2x\_slss\_rx\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv420v2x_slss_rx_listener) callback)

    - Registers a listener for CV2X SLSS Rx information.

- **Associated data types**
    - v2x\_slss\_rx\_info\_listener

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) — If there is an error.

- Parameters:

    - **callback** – **[in]** Callback function of [v2x\_slss\_rx\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1ga2c456a2ab7ba81a34e8a420475bb193b.html#a00061_1ga2c456a2ab7ba81a34e8a420475bb193b) structure that is called on SLSS Rx information change.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_deregister\_slss\_rx\_listener([v2x\_slss\_rx\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv420v2x_slss_rx_listener) callback)

    - Deregisters a listener for CV2X SLSS Rx information.

- **Associated data types**
    - v2x\_slss\_rx\_info\_listener

- 
    - [V2X\_STATUS\_FAIL](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427da3858c725ee54429d49ea708f6d86e150) — If there is an error.

- Parameters:

    - **callback** – **[in]** Previously registered [v2x\_slss\_rx\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1ga2c456a2ab7ba81a34e8a420475bb193b.html#a00061_1ga2c456a2ab7ba81a34e8a420475bb193b) that is to be deregistered.

- Returns:

    - [V2X\_STATUS\_SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1gga49d62bdeb1801fa5715ad5fe72f9427dad6de32b5dffe2d50d735121355f2cfc6).

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_inject\_coarse\_utc\_time(uint64\_t utc)

    - Inject coarse UTC time when UE is synchronized to SLSS.

GNSS fix is not available when UE is synchronized to SLSS. To get accurate UTC time in this case, user can register a listener by invoking v2x\_register\_utc\_from\_slss and then inject coarse UTC time derrived from received application messages using this API. The age of injected UTC time could be nearly 10 seconds at most. After that, accurate UTC time will be notified to user periodically through the registered listener.

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- Parameters:

    - **utc** – **[in]** UTC time since Jan. 1, 1970. Units: Milliseconds.

- Returns:

    - V2X\_STATUS\_SUCCESS on success. Error status otherwise.

- [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) v2x\_inject\_vehicle\_speed(uint32\_t speed)

    - Inject vehicle speed, which will be used to select radio resources for C-V2X transmission when GNSS is not available.

User could inject speed at any time, the last injected value will be used when GNSS is not available.

The strategy for speed injection could be

- inject periodically, recommended interval bigger than 1 second
- inject when speed is crossing 60/80/100/120/140/160/180/200 kmph

On platforms with access control enabled, the caller needs to have TELUX\_CV2X\_CONFIG permission to successfully invoke this API.

- Parameters:

    - - **speed** – **[in]** - Vehicle speed in kmph.
- **cb** – **[in]** - Callback that is invoked when speed injection is done.

- Returns:

    - V2X\_STATUS\_SUCCESS if no error occurred.

- struct v2x\_status\_info\_t

    - Encapsulates CV2X Tx/Rx status and cause of failure.

Public Members

- [v2x\_radio\_status\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv423v2x_radio_status_type_t) status

    - Tx/Rx status

- [v2x\_radio\_cause\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv422v2x_radio_cause_type_t) cause

    - Cause of failure

- struct v2x\_radio\_status\_t

    - Encapsulates status of CV2X radio.

Public Members

- [v2x\_status\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_status_info_t) tx\_status

    - TX status

- [v2x\_status\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_status_info_t) rx\_status

    - RX status

- struct v2x\_pool\_status\_t

    - Encapsulates status for single TX/RX pool.

Public Members

- uint8\_t pool\_id

    - pool ID

- [v2x\_status\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_status_info_t) status

    - Tx/Rx pool status

- struct v2x\_radio\_status\_ex\_t

    - V2X overall radio status and per pool status.

Public Members

- [v2x\_radio\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_radio_status_t) status

    - CV2X overall TX/RX status

- uint8\_t tx\_pool\_size

    - Number of Tx pools in array of pool\_status.

- [v2x\_pool\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_pool_status_t) tx\_pool\_status[V2X\_MAX\_TX\_POOL\_NUM]

    - CV2X Tx pool status.

- uint8\_t rx\_pool\_size

    - Number of Rx pools in array of pool\_status.

- [v2x\_pool\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417v2x_pool_status_t) rx\_pool\_status[V2X\_MAX\_RX\_POOL\_NUM]

    - CV2X Rx pool status.

- struct trusted\_ue\_info\_t

    - Contains time confidence, position confidence, and propagation delay for a trusted UE.

Public Members

- uint32\_t source\_l2\_id

    - L2 ID of the trusted source

- float time\_uncertainty

    - Time uncertainty in milliseconds.

- uint16\_t time\_confidence\_level

    - Deprecated. Use time\_uncertainty instead.

Confidence level of the time period.

0 through 127, where 0 is invalid or unavailable and 127 is the most confident

- uint16\_t position\_confidence\_level

    - Confidence level of the position.

0 through 127, where 0 is invalid or unavailable and 127 is the most confident

- uint32\_t propagation\_delay

    - Propagation delay in microseconds.

- struct tx\_pool\_id\_info\_t

    - Contains minimum and maximum EARFCNs for a Tx pool ID. Multiple Tx Pools allow the same radio and overall frequency range to be shared for multiple types of traffic like V2V and V2X. Each pool ID and frequency range corresponds to a certain type of traffic. Both edge guard bands are not included in the EARFCN range reported. The calculation for the full bandwidth includes both edge guard bands is: bandwidth(MHz) = (max\_freq-min\_freq)/9. This struct is used in [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342).

Public Members

- uint8\_t pool\_id

    - ID of the Tx pool.

- uint16\_t min\_freq

    - Minimum EARFCN of this pool.

- uint16\_t max\_freq

    - Maximum EARFCN of this pool.

- struct v2x\_iface\_capabilities\_t

    - Contains information on the capabilities of a Radio interface.

Public Members

- int link\_ip\_MTU\_bytes

    - Maximum data payload length (in bytes) of a packet supported by the IP Radio interface.

- int link\_non\_ip\_MTU\_bytes

    - Maximum data payload length (in bytes) of a packet supported by the non-IP Radio interface.

- [v2x\_concurrency\_sel\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_concurrency_sel_t) max\_supported\_concurrency

    - Indicates whether this interface supports concurrent WWAN with V2X (PC5).

- uint16\_t non\_ip\_tx\_payload\_offset\_bytes

    - Byte offset in a non-IP Tx packet before the actual payload begins. In 3GPP CV2X, the first byte after the offset is the 1-byte V2X Family ID.

This offset is to the left for a per-packet Tx header that includes Tx information that might be inserted in front of the packet payload (in subsequent releases).

An example of Tx information is MAC/Phy parameters (power, rate, retransmissions policy, and so on).

Currently, this value is expected to be 0. But it is reserved to support possible per-packet Tx/Rx headers that might be added in future releases of this API.

- uint16\_t non\_ip\_rx\_payload\_offset\_bytes

    - Byte offset in a non-IP Rx packet before the actual payload begins.

Initially, this value is zero. But it allows for later insertion of per-packet Rx information (sometimes called metadata) to be added to the front of the data payload. An example of Rx information is MAC/Phy measurements (receive signal strength, timestamps, and so on).

The V2X Family ID is considered as part of the payload in the 3GPP CV2X. Higher layers (applications that are clients to this API) must remove or advance past that 1 byte to get to the more familiar actual WSMP/Geonetworking payload.

- uint16\_t int\_min\_periodicity\_multiplier\_ms

    - Lowest number of milliseconds requested for a bandwidth.

This value is also the basis for all possible bandwidth reservation periods. For example, if this multiplier=100 ms, applications can only reserve bandwidths of 100 ms, 200 ms, up to 1000 ms.

- uint16\_t int\_maximum\_periodicity\_ms

    - Least frequent bandwidth periodicity that is supported. Above this value, use event-driven periodic messages of a period larger than this value.

- unsigned supports\_10ms\_periodicity

    - Indicates whether n\*10 ms periodicities are supported.

- 0 - Not supported
- 1 - Supported

- unsigned supports\_20ms\_periodicity

    - Indicates whether an n\*20 ms bandwidth reservation is supported.

- 0 - Not supported
- 1 - Supported

- unsigned supports\_50ms\_periodicity

    - Indicates whether 50 ms periodicity is supported.

- 0 - Not supported
- 1 - Supported

- unsigned supports\_100ms\_periodicity

    - Indicates whether the basic minimum periodicity of 100 ms is supported.

- 0 - Not supported
- 1 - Supported

- unsigned max\_quantity\_of\_auto\_retrans

    - Maximum number automatic retransmissions.

0 through 15

- unsigned size\_of\_layer2\_mac\_address

    - Size of the L2 MAC address.

Different Radio Access Technologies have different-sized L2 MAC addresses: 802.11 has 6 bytes, whereas 3GPP PC5 has only 3 bytes.

Because a randomized MAC address comes from an HSM with good pseudo random entropy, higher layers must know how many bytes of the MAC address to generate.

- uint16\_t v2x\_number\_of\_priority\_levels

    - Number of different priority levels supported. For example, 8 is the current 3GPP standard (where a lower number means a higher priority).

- uint16\_t highest\_priority\_value

    - Least urgent priority number supported by this radio.

Higher numbers are lower priority, so if the full range is supported, this value is [V2X\_PRIO\_BACKGROUND](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga71faa5469e5a8a6f9ff4252b98ad14aa.html#a00061_1gga71faa5469e5a8a6f9ff4252b98ad14aaac68c0032e8cdd731db2af6a5cd3631c5).

- uint16\_t lowest\_priority\_value

    - Highest priority value (most urgent traffic).

Lower numbers are higher priority, so if the highest level supported this value is [V2X\_PRIO\_MOST\_URGENT](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga71faa5469e5a8a6f9ff4252b98ad14aa.html#a00061_1gga71faa5469e5a8a6f9ff4252b98ad14aaab2b100559efa30ed2acfcdd7be96a82e).

- uint16\_t max\_qty\_SPS\_flows

    - Maximum number of supported SPS reservations.

- uint16\_t max\_qty\_non\_SPS\_flows

    - Maximum number of supported event flows (non-SPS ports).

- int32\_t max\_tx\_pwr

    - Maximum supported transmission power in dBm.

- int32\_t min\_tx\_pwr

    - Minimum supported transmission power in dBm.

- uint32\_t tx\_pool\_ids\_supported\_len

    - Length of the tx\_pool\_ids\_supported array.

- [tx\_pool\_id\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv417tx_pool_id_info_t) tx\_pool\_ids\_supported[MAX\_POOL\_IDS\_LIST\_LEN]

    - Array of Tx pool IDs and their associated minimum and maximum frequencies.

- struct v2x\_tx\_bandwidth\_reservation\_t

    - Used when requesting a QoS bandwidth contract, which is implemented in PC5 3GPP V2-X radio as a *Semi Persistent Flow* (SPS).

The underlying radio providing the interface might support periodicities of various granularity in 100 ms integer multiples (such as 200 ms, 300 ms, and 400 ms).

The reservation is also used internally as a handle.

Public Members

- int v2xid

    - Variable length 4-byte PSID or ITS\_AID, or another application ID.

- [v2x\_priority\_et](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv415v2x_priority_et) priority

    - Specifies one of the 3GPP levels of priority for the traffic that is pre-reserved on the SPS flow.

Use [v2x\_radio\_query\_capabilities()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga51c821a87099797e841c612c638d0d19.html#a00061_1ga51c821a87099797e841c612c638d0d19) to get the exact number of supported priority levels.

- int period\_interval\_ms

    - Bandwidth-reserved periodicity interval in milliseconds.

There are limits on which intervals the underlying radio supports. Use the capabilities query method to discover the int\_min\_periodicity\_multiplier\_ms and int\_maximum\_periodicity\_ms supported intervals.

- int tx\_reservation\_size\_bytes

    - Number of Tx bandwidth bytes that are sent every periodicity interval.

- struct v2x\_chan\_meas\_params\_t

    - Contains the measurement parameters for configuring the MAC/Phy radio channel measurements (such as CBR utilization).

The radio chip contains requests on radio measurement parameters that API clients can use to specify the following:

- How their higher-level application requires the CBR/CBP to be measured
- Over which time window
- When to send a report

Public Members

- int channel\_measurement\_interval\_us

    - Duration in microseconds of the sliding window size.

- int rs\_threshold\_decidbm

    - Parameter to the radio CBR measurement that is used for determining how busy the channel is.

Signals weaker than the specified receive strength (RSRP, or RSSI) are not considered to be in use (busy).

- struct v2x\_chan\_measurements\_t

    - Periodically returned by the radio with all measurements about the radio channel, such as the amount of noise and bandwidth saturation (channel\_busy\_percentage, or CBR).

Public Members

- float channel\_busy\_percentage

    - No measurement parameters are supplied.

- float noise\_floor

    - Measurement of the background noise for a quiet channel.

- float time\_uncertainty

    - V2X time uncertainty in milliseconds.

- struct v2x\_radio\_calls\_t

    - Contains callback functions used in a v2x\_radio\_init() and v2x\_radio\_init\_v2 call.

The radio interface uses these callback functions for events such as completion of initialization, a Layer-02 MAC address change, or a status event (loss of sufficient GPS time precision to transmit).

These callbacks are related to a specific radio interface, and its MAC/Phy parameters, such as transmit power, bandwidth utilization, and changes in radio status.

Public Members

- void (\*v2x\_radio\_init\_complete)([v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/c_apis_common.html#_CPPv420v2x_status_enum_type) status, void \*context)

    - Callback that indicates initialization is complete.

- **Associated data types**
    - [v2x\_status\_enum\_type](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d.html#a00065_1ga49d62bdeb1801fa5715ad5fe72f9427d)

- Param status:

    - **[in]** Updated current radio status that indicates whether transmit and receive are ready.

- Param context:

    - **[in]** Pointer to the context that was supplied during initial registration.

- void (\*v2x\_radio\_status\_listener)([v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv411v2x_event_t) event, void \*context)

    - Callback made when the status in the radio changes. For example, in response to a fault when there is a loss of GPS timing accuracy. Deprecated This callback is deprecated, please consider use v2x\_ext\_radio\_status\_listener instead.

- **Associated data types**
    - [v2x\_event\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga3d41faf0302655759df57978a1ef5ff9.html#a00061_1ga3d41faf0302655759df57978a1ef5ff9)

- Param event:

    - **[in]** Delivery of the event that just occurred, such losing the ability to transmit.

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- void (\*v2x\_radio\_chan\_meas\_listener)([v2x\_chan\_measurements\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv423v2x_chan_measurements_t) \*measurements, void \*context)

    - Callback made from lower layers when periodic radio measurements are prepared.

- **Associated data types**
    - [v2x\_chan\_measurements\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00346.html#a00346)

- Param measurements:

    - **[in]** Pointer to the periodic measurements.

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- void (\*v2x\_radio\_l2\_addr\_changed\_listener)(int new\_l2\_address, void \*context)

    - Callback made by the platform SDK when the MAC address (L2 SRC address) changes.

- Param new\_l2\_address:

    - **[in]** New L2 source address as an integer (because the L2 address is 3 bytes).

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- void (\*v2x\_radio\_macphy\_change\_complete\_cb)(void \*context)

    - Callback made to indicate that the requested radio MAC/Phy change (such as channel/frequency and power) has completed.

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- void (\*v2x\_radio\_capabilities\_listener)([v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv424v2x_iface_capabilities_t) \*caps, void \*context)

    - Callback made when V2X capabilities change.

- **Associated data types**
    - [v2x\_iface\_capabilities\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00342.html#a00342)

- Param caps:

    - **[in]** Pointer to the capabilities of this interface.

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- void (\*v2x\_service\_status\_listener)([v2x\_service\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv420v2x_service_status_t) status, void \*context)

    - Callback made when the service status changes.

- **Associated data types**
    - [v2x\_service\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga22f72b0f4dcf2e9569df17174c8d0dfc.html#a00061_1ga22f72b0f4dcf2e9569df17174c8d0dfc)

- Param status:

    - **[in]** Service status.

- Param context:

    - **[in]** Pointer to the context of the caller who originally registered for this callback.

- struct v2x\_sps\_mac\_details\_t

    - Contains MAC information that is reported from the actual MAC SPS in the radio. The offsets can periodically change on any given transmission report.

Public Members

- uint32\_t periodicity\_in\_use\_ns

    - Actual transmission interval period (in nanoseconds) scheduled relative to 1PP 0:00.00 time.

- uint16\_t currently\_reserved\_periodic\_bytes

    - Actual number of bytes currently reserved at the MAC layer. This number can be slightly larger than original request.

- uint32\_t tx\_reservation\_offset\_ns

    - Actual offset, from a 1PPS pulse and Tx flow periodicity, that the MAC selected and is using for the transmit reservation.

If data goes to the radio with enough time, it can be transmitted on the medium in the next immediately scheduled slot.

- uint64\_t utc\_time\_ns

    - Absolute UTC start time of next selected grant, in nanoseconds.

- struct v2x\_per\_sps\_reservation\_calls\_t

    - Callback functions used in [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73) calls.

Public Members

- void (\*v2x\_radio\_l2\_reservation\_change\_complete\_cb)(void \*context, [v2x\_sps\_mac\_details\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_sps_mac_details_t) \*details)

    - Callback made upon completion of a reservation change that a [v2x\_radio\_tx\_reservation\_change()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1gaeb4020d2ce86c2ab2f7a377845b282bc.html#a00061_1gaeb4020d2ce86c2ab2f7a377845b282bc) call initiated for a MAC/Phy contention.

The current SPS offset and reservation parameter are passed in the details structure returned by the pointer details.

- **Associated data types**
    - [v2x\_sps\_mac\_details\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00348.html#a00348)

- Param context:

    - **[in]** Pointer to the application context.

- Param details:

    - **[in]** Pointer to the MAC information.

- void (\*v2x\_radio\_sps\_offset\_changed)(void \*context, [v2x\_sps\_mac\_details\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv421v2x_sps_mac_details_t) \*details)

    - Callback periodically made when the MAC SPS timeslot changes. The new reservation offset is in the details structure returned by pointer details.

- **Associated data types**
    - [v2x\_sps\_mac\_details\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00348.html#a00348)

- **Detailed description**
    - This callback can occur when a MAC contention triggers a new reservation time slot to be selected. It is relevant only to connections opened with [v2x\_radio\_tx\_sps\_sock\_create\_and\_bind()](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga1a1efdacc2ed22e915ab02acdc288b73.html#a00061_1ga1a1efdacc2ed22e915ab02acdc288b73).

- Param measurements:

    - **[in]** Pointer to the channel measurements.

- Param context:

    - **[in]** Pointer to the context.

- struct v2x\_slss\_sync\_ref\_ue\_info\_t

    - Encapsulates parameters of an SLSS sync reference UE. Used in [v2x\_slss\_rx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00351.html#a00351).

Public Members

- uint16\_t slss\_id

    - The SLSS ID of the sync reference UE that is defined in 3GPP TS 36.331 chapter 6.3.8.

- bool in\_coverage

    - Indicates whether or not the UE is in coverage of GNSS that is defined in 3GPP TS 36.331 chapter 6.5.2.

- [v2x\_slss\_sync\_pattern\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv423v2x_slss_sync_pattern_t) pattern

    - Indicates the SLSS sync pattern of the UE that is defined in 3GPP TS 36.331 chapter 6.3.8.

- uint8\_t rsrp

    - SLSS RSRP value of the UE in dBm is ((float)rsrp - 256)/2.

- bool selected

    - Indicates whether or not the sync reference UE has been selected as the timing source.

- struct v2x\_slss\_rx\_info\_t

    - Encapsulates parameters of CV2X SLSS Rx Information.

Used in [v2x\_get\_slss\_rx\_info](https://docs.qualcomm.com/doc/80-PF458-2/topic/function_a00061_1ga8a4115acf65ab70fac6064f17a85e224.html#a00061_1ga8a4115acf65ab70fac6064f17a85e224) and v2x\_slss\_rx\_info\_listener.

Public Members

- uint32\_t num\_ue

    - The number of SLSS sync reference UEs in array ueInfo.

- [v2x\_slss\_sync\_ref\_ue\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv427v2x_slss_sync_ref_ue_info_t) ue\_info[V2X\_MAX\_SLSS\_SYNC\_REF\_UE\_NUM]

    - Array of detected SLSS sync reference UEs.

- struct v2x\_tx\_flow\_info\_t

    - Advanced parameters that can be specified for Tx SPS and event-driven flows.

Public Members

- [v2x\_auto\_retransmit\_policy\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv428v2x_auto_retransmit_policy_t) retransmit\_policy

    - V2X retransmit policy.

- uint8\_t default\_tx\_power\_valid

    - Indicates whether the default Tx power is specified.

- 0 - Default power is not specified
- 1 - Default power is specified and is valid

- int32\_t default\_tx\_power

    - Default power used for transmission.

- uint8\_t mcs\_index\_valid

    - Indicates whether the MCS index is specified.

- 0 - Index is not specified
- 1 - Index is specified and is valid

- uint8\_t mcs\_index

    - MCS index number

- uint8\_t tx\_pool\_id\_valid

    - Indicates whether the Tx pool ID is valid.

- 0 - ID is not specified
- 1 - ID is specified and is valid

- uint8\_t tx\_pool\_id

    - ID of the Tx pool.

- uint8\_t is\_unicast\_valid

    - Indicates whether is\_unicast is specified.

- 0 - Is unicast is not specified
- 1 - Is unicast is specified and is valid

- uint8\_t is\_unicast

    - Non zero if requested flow is unicast. Note: Unicast flows ignore subscribed Service Ids

- struct v2x\_sock\_info\_t

    - Parameters to identify a Tx or Rx socket.

Public Members

- int sock

    - Pointer to the file descriptor for the socket.

- struct sockaddr\_in6 sockaddr

    - IPv6 socket address. The sockaddr\_in6 buffer is initialized with the IPv6 source address and source port that are used for the bind() function.

- struct v2x\_sid\_list\_t

    - Parameters to identify a service ID list.

Public Members

- int length

    - number of services IDs included in the array of sid.

- uint32\_t sid[MAX\_SUBSCRIBE\_SIDS\_LIST\_LEN]

    - array of service IDs.

- struct v2x\_tx\_sps\_flow\_info\_t

    - Advanced parameters that can be specified for Tx SPS flows.

Public Members

- [v2x\_tx\_bandwidth\_reservation\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv430v2x_tx_bandwidth_reservation_t) reservation

    - Transmit reservation information.

- [v2x\_tx\_flow\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_tx_flow_info_t) flow\_info

    - Transmit resource information about the SPS Tx flow.

- struct socket\_info\_t

    - Parameters that can be specified for the creation of CV2X socket.

Public Members

- uint32\_t service\_id

    - V2X service ID bound to the CV2X socket.

- uint16\_t local\_port

    - Local port number of the CV2X socket used for binding.

- struct src\_l2\_filter\_info\_t

    - Contains remote UE source L2 ID that expecting to filter.

Public Members

- uint32\_t src\_l2\_id

    - remote UE L2 addr to filter.

- uint32\_t duration\_ms

    - Duration, in millisec (resolution 100 msec).

- uint8\_t pppp

    - Proximity service per packet priority (PPPP), packets with priority above this value will be dropped. Range 0-7, 0 mean all of the pkts will be dropped.

- struct v2x\_rf\_tx\_info\_t

    - Tx status per Tx chain and Tx power per Tx antenna for a specific transport block.

Public Members

- [rf\_status\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv411rf_status_t) status

    - Fault detection status for a specific Tx chain.

- int32\_t power

    - The target Tx power after MPR/AMPR reduction for a specific Tx antenna in dBm\*10 format. Invalid value is -700, it means the corresponding antenna is not being used for the transmission of this transport block.

- struct v2x\_tx\_status\_report\_t

    - Information on Tx status of a V2X transport block that is reported from low layer.

1. A V2X Tx packet might trigger multiple reports because of the segmentaion and re-Tx in low layer.
2. If a transport block is dropped in low layer, no report will be triggered for that transport block.
3. The power in the array of rfInfo is the target Tx power value in dBm\*10 after MPR/AMPR reduction for a specific Tx antenna. The status in the array of rfInfo is the fault detection status for a specific Tx chain.

    - In CDD mode, two antennas have transmission for a specific transport block, both rfInfo[0].power and rfInfo[1].power are valid (not -700), rfInfo[i].status is reflecting the status of Tx chain/Tx antenna i.
    - In TXD mode, data transmission swtiches between two antennas/chains and only one antenna/chain has transmission for a specific transport block, the Tx antenna being used has valid power (not -700) in the array of rfInfo, rfInfo[i].status is reflecting the status of Tx chain i or the status of the Tx antenna i whose power is valid (not -700) in the array of rfInfo. Used in [v2x\_tx\_status\_report\_listener](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00061_1gabe9384c4258de179d7ba5537fe9cc39b.html#a00061_1gabe9384c4258de179d7ba5537fe9cc39b)

Public Members

- [v2x\_rf\_tx\_info\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv416v2x_rf_tx_info_t) rf\_info[V2X\_MAX\_ANTENNAS\_SUPPORTED]

    - Tx status per Tx chain and Tx power per Tx antenna.

- uint8\_t num\_rb

    - Number of resource blocks used for the transport block.

- uint8\_t start\_rb

    - Start resource block index used for the transport block.

- uint8\_t mcs

    - Modulation and coding scheme used for the transport block that is defined in 3GPP TS 36.213.

- uint8\_t seg\_num

    - Total number of segments of a V2X packet.

- [v2x\_segment\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv418v2x_segment_type_t) seg\_type

    - Segment type of the transport block.

- [v2x\_tx\_type\_t](https://docs.qualcomm.com/doc/80-PF458-2/topic/radio.html#_CPPv413v2x_tx_type_t) tx\_type

    - Indication of new Tx or re-Tx of the transport block.

- uint16\_t ota\_timing

    - OTA timing in format of system frame number\*10 + subframe number.

- uint16\_t port

    - Port number that can be used to link the report to a specific Tx flow which has the same source port number.

Last Published: Apr 14, 2026

[Previous Topic
C Kinematics APIs](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/kinematics.md) [Next Topic
C Vehicle APIs](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/vehicle.md)