Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Public Attributes | List of all members
listener_ops Struct Reference

Public Attributes

void * context
 
void(* destroy )(ListenerOps **listenerOpsPtr)
 
const char *(* getListenerName )(const ListenerOps *ops)
 
unsigned(* getInterfaceIndex )(const ListenerOps *ops)
 
const Address *(* getListenAddress )(const ListenerOps *ops)
 
EncapType(* getEncapType )(const ListenerOps *ops)
 
const char *(* getInterfaceName )(const ListenerOps *ops)
 
int(* getSocket )(const ListenerOps *ops)
 
unsigned(* createConnection )(ListenerOps *listener, int fd, const AddressPair *pair)
 
const Connection *(* lookupConnection )(ListenerOps *listener, const AddressPair *pair)
 

Member Data Documentation

◆ context

void* listener_ops::context

A user-defined parameter

◆ destroy

void(* listener_ops::destroy) (ListenerOps **listenerOpsPtr)

Called to destroy the Listener.

Parameters
[in]listenerOpsPtrDouble pointer to this structure

◆ getEncapType

EncapType(* listener_ops::getEncapType) (const ListenerOps *ops)

Returns the encapsulation type of the listener (e.g. TCP, UDP, HICN)

Parameters
[in]opsPointer to this structure
Returns
the listener encapsulation type

◆ getInterfaceIndex

unsigned(* listener_ops::getInterfaceIndex) (const ListenerOps *ops)

Returns the interface index of the listener.

Parameters
[in]opsPointer to this structure
Returns
the interface index of the listener

◆ getInterfaceName

const char*(* listener_ops::getInterfaceName) (const ListenerOps *ops)

Returns the interface name of the listener.

Parameters
[in]opsPointer to this structure
Returns
the interface name of the listener

◆ getListenAddress

const Address*(* listener_ops::getListenAddress) (const ListenerOps *ops)

Returns the address pair that defines the listener (local, remote)

Parameters
[in]opsPointer to this structure
Returns
the (local, remote) pair of addresses

◆ getListenerName

const char*(* listener_ops::getListenerName) (const ListenerOps *ops)

Returns the listener name of the listener.

Parameters
[in]opsPointer to this structure
Returns
the listener name of the listener

◆ getSocket

int(* listener_ops::getSocket) (const ListenerOps *ops)

Returns the underlying socket associated with the listener

Not all listeners are capable of returning a useful socket. In those cases, this function pointer is NULL.

TCP does not support this operation (function is NULL). UDP returns its local socket.

The caller should never close this socket, the listener will do that when its destroy method is called.

Parameters
[in]opsPointer to this structure
Return values
integerThe socket descriptor

Example:

<#example#>

The documentation for this struct was generated from the following file: