PGET_NEIGHBORS callback function (routprot.h)
The router manager calls the GetNeighbors function to obtain the querier for the network attached through the specified interface.
The PGET_NEIGHBORS type defines a pointer to this callback function. GetNeighbors is a placeholder for the application-defined function name.
Syntax
PGET_NEIGHBORS PgetNeighbors;
DWORD PgetNeighbors(
[in] DWORD InterfaceIndex,
[in] PDWORD NeighborList,
[in, out] PDWORD NeighborListSize,
[out] PBYTE InterfaceFlags
)
{...}
Parameters
[in] InterfaceIndex
Specifies the index of the interface on which the routing protocol should provide the querier.
[in] NeighborList
Pointer to an array DWORD variables. The routing protocol should fill in this array with the address of the querier.
If the local computer is the querier for the network attached through the specified interface, the routing protocol need not fill in this variable. Instead, the routing protocol should set the value pointed to by NeighborListSize to zero. Also, the routing protocol should add MRINFO_QUERIER_FLAG to the flags returned in the InterfaceFlags parameter.
[in, out] NeighborListSize
On input, pointer to a DWORD variable.
On output, the routing protocol fills this variable with the length, in bytes, of the address returned in the NeighborList parameter.
[out] InterfaceFlags
Receives one or more of the following flags. The flags describe the relationship of the local computer to other computers on the network attached through the specified interface.
MRINFO_TUNNEL_FLAG MRINFO_PIM_FLAG MRINFO_DOWN_FLAG MRINFO_DISABLED_FLAG MRINFO_QUERIER_FLAG MRINFO_LEAF_FLAG
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Value | Description |
---|---|
|
The routing protocol could not complete the request. |
|
The size of the buffer pointed to by NeighborList is not large enough to hold the address. The required size is returned in the DWORD variable pointed to by the NeighborListSize parameter. |
|
The InterfaceIndex parameter is invalid (for example, no interface exists with that index). |
Remarks
Only multicast routing protocols are required implement this function. Non-multicast routing protocols should pass NULL as the pointer value for this function in MPR_ROUTING_CHARACTERISTICS
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | routprot.h |