Data Structures | |
struct | junos_sync_tlv_s |
TLV data structure for encoded data. More... | |
struct | junos_sync_getnext_data_s |
Data structure to hold getnext data. More... | |
struct | junos_sync_peer_info_s |
Peer information: shows the role of the PIC as a master or slave, whether it is currently connected with a peer, and connection information. More... | |
struct | junos_sync_state_s |
This data structure encapsulates all data provided to the JUNOS sync system during initialization. More... | |
struct | junos_sync_statistics_s |
Sync subsystem statistics. More... | |
struct | junos_sync_callbacks_s |
Callback functions. More... | |
Typedefs | |
typedef junos_sync_context_s | junos_sync_context_t |
Sync context. | |
typedef enum junos_sync_status_e | junos_sync_status_t |
Error codes returned from the API. | |
typedef junos_sync_tlv_s | junos_sync_tlv_t |
TLV data structure for encoded data. | |
typedef junos_sync_getnext_data_s | junos_sync_getnext_data_t |
Data structure to hold getnext data. | |
typedef junos_sync_peer_info_s | junos_sync_peer_info_t |
Peer information: shows the role of the PIC as a master or slave, whether it is currently connected with a peer, and connection information. | |
typedef junos_sync_state_s | junos_sync_state_t |
This data structure encapsulates all data provided to the JUNOS sync system during initialization. | |
typedef junos_sync_statistics_s | junos_sync_statistics_t |
Sync subsystem statistics. | |
typedef enum junos_sync_conn_status_e | junos_sync_conn_status_t |
Connection status types. | |
typedef void(* | junos_sync_ack_notify_func_t )(junos_sync_tlv_t *data, size_t len) |
Function to notify applications that a data block has been received and acknowledged by the peer. Data length. | |
typedef void(* | junos_sync_data_decode_func_t )(void *data, size_t len) |
Function to decode application data. Data length. | |
typedef void *(* | junos_sync_data_getnext_func_t )(void *current_node, junos_sync_getnext_data_t *data) |
Function to iterate over the application database for resync. | |
typedef void(* | junos_sync_conn_status_change_func_t )(junos_sync_conn_status_t conn_status) |
Function to report a status change in the TCP connection. | |
typedef void(* | junos_sync_init_sync_done_func_t )(size_t num_entries_synced) |
Function to report that initial sync between master and slave has been completed. | |
typedef void(* | junos_sync_bind_done_func_t )(in_port_t server_port) |
Function to report that bind() is completed so the application can register the address and port with the name resolution system. | |
typedef void(* | junos_sync_log_msg_func_t )(const char *fmt,...) |
Function to log error messages in the JUNOS sync subsystem. | |
typedef void *(* | junos_sync_malloc_func_t )(size_t size) |
Function to allocate dynamic memory from the system. | |
typedef void(* | junos_sync_free_func_t )(void *ptr) |
Function to free dynamic memory to the system. | |
typedef void(* | junos_sync_db_clear_func_t )(void) |
Function to clear the replication database. | |
typedef junos_sync_callbacks_s | junos_sync_callbacks_t |
Callback functions. | |
Enumerations | |
enum | junos_sync_status_e { JUNOS_SYNC_OK = 0, JUNOS_SYNC_ERR = -1, JUNOS_SYNC_ENOMEM = -2, JUNOS_SYNC_ENOTCONN = -3, JUNOS_SYNC_ENOTRESYNCED = -4, JUNOS_SYNC_EINVAL = -5, JUNOS_SYNC_EEXIST = -6, JUNOS_SYNC_ENOEVENTCTX = -7 } |
Error codes returned from the API. More... | |
enum | junos_sync_conn_status_e { JUNOS_SYNC_CONN_DOWN, JUNOS_SYNC_CONN_READY } |
Connection status types. More... | |
Functions | |
junos_sync_status_t | junos_sync_exit (junos_sync_context_t *sync_ctx) |
junos_sync_context_t * | junos_sync_init (junos_sync_state_t *psync_state, junos_sync_callbacks_t *psync_callbacks) |
void | junos_sync_get_peer_info (junos_sync_context_t *sync_ctx, junos_sync_peer_info_t *peer_info) |
void | junos_sync_get_statistics (junos_sync_context_t *sync_ctx, junos_sync_statistics_t *statistics) |
junos_sync_status_t | junos_sync_queue (junos_sync_context_t *sync_ctx, junos_sync_tlv_t *data, bool ack_required) |
void | junos_sync_show_queues (junos_sync_context_t *sync_ctx) |
junos_sync_status_t | junos_sync_set_event_context (junos_sync_context_t *sync_ctx, evContext ctx) |
junos_sync_status_t | junos_sync_start (junos_sync_context_t *sync_ctx) |
junos_sync_status_t | junos_sync_start_event_loop (junos_sync_context_t *sync_ctx) |
junos_sync_status_t | junos_sync_stop (junos_sync_context_t *sync_ctx) |
junos_sync_status_t | junos_sync_stop_event_loop (junos_sync_context_t *sync_ctx) |
junos_sync_status_t | junos_sync_switchover (junos_sync_context_t *sync_ctx, junos_sync_state_t *psync_state, junos_sync_callbacks_t *psync_callbacks) |
|
Function to notify applications that a data block has been received and acknowledged by the peer. Data length.
|
|
Function to report that
The server IP address needs to be provided by applications since the
|
|
Callback functions. Applications need to provide these callbacks to the JUNOS sync system. |
|
Function to report a status change in the TCP connection.
|
|
Function to decode application data. Data length. The called routine is expected to decode the data block and do whatever it wishes with the results (typically doing something to a replication database). This callback is called by the slave to notify the application that a data block is received. Please note: the data here is not pointing to the encoded TLV format data; it is pointing to the data with TLV headers stripped off.
|
|
Function to iterate over the application database for resync.
|
|
Function to clear the replication database. This is called when a connection is established in order to keep the replicate database in a clean state. |
|
Function to free dynamic memory to the system.
|
|
Function to report that initial sync between master and slave has been completed. This is called only by the master.
|
|
Function to log error messages in the JUNOS sync subsystem.
|
|
Function to allocate dynamic memory from the system.
|
|
Connection status types.
|
|