totemnet.c File Reference
`#include <config.h>`
`#include <assert.h>`
`#include <totemudp.h>`
`#include <totemudpu.h>`
`#include <totemknet.h>`
`#include <totemnet.h>`
`#include <qb/qbloop.h>`
`#include <corosync/logsys.h>`
Include dependency graph for totemnet.c:

Go to the source code of this file.

## Data Structures

struct | transport
struct | totemnet_instance

## Macros

#define | LOGSYS_UTILS_ONLY 1
#define | log_printf(level, format, args...)

## Functions

int | totemnet_crypto_set (void *net_context, const char *cipher_type, const char *hash_type)
int | totemnet_finalize (void *net_context)

int

totemnet_initialize (qb_loop_t *loop_pt, void **net_context, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))

void * | totemnet_buffer_alloc (void *net_context)
void | totemnet_buffer_release (void *net_context, void *ptr)
int | totemnet_processor_count_set (void *net_context, int processor_count)
int | totemnet_recv_flush (void *net_context)
int | totemnet_send_flush (void *net_context)
int | totemnet_token_send (void *net_context, const void *msg, unsigned int msg_len)
int | totemnet_mcast_flush_send (void *net_context, const void *msg, unsigned int msg_len)
int | totemnet_mcast_noflush_send (void *net_context, const void *msg, unsigned int msg_len)
int | totemnet_iface_check (void *net_context)
int | totemnet_net_mtu_adjust (void *net_context, struct totem_config *totem_config)
int | totemnet_iface_set (void *net_context, const struct totem_ip_address *interface_addr, unsigned short ip_port, unsigned int iface_no)
int | totemnet_nodestatus_get (void *net_context, unsigned int nodeid, struct totem_node_status *node_status)
int | totemnet_ifaces_get (void *net_context, char ***status, unsigned int *iface_count)
int | totemnet_token_target_set (void *net_context, unsigned int nodeid)
int | totemnet_recv_mcast_empty (void *net_context)
int | totemnet_member_add (void *net_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int ring_no)
int | totemnet_member_remove (void *net_context, const struct totem_ip_address *member, int ring_no)
int | totemnet_member_set_active (void *net_context, const struct totem_ip_address *member, int active)
int | totemnet_reconfigure (void *net_context, struct totem_config *totem_config)
int | totemnet_crypto_reconfigure_phase (void *net_context, struct totem_config *totem_config, cfg_message_crypto_reconfig_phase_t phase)
void | totemnet_stats_clear (void *net_context)

## Variables

struct transport | transport_entries []

## Macro Definition Documentation

## log_printf

#define log_printf | ( |  | level,
|  |  | format,
|  |  | args...
| ) |  |

Value:
do { \
instance->totemnet_log_printf ( \
level, \
instance->totemnet_subsys_id, \
__FUNCTION__, __FILE__, __LINE__, \
(const char *)format, ##args); \
} while (0);

Definition at line 265 of file totemnet.c.

## LOGSYS_UTILS_ONLY

#define LOGSYS_UTILS_ONLY 1

Definition at line 46 of file totemnet.c.

## Function Documentation

## totemnet_buffer_alloc()

void* totemnet_buffer_alloc | ( | void * | net_context | ) |

Definition at line 367 of file totemnet.c.

References transport::buffer_alloc, and totemnet_instance::transport.

## totemnet_buffer_release()

void totemnet_buffer_release | ( | void * | net_context,
|  | void * | ptr
| ) |  |

Definition at line 375 of file totemnet.c.

References transport::buffer_release, and totemnet_instance::transport.

## totemnet_crypto_reconfigure_phase()

int totemnet_crypto_reconfigure_phase | ( | void * | net_context,
|  | struct totem_config * | totem_config,
|  | cfg_message_crypto_reconfig_phase_t | phase
| ) |  |

Definition at line 603 of file totemnet.c.

References transport::crypto_reconfigure_phase, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_crypto_reconfigure_phase().

## totemnet_crypto_set()

int totemnet_crypto_set | ( | void * | net_context,
|  | const char * | cipher_type,
|  | const char * | hash_type
| ) |  |

Definition at line 292 of file totemnet.c.

References transport::crypto_set, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_crypto_set().

## totemnet_finalize()

int totemnet_finalize | ( | void * | net_context | ) |

Definition at line 306 of file totemnet.c.

References transport::finalize, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_iface_check()

int totemnet_iface_check | ( | void * | net_context | ) |

Definition at line 452 of file totemnet.c.

References transport::iface_check, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_iface_set()

int totemnet_iface_set | ( | void * | net_context,
|  | const struct totem_ip_address * | interface_addr,
|  | unsigned short | ip_port,
|  | unsigned int | iface_no
| ) |  |

Definition at line 471 of file totemnet.c.

References transport::iface_set, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_iface_set().

## totemnet_ifaces_get()

int totemnet_ifaces_get | ( | void * | net_context,
|  | char *** | status,
|  | unsigned int * | iface_count
| ) |  |

Definition at line 497 of file totemnet.c.

References transport::ifaces_get, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_ifaces_get().

## totemnet_initialize()

int totemnet_initialize | ( | qb_loop_t * | loop_pt,
|  | void ** | net_context,
|  | struct totem_config * | totem_config,
|  | totemsrp_stats_t * | stats,
|  | void * | context,
|  | void(*)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from) | deliver_fn,
|  | void(*)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no) | iface_change_fn,
|  | void(*)(void *context, int net_mtu) | mtu_changed,
|  | void(*)(void *context) | target_set_completed
| ) |  |

Definition at line 317 of file totemnet.c.

## totemnet_mcast_flush_send()

int totemnet_mcast_flush_send | ( | void * | net_context,
|  | const void * | msg,
|  | unsigned int | msg_len
| ) |  |

Definition at line 426 of file totemnet.c.

References transport::mcast_flush_send, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_mcast_noflush_send()

int totemnet_mcast_noflush_send | ( | void * | net_context,
|  | const void * | msg,
|  | unsigned int | msg_len
| ) |  |

Definition at line 439 of file totemnet.c.

References transport::mcast_noflush_send, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_member_add()

int totemnet_member_add | ( | void * | net_context,
|  | const struct totem_ip_address * | local,
|  | const struct totem_ip_address * | member,
|  | int | ring_no
| ) |  |

Definition at line 533 of file totemnet.c.

References transport::member_add, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_member_add().

## totemnet_member_remove()

int totemnet_member_remove | ( | void * | net_context,
|  | const struct totem_ip_address * | member,
|  | int | ring_no
| ) |  |

Definition at line 553 of file totemnet.c.

References transport::member_remove, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_member_remove().

## totemnet_member_set_active()

int totemnet_member_set_active | ( | void * | net_context,
|  | const struct totem_ip_address * | member,
|  | int | active
| ) |  |

Definition at line 571 of file totemnet.c.

References transport::member_set_active, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_net_mtu_adjust()

int totemnet_net_mtu_adjust | ( | void * | net_context,
|  | struct totem_config * | totem_config
| ) |  |

Definition at line 462 of file totemnet.c.

References transport::net_mtu_adjust, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_nodestatus_get()

int totemnet_nodestatus_get | ( | void * | net_context,
|  | unsigned int | nodeid,
|  | struct totem_node_status * | node_status
| ) |  |

Definition at line 484 of file totemnet.c.

References nodeid, transport::nodestatus_get, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_nodestatus_get().

## totemnet_processor_count_set()

int totemnet_processor_count_set | ( | void * | net_context,
|  | int | processor_count
| ) |  |

Definition at line 383 of file totemnet.c.

References transport::processor_count_set, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_reconfigure()

int totemnet_reconfigure | ( | void * | net_context,
|  | struct totem_config * | totem_config
| ) |  |

Definition at line 589 of file totemnet.c.

References transport::reconfigure, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_reconfigure().

## totemnet_recv_flush()

int totemnet_recv_flush | ( | void * | net_context | ) |

Definition at line 394 of file totemnet.c.

References transport::recv_flush, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_recv_mcast_empty()

int totemnet_recv_mcast_empty | ( | void * | net_context | ) |

Definition at line 522 of file totemnet.c.

References transport::recv_mcast_empty, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_send_flush()

int totemnet_send_flush | ( | void * | net_context | ) |

Definition at line 404 of file totemnet.c.

References transport::send_flush, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_stats_clear()

void totemnet_stats_clear | ( | void * | net_context | ) |

Definition at line 619 of file totemnet.c.

References transport::stats_clear, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemsrp_stats_clear().

## totemnet_token_send()

int totemnet_token_send | ( | void * | net_context,
|  | const void * | msg,
|  | unsigned int | msg_len
| ) |  |

Definition at line 414 of file totemnet.c.

References transport::token_send, totemnet_instance::transport, and totemnet_instance::transport_context.

## totemnet_token_target_set()

int totemnet_token_target_set | ( | void * | net_context,
|  | unsigned int | nodeid
| ) |  |

Definition at line 510 of file totemnet.c.

References nodeid, transport::token_target_set, totemnet_instance::transport, and totemnet_instance::transport_context.

## Variable Documentation

## transport_entries

struct transport transport_entries[]

Definition at line 1 of file totemnet.c.