> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionDoIPSetVehicleUdpPort

# DoIP\_SetVehicleUdpPort

[CAPL Functions](../../CAPLfunctions.md) » [Diagnostics](../CAPLfunctionsDiagnosticsOverview.md) » DoIP\_SetVehicleUdpPort

**Valid for:** CANoe DE

**Note:** The following DoIP CAPL function is only available with the modeling library **DoIP.dll** and eventually an appropriate implementation of the CAPL Callback Interface. Information about the DoIP DLL and the CAPL Callback Interface you find here:

* [DoIP CAPL Introduction](../CAPLDiagnosticDoIP.md)
* [AN-IND-1-012\_CAPL\_Callback\_Interface.pdf](javascript:startDemoLoader\('AN-IND-1-012_CAPL_Callback_Interface.pdf'\))
* [AN-IND-1-026\_DoIP\_in\_CANoe.pdf](javascript:startDemoLoader\('AN-IND-1-026_DoIP_in_CANoe.pdf'\))

## Function Syntax

```plaintext theme={null}
void DoIP_SetVehicleUdpPort( dword port);
```

## Description

Sets the UDP port (UDP\_VEHICLE\_LOCAL) to be used by the DoIP layer.

This function must be called in [on preStart](../../Other/EventProcedures/CAPLfunctionsEventproceduresMeasurementSystem.md).

## Parameters

* **port**: The UDP\_VEHICLE\_LOCAL port of the DoIP layer.

## Return Values

—

## Example

```plaintext theme={null}
dword port;
port = DiagGetCommParameter( "DoIP.VEHICLE_UDP_Data");
// Set the vehicle UDP port
DoIP_SetVehicleUdpPort( port);
```

[DiagGetCommParameter](CAPLfunctionDiagGetCommParameter.md)
