icwmp/inc/external.h
Mohamed Kallel 27b73d5af7 PIVA::DELIVERY 8
script optimization
Voice parameters: AddObject/DeleteObject
Voice parameters: Vendor specific parameter

Concerning what we did in the optimization task:
1)  The main script  (freecwmp) is loaded only 1 time during the session. the load is done just before the start of the session. the function scripts are loaded within the load of the main script (freecwmp) only one time. The old behaviour consist to load the main script (freecwmp) and the function scripts for each parameter treatment. Core code (C) and Scripts are changed
2) Optimize the preparing of inform message. old script take ~30s and now it takes ~2s. Core code (C) and Scripts are changed
3) Execute only the function related to the parameter. For example if the requested parameter is "InternetGatewayDevice.ManagementServer.URL" then the main script freecwmp will execute only the related function of this parameter which is get_management_server(). The old behaviour consist to execute all get functions: get_wan_device(), get_lan_device(), get_device_info()...
4) Minimize the size of the script files: Replace some blocks o othe source code by a functions
2013-07-24 16:05:32 +01:00

51 lines
2.1 KiB
C

/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Copyright (C) 2013 Inteno Broadband Technology AB
* Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
* Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
* Copyright (C) 2011 Luka Perkov <freecwmp@lukaperkov.net>
*
*/
#ifndef _FREECWMP_EXTERNAL_H__
#define _FREECWMP_EXTERNAL_H__
#include <libubox/list.h>
#ifdef DUMMY_MODE
static char *fc_script = "./ext/openwrt/scripts/freecwmp.sh";
#else
static char *fc_script = "/usr/sbin/freecwmp";
#endif
extern pthread_mutex_t external_mutex_value_change;
extern struct list_head external_list_value_change;
extern struct list_head external_list_parameter;
void external_downloadFaultResp (char *fault_code);
void external_fetch_downloadFaultResp (char **fault_code);
void external_setParamValRespStatus (char *status);
void external_fetch_setParamValRespStatus (char **status);
void external_setParamAttrResp (char *status, char *fault);
void external_fetch_setParamAttrResp (char **status, char **fault);
void external_addObjectResp (char *instance, char *status, char *fault);
void external_fetch_addObjectResp (char **instance, char **status, char **fault);
void external_delObjectResp (char *status, char *fault);
void external_fetch_delObjectResp (char **status, char **fault);
int external_get_action(char *action, char *name, char *next_level);
int external_set_action(char *action, char *name, char *value, char *change);
int external_object_action(char *command, char *name);
int external_simple(char *command);
int external_download(char *url, char *size, char *type, char *user, char *pass);
int external_apply(char *action, char *type);
int external_handle_action(int (*external_handler)(char *msg));
void external_add_list_paramameter(char *param_name, char *param_data, char *param_type, char *fault_code);
void external_free_list_parameter();
void external_init();
void external_exit();
#endif