bbfdm: move Device.DHCPv4. and DHCPv6. support to dhcpmngr

This commit is contained in:
Mohd Mehdi 2024-05-08 13:01:27 +00:00 committed by Amin Ben Romdhane
parent 3c4f60c83c
commit 919112d6ce
8 changed files with 13 additions and 5267 deletions

View file

@ -100,11 +100,14 @@ All supported tools are presented in this file[BBFDM Tools](./tools/README.md)
| Device.Services.VoiceService. | tr104 | https://dev.iopsys.eu/voice/tr104.git |
| Device.NAT.PortTrigger. | port-trigger | https://dev.iopsys.eu/network/port-trigger.git |
| Device.DNS. | dnsmngr | https://dev.iopsys.eu/network/dnsmngr.git |
| Device.DHCPv4. | dhcpmngr | https://dev.iopsys.eu/network/dhcpmngr.git |
| Device.DHCPv6. | dhcpmngr | https://dev.iopsys.eu/network/dhcpmngr.git |
| Device.DSL. | dslmngr | https://dev.iopsys.eu/hal/dslmngr.git |
| Device.FAST. | dslmngr | https://dev.iopsys.eu/hal/dslmngr.git |
| Device.ATM. | dslmngr | https://dev.iopsys.eu/hal/dslmngr.git |
| Device.PTM. | dslmngr | https://dev.iopsys.eu/hal/dslmngr.git |
| Device.Ethernet. | ethmngr | https://dev.iopsys.eu/hal/ethmngr.git |
| Device.QoS. | qosmngr | https://dev.iopsys.eu/hal/qosmngr.git |
| Device.SSH. | sshmngr | https://dev.iopsys.eu/network/sshmngr.git |
| Device.X_IOPSYS_EU_IGMP. | mcastmngr | https://dev.iopsys.eu/hal/mcastmngr.git |
| Device.X_IOPSYS_EU_MLD. | mcastmngr | https://dev.iopsys.eu/hal/mcastmngr.git |

View file

@ -17,12 +17,10 @@
#include "ip.h"
#include "bridging.h"
#include "wifi.h"
#include "dhcpv4.h"
#include "nat.h"
#include "ppp.h"
#include "routing.h"
#include "firewall.h"
#include "dhcpv6.h"
#include "interfacestack.h"
#include "usb.h"
#include "gre.h"
@ -87,8 +85,6 @@ DMOBJ tDeviceObj[] = {
{"WiFi", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tWiFiObj, tWiFiParams, NULL, BBFDM_BOTH, NULL},
{"Bridging", &DMREAD, NULL, NULL, "file:/etc/config/network", NULL, NULL, NULL, tBridgingObj, tBridgingParams, NULL, BBFDM_BOTH, NULL},
{"IP", &DMREAD, NULL, NULL, "file:/etc/config/network", NULL, NULL, NULL, tIPObj, tIPParams, NULL, BBFDM_BOTH, NULL},
{"DHCPv4", &DMREAD, NULL, NULL, "file:/lib/netifd/proto/dhcp.sh,/etc/config/dhcp", NULL, NULL, NULL, tDHCPv4Obj, tDHCPv4Params, NULL, BBFDM_BOTH, NULL},
{"DHCPv6", &DMREAD, NULL, NULL, "file:/lib/netifd/proto/dhcpv6.sh,/etc/config/dhcp", NULL, NULL, NULL, tDHCPv6Obj, tDHCPv6Params, NULL, BBFDM_BOTH, NULL},
{"NAT", &DMREAD, NULL, NULL, "file:/etc/config/firewall", NULL, NULL, NULL, tNATObj, tNATParams, NULL, BBFDM_BOTH, NULL},
{"PPP", &DMREAD, NULL, NULL, "file:/lib/netifd/proto/ppp.sh,/etc/config/network", NULL, NULL, NULL, tPPPObj, tPPPParams, NULL, BBFDM_BOTH, NULL},
{"Routing", &DMREAD, NULL, NULL, "file:/etc/config/network", NULL, NULL, NULL, tRoutingObj, tRoutingParams, NULL, BBFDM_BOTH, NULL},

File diff suppressed because it is too large Load diff

View file

@ -1,51 +0,0 @@
/*
* Copyright (C) 2019 iopsys Software Solutions AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* Author: Anis Ellouze <anis.ellouze@pivasoftware.com>
*
*/
#ifndef __DHCP_H
#define __DHCP_H
#include "libbbfdm-api/dmcommon.h"
extern DMOBJ tDHCPv4Obj[];
extern DMOBJ tDHCPv4ServerObj[];
extern DMOBJ tDHCPv4ServerPoolObj[];
extern DMOBJ tDHCPv4ServerPoolClientObj[];
extern DMLEAF tDHCPv4ServerPoolParams[];
extern DMLEAF tDHCPv4ServerPoolStaticAddressParams[];
extern DMLEAF tDHCPv4ServerPoolClientParams[];
extern DMLEAF tDHCPv4ServerPoolClientIPv4AddressParams[];
extern DMLEAF tDHCPv4Params[];
extern DMOBJ tDHCPv4ClientObj[];
extern DMLEAF tDHCPv4ClientParams[];
extern DMLEAF tDHCPv4ClientSentOptionParams[];
extern DMLEAF tDHCPv4ClientReqOptionParams[];
extern DMOBJ tDHCPv4ServerObj[];
extern DMLEAF tDHCPv4ServerParams[];
extern DMLEAF tDHCPv4ServerPoolOptionParams[];
extern DMLEAF tDHCPv4ServerPoolClientIPv4AddressParams[];
extern DMLEAF tDHCPv4ServerPoolClientOptionParams[];
extern DMOBJ tDHCPv4RelayObj[];
extern DMLEAF tDHCPv4RelayParams[];
extern DMLEAF tDHCPv4RelayForwardingParams[];
struct option_args
{
char *tag;
char *value;
};
int set_section_order(char *package, char *dmpackage, char* sect_type, struct uci_section *dmmap_sect, struct uci_section *conf, int set_force, char* order);
int get_value_in_mac_format(struct uci_section *s, char *option_name, bool type, char **value);
bool tag_option_exists(char *dmmap_package, char *section, char *opt_check, char *value_check, char *tag_name, char *tag_value);
char *generate_tag_option(char *dmmap_package, char *section, char *opt_check, char *value_check, char *tag_name);
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
/*
* Copyright (C) 2019 iopsys Software Solutions AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
*/
#ifndef __DHCPV6_H
#define __DHCPV6_H
#include "libbbfdm-api/dmcommon.h"
extern DMOBJ tDHCPv6Obj[];
extern DMLEAF tDHCPv6Params[];
extern DMLEAF tDHCPv6ClientParams[];
extern DMOBJ tDHCPv6ServerObj[];
extern DMLEAF tDHCPv6ServerParams[];
extern DMOBJ tDHCPv6ServerPoolObj[];
extern DMLEAF tDHCPv6ServerPoolParams[];
extern DMOBJ tDHCPv6ServerPoolClientObj[];
extern DMLEAF tDHCPv6ServerPoolClientParams[];
extern DMLEAF tDHCPv6ServerPoolClientIPv6AddressParams[];
extern DMLEAF tDHCPv6ServerPoolClientIPv6PrefixParams[];
extern DMLEAF tDHCPv6ServerPoolClientOptionParams[];
extern DMLEAF tDHCPv6ServerPoolOptionParams[];
#endif //__DHCPV6_H

View file

@ -8,7 +8,6 @@
* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
*/
#include "dhcpv4.h"
#include "routeradvertisement.h"
/*************************************************************

View file

@ -130,6 +130,16 @@
"src/dynamicdnsmngr.c"
]
},
{
"repo": "https://dev.iopsys.eu/network/dhcpmngr.git",
"proto": "git",
"version": "devel",
"dm_files": [
"src/dhcpmngr.c",
"src/dhcpv4.c",
"src/dhcpv6.c"
]
},
{
"repo": "https://dev.iopsys.eu/network/dnsmngr.git",
"proto": "git",