#include <netinet/ether.h>
-#ifdef BUILD_LIB
-#define EXPORT __attribute__((visibility("default")))
-#else
-#define EXPORT
-#endif
-
-
/**
* Maximum size of product string.
* @param iface The network interface to use.
* @return A pointer to a ngadmin structure, or NULL if an error occurred.
*/
-struct ngadmin* ngadmin_init (const char *iface) EXPORT;
+struct ngadmin* ngadmin_init (const char *iface);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
*/
-int ngadmin_close (struct ngadmin *nga) EXPORT;
+int ngadmin_close (struct ngadmin *nga);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
*/
-int ngadmin_forceInterface (struct ngadmin *nga) EXPORT;
+int ngadmin_forceInterface (struct ngadmin *nga);
/**
* @param value Enable or disable the systematic use of broadcast packets.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setKeepBroadcasting (struct ngadmin *nga, bool value) EXPORT;
+int ngadmin_setKeepBroadcasting (struct ngadmin *nga, bool value);
/**
* @param value Enable or disable the use of the global broadcast address.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_useGlobalBroadcast (struct ngadmin *nga, bool value) EXPORT;
+int ngadmin_useGlobalBroadcast (struct ngadmin *nga, bool value);
/**
* @param pass The password string to use.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setPassword (struct ngadmin *nga, const char *pass) EXPORT;
+int ngadmin_setPassword (struct ngadmin *nga, const char *pass);
/**
* @param tv A pointer to a timeval structure.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setTimeout (struct ngadmin *nga, const struct timeval *tv) EXPORT;
+int ngadmin_setTimeout (struct ngadmin *nga, const struct timeval *tv);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_scan (struct ngadmin *nga) EXPORT;
+int ngadmin_scan (struct ngadmin *nga);
/**
* @param nb A pointer to an integer which will receive the number of switches.
* @return A pointer to an array of switch characteristics.
*/
-const struct swi_attr* ngadmin_getSwitchTab (struct ngadmin *nga, int *nb) EXPORT;
+const struct swi_attr* ngadmin_getSwitchTab (struct ngadmin *nga, int *nb);
/**
* @param nga A pointer to the ngadmin structure.
* @return A pointer the switch characteristics or NULL if you are not logged.
**/
-const struct swi_attr* ngadmin_getCurrentSwitch (struct ngadmin *nga) EXPORT;
+const struct swi_attr* ngadmin_getCurrentSwitch (struct ngadmin *nga);
* @param filename A path to the file of the new firmware to send.
* @return ERR_NOTIMPL
**/
-int ngadmin_upgradeFirmware (struct ngadmin *nga, const char *filename) EXPORT;
+int ngadmin_upgradeFirmware (struct ngadmin *nga, const char *filename);
/**
* @param id The id (position in the switch array) of the switch you want to login to.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_login (struct ngadmin *nga, int id) EXPORT;
+int ngadmin_login (struct ngadmin *nga, int id);
/**
* Must not be NULL. The array size must be ports_count*sizeof(unsigned char).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getPortsStatus (struct ngadmin *nga, unsigned char *ports) EXPORT;
+int ngadmin_getPortsStatus (struct ngadmin *nga, unsigned char *ports);
/**
* @param name The name string to use. A NULL value clears the name.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setName (struct ngadmin *nga, const char *name) EXPORT;
+int ngadmin_setName (struct ngadmin *nga, const char *name);
/**
* The array size must be ports_count*sizeof(struct port_stats).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getPortsStatistics (struct ngadmin *nga, struct port_stats *ps) EXPORT;
+int ngadmin_getPortsStatistics (struct ngadmin *nga, struct port_stats *ps);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_resetPortsStatistics (struct ngadmin *nga) EXPORT;
+int ngadmin_resetPortsStatistics (struct ngadmin *nga);
/**
* @param pass The new password string to use.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_changePassword (struct ngadmin *nga, const char* pass) EXPORT;
+int ngadmin_changePassword (struct ngadmin *nga, const char* pass);
/**
* @param s A pointer to an integer which will receive 0 or 1.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getStormFilterState (struct ngadmin *nga, int *s) EXPORT;
+int ngadmin_getStormFilterState (struct ngadmin *nga, int *s);
/**
* @param s An integer with value 0 or 1.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setStormFilterState (struct ngadmin *nga, int s) EXPORT;
+int ngadmin_setStormFilterState (struct ngadmin *nga, int s);
/**
* The array size must be ports_count*sizeof(int).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getStormFilterValues (struct ngadmin *nga, int *ports) EXPORT;
+int ngadmin_getStormFilterValues (struct ngadmin *nga, int *ports);
/**
* The array size must be ports_count*sizeof(int).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setStormFilterValues (struct ngadmin *nga, const int *ports) EXPORT;
+int ngadmin_setStormFilterValues (struct ngadmin *nga, const int *ports);
/**
* The array size must be ports_count*sizeof(int).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getBitrateLimits (struct ngadmin *nga, int *ports) EXPORT;
+int ngadmin_getBitrateLimits (struct ngadmin *nga, int *ports);
/**
* The array size must be ports_count*sizeof(int).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setBitrateLimits (struct ngadmin *nga, const int *ports) EXPORT;
+int ngadmin_setBitrateLimits (struct ngadmin *nga, const int *ports);
/**
* @param s A pointer to an integer. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getQOSMode (struct ngadmin *nga, int *s) EXPORT;
+int ngadmin_getQOSMode (struct ngadmin *nga, int *s);
/**
* @param s An integer with the new mode.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setQOSMode (struct ngadmin *nga, int s) EXPORT;
+int ngadmin_setQOSMode (struct ngadmin *nga, int s);
/**
The array size must be ports_count*sizeof(ports).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getQOSValues (struct ngadmin *nga, char *ports) EXPORT;
+int ngadmin_getQOSValues (struct ngadmin *nga, char *ports);
/**
The array size must be ports_count*sizeof(ports).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setQOSValues (struct ngadmin *nga, const char *ports) EXPORT;
+int ngadmin_setQOSValues (struct ngadmin *nga, const char *ports);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_restart (struct ngadmin *nga) EXPORT;
+int ngadmin_restart (struct ngadmin *nga);
/**
* @param nga A pointer to the ngadmin structure.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_defaults (struct ngadmin *nga) EXPORT;
+int ngadmin_defaults (struct ngadmin *nga);
/**
The array size must be (1+ports_count)*sizeof(char).
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getMirror (struct ngadmin *nga, char *ports) EXPORT;
+int ngadmin_getMirror (struct ngadmin *nga, char *ports);
/**
If it is NULL, port mirroring is disabled.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setMirror (struct ngadmin *nga, const char *ports) EXPORT;
+int ngadmin_setMirror (struct ngadmin *nga, const char *ports);
/**
* @param ic A pointer to an igmp_conf structure. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getIGMPConf (struct ngadmin *nga, struct igmp_conf *ic) EXPORT;
+int ngadmin_getIGMPConf (struct ngadmin *nga, struct igmp_conf *ic);
/**
* @param ic A pointer to an igmp_conf structure. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setIGMPConf (struct ngadmin *nga, const struct igmp_conf *ic) EXPORT;
+int ngadmin_setIGMPConf (struct ngadmin *nga, const struct igmp_conf *ic);
/**
* @param nb The number of elements in the array.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_cabletest (struct ngadmin *nga, struct cabletest *ct, int nb) EXPORT;
+int ngadmin_cabletest (struct ngadmin *nga, struct cabletest *ct, int nb);
/**
Only non-zero fields of the structure are taken into account.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setNetConf (struct ngadmin *nga, const struct net_conf *nc) EXPORT;
+int ngadmin_setNetConf (struct ngadmin *nga, const struct net_conf *nc);
/**
* @param t A pointer to an integer which will receive the VLAN type. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getVLANType (struct ngadmin *nga, int *t) EXPORT;
+int ngadmin_getVLANType (struct ngadmin *nga, int *t);
/**
* @param t An integer which contains the new VLAN type.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setVLANType (struct ngadmin *nga, int t) EXPORT;
+int ngadmin_setVLANType (struct ngadmin *nga, int t);
/**
number of associated VLAN. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getVLANPortConf (struct ngadmin *nga, unsigned char *ports) EXPORT;
+int ngadmin_getVLANPortConf (struct ngadmin *nga, unsigned char *ports);
/**
number of associated VLAN. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setVLANPortConf (struct ngadmin *nga, const unsigned char *ports) EXPORT;
+int ngadmin_setVLANPortConf (struct ngadmin *nga, const unsigned char *ports);
/**
It will receive the actual number of VLAN written in the arrays.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getVLANDotAllConf (struct ngadmin *nga, unsigned short *vlans, unsigned char *ports, int *nb) EXPORT;
+int ngadmin_getVLANDotAllConf (struct ngadmin *nga, unsigned short *vlans, unsigned char *ports, int *nb);
/**
configuration. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getVLANDotConf (struct ngadmin *nga, unsigned short vlan, unsigned char *ports) EXPORT;
+int ngadmin_getVLANDotConf (struct ngadmin *nga, unsigned short vlan, unsigned char *ports);
/**
configuration. Must not be NULL.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setVLANDotConf (struct ngadmin *nga, unsigned short vlan, const unsigned char *ports) EXPORT;
+int ngadmin_setVLANDotConf (struct ngadmin *nga, unsigned short vlan, const unsigned char *ports);
/**
* @param vlan The VLAN you want to destroy.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_VLANDestroy (struct ngadmin *nga, unsigned short vlan) EXPORT;
+int ngadmin_VLANDestroy (struct ngadmin *nga, unsigned short vlan);
/**
* The array size must be sizeof(unsigned short)*ports_count.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_getAllPVID (struct ngadmin *nga, unsigned short *ports) EXPORT;
+int ngadmin_getAllPVID (struct ngadmin *nga, unsigned short *ports);
/**
* @param vlan The new PVID value.
* @return ERR_OK when everything is well or an error code otherwise.
**/
-int ngadmin_setPVID (struct ngadmin *nga, unsigned char port, unsigned short vlan) EXPORT;
+int ngadmin_setPVID (struct ngadmin *nga, unsigned char port, unsigned short vlan);
#ifdef __cplusplus