ndDoIPActivateRouting
- Updated2025-10-07
- 1 minute(s) read
Purpose
Defines the source and target address for a DoIP TCP/IP connection.
Format
long ndDoIPActivateRouting (
TD1 *diagRef,
unsigned char ActivationType,
unsigned short SourceAddress,
unsigned short *TargetAddress);
Input
diagRef
Specifies the handle for the diagnostic session, obtained from ndOpenDiagnosticOnIPStack and passed to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate the elements of this struct.
ActivationType
Indicates the specific type of routing activation that may require different types of authentication and/or confirmation. Defined values are:
| 0 | Default. |
| 1 | WWH-OBD (worldwide harmonized onboard diagnostic). |
| 0xE0 | Use an OEM-specific central security approach. |
Values 2 to 0xDF are reserved. Values 0xE0 to 0xFF are OEM specific.
SourceAddress
The DoIP source address of the tester that starts the communication. Output
TargetAddress
The logical address of the responding DoIP entity. This address is contained inside the routing activation response.
Return Value
The return value indicates the function call status as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.
Use the ndStatusToString function to obtain a descriptive string for the return value.
DescriptionndDoIPActivateRouting establishes a route for the DoIP messages and assigns an endpoint TargetAddress. After successfully establishing a route, diagnostic messages can be exchanged with the target DoIP entity using any of the diagnostic service functions.