Example #1
0
static int32_t howto_plugin_init( void ) {
	
	dbgf( DBGL_CHANGES, DBGT_INFO, "init plugin %s", HOWTO_PLUGIN );
	
	register_options_array( howto_plugin_options, sizeof( howto_plugin_options ) );
	
	return SUCCESS;
	
}
Example #2
0
File: topology.c Project: axn/bmx6
static int32_t topology_init( void ) {

        static const struct field_format topology_format[] = DESCRIPTION_MSG_TOPOLOGY_FORMAT;
        struct frame_handl tlv_handl;

        memset( &tlv_handl, 0, sizeof(tlv_handl));
        tlv_handl.min_msg_size = sizeof (struct description_msg_topology);
        tlv_handl.fixed_msg_size = 1;
        tlv_handl.is_relevant = 0;
        tlv_handl.name = "TOPOLOGY_EXTENSION";
        tlv_handl.tx_frame_handler = create_description_topology;
        tlv_handl.rx_frame_handler = process_description_topology;
        tlv_handl.msg_format = topology_format;
        register_frame_handler(description_tlv_handl, BMX_DSC_TLV_TOPOLOGY, &tlv_handl);
	register_status_handl(sizeof (struct topology_status), 1, topology_status_format, ARG_TOPOLOGY, topology_status_creator);
        register_options_array(topology_options, sizeof ( topology_options), CODE_CATEGORY_NAME);

	return SUCCESS;
}
Example #3
0
File: sms.c Project: agustim/bmx6
static int32_t sms_init( void ) {

        register_options_array(sms_options, sizeof ( sms_options), CODE_CATEGORY_NAME);

        static const struct field_format json_extension_format[] = DESCRIPTION_MSG_SMS_FORMAT;
        struct frame_handl tlv_handl;

        memset( &tlv_handl, 0, sizeof(tlv_handl));
        tlv_handl.min_msg_size = sizeof (struct description_msg_sms);
        tlv_handl.fixed_msg_size = 0;
        tlv_handl.is_relevant = 0;
        tlv_handl.name = "SMS_EXTENSION";
        tlv_handl.tx_frame_handler = create_description_sms;
        tlv_handl.rx_frame_handler = process_description_sms;
        tlv_handl.msg_format = json_extension_format;
        register_frame_handler(description_tlv_handl, BMX_DSC_TLV_JSON_SMS, &tlv_handl);

	return SUCCESS;
}