dnp3 (C API) 1.6.0
Loading...
Searching...
No Matches
dnp3_connection_handler_t Struct Reference

Callbacks to user code that determine how the server processes connections. More...

#include <dnp3.h>

Data Fields

void(* accept )(const char *, dnp3_accept_handler_t *, void *)
 Filter the connection solely based on the remote address. More...
 
void(* start )(const char *, dnp3_master_channel_t *, void *)
 Start a communication session that was previously accepted using only the socket address. More...
 
void(* accept_with_link_id )(const char *, uint16_t, uint16_t, dnp3_identified_link_handler_t *, void *)
 Filter the connection based on the source and destination of the first link-layer frame. More...
 
void(* start_with_link_id )(const char *, uint16_t, uint16_t, dnp3_master_channel_t *, void *)
 Start a communication session that was previously accepted using link identity information. More...
 
void(* on_destroy )(void *arg)
 Callback when the underlying owner doesn't need the interface anymore. More...
 
void * ctx
 Context data. More...
 

Detailed Description

Callbacks to user code that determine how the server processes connections.

Field Documentation

◆ accept

void(* dnp3_connection_handler_t::accept) (const char *, dnp3_accept_handler_t *, void *)

Filter the connection solely based on the remote address.

Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
acceptorClass used to handle the accept
ctxContext data

◆ accept_with_link_id

void(* dnp3_connection_handler_t::accept_with_link_id) (const char *, uint16_t, uint16_t, dnp3_identified_link_handler_t *, void *)

Filter the connection based on the source and destination of the first link-layer frame.

Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
sourceSource address from the frame
destinationDestination address from the frame
acceptorClass used to handle the accept
ctxContext data

◆ ctx

void* dnp3_connection_handler_t::ctx

Context data.

◆ on_destroy

void(* dnp3_connection_handler_t::on_destroy) (void *arg)

Callback when the underlying owner doesn't need the interface anymore.

Parameters
argContext data

◆ start

void(* dnp3_connection_handler_t::start) (const char *, dnp3_master_channel_t *, void *)

Start a communication session that was previously accepted using only the socket address.

Warning
You must add associations and/or enable the channel from a different thread than this callback as those methods cannot be called on the Tokio runtime
Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
channelClass used to control the channel
ctxContext data

◆ start_with_link_id

void(* dnp3_connection_handler_t::start_with_link_id) (const char *, uint16_t, uint16_t, dnp3_master_channel_t *, void *)

Start a communication session that was previously accepted using link identity information.

Warning
You must add associations and/or enable the channel from a different thread than this callback as those methods cannot be called on the Tokio runtime
Parameters
remote_addrSocket address of the remote outstation, e.g. 192.168.0.22:51532
sourceSource address from the frame
destinationDestination address from the frame
channelClass used to control the channel
ctxContext data

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