JevGetSourceAddress
- Organization of this page
Description
This function acquires the source IP address as a basic attribute of the JP1 event.
Definition header
JevApi.h
Format
int JevGetSourceAddress(long* lplStatus, JP1EVENT event, int* lpnSize, const char** const lppszValue);
Arguments
lplStatus
In lplStatus, specify the pointer to the area for containing the status code that this function returns if the function abnormally terminates. The following explains the status code.
Status code |
Meaning |
---|---|
JEV_S_PARAM_ERROR |
An invalid parameter is specified. |
event
In event, specify the handle for accessing the target JP1 event (the return value of the JevGetEvent() function).
lpnSize
In lpnSize, specify the pointer to the area for storing the length of the event-originating IP address. For JP1 events acquired in an IPv6 environment, the length of the destination IP address must be 16.
lppszValue
In lppszValue, specify the pointer to the area for storing the pointer to the acquired event-originating IP address.
Return values
Situation |
Explanation |
---|---|
Normal termination |
The function returns 0 and, in the area specified in lppszValue, stores the pointer to the event-originating IP address. Also, in the area specified in lpnSize, the function stores the length of the event-originating IP address. |
Abnormal termination |
The function returns -1. Also, in the area specified in lplStatus, the function stores the detailed error code. |