diff --git a/Makefile b/Makefile index b1de8eae7a41b9592f985b66a2bb19807dd65a4e..17e0a05861ec051028462029ca6e129b6f24b7df 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,4 @@ -#Makfile responsible to compile loop-detector sources -# -#@Company: PivaSoftware, Inteno -#@author: Omar KALLEL +#Author: Omar Kallel <omar.kallel@pivasoftware.com> CPPFLAGS=$(CPPOPTIONS) -DPATCH_MD -DPATCH_HOSTAP -D_GNU_SOURCE -D__BUSYBOX__ -D_LIBC diff --git a/README b/README index 26e7d680d3b2277310647a2a1c796510ee81e183..96cffbcb4c10292ef5cdec9495f1aa472caeb492 100644 --- a/README +++ b/README @@ -1,10 +1,9 @@ -loop_detection is an openwrt package. -It's responsible to detect layer 2 loops in a network and shutdown the equipment corresponding ehternet port. +------------------- +About loop-detector +------------------- -It's developed by Omar KALLEL from pivasoftware company. +- Developed for OpenWrt systems. +- Responsible to detect layer 2 loops in a switch and shutdown the corresponding ehternet port. +- Developed by Omar KALLEL from Piva Software for Inteno Broadband Technology AB. +- GPLv2 -**** Build **** - -You should select in the menuconfig->Utilities loop_detection. -loop_detection used some libraries like : libpthread, libpcap, libuci. Those libraries should be selected, compiled and then installed in -the router. \ No newline at end of file diff --git a/ethernetThreadPool.c b/ethernetThreadPool.c index ac75aec0ee169f0b0b5ad98e736b3a4a50f94631..3d4d227733f5c303ec08f8e18311dc6d9b9a566a 100644 --- a/ethernetThreadPool.c +++ b/ethernetThreadPool.c @@ -1,10 +1,25 @@ /* - * ethernetThreadPool.c source file contains functions that allows to: - * -create threads responsible to listen coming frames in each ethernet port and make decision down the port that corresponds to a loop. - * -create thread that send periodically loop discovery frame and make decision to up again an ethernet port + * ethernetThreadPool.c -- contains functions that allows to: + * - create threads responsible to listen coming frames in each ethernet port and make decision down the port that corresponds to a loop. + * - create thread that send periodically loop discovery frame and make decision to up again an ethernet port * - * @Company: PivaSoftware, Inteno - * @author: Omar Kallel + * Copyright (C) 2017 Inteno Broadband Technology AB. All rights reserved. + * + * Author: Omar Kallel <omar.kallel@pivasoftware.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include<stdlib.h> diff --git a/loop-detector.c b/loop-detector.c index 12084f4d852a4a9276bcef7f91529e4af43cdf65..d3bb7fc02994caffc8ad2f372ba278ea2fb7c7fb 100644 --- a/loop-detector.c +++ b/loop-detector.c @@ -1,10 +1,26 @@ /* - * This is the main file of loop_detection application. + * loop-detector -- the main file of loop_detection application. * - * @Company: PivaSoftware, Inteno - * @author: Omar Kallel + * Copyright (C) 2017 Inteno Broadband Technology AB. All rights reserved. + * + * Author: Omar Kallel <omar.kallel@pivasoftware.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA */ + #include <stdio.h> #include <uci.h> #include <stdlib.h> /* for atoi() and exit() */ diff --git a/mac_ethernet.c b/mac_ethernet.c index f51e7bdfaa102fef7a66e48d88c812a963614873..d07b698c518c591b50566ea9f0580de8b8b1682d 100644 --- a/mac_ethernet.c +++ b/mac_ethernet.c @@ -1,11 +1,26 @@ /* - * mac_ethernet.c source file contains functions that allows to: - * -interact with ehternet ports (up and down) - * -get the equipment mac address - * -create loop discovery frame that will be sent periodically + * mac_ethernet.c -- contains functions that allows to: + * - interact with ehternet ports (up and down) + * - get the equipment mac address + * - create loop discovery frame that will be sent periodically * - * @Company: PivaSoftware, Inteno - * @author: Omar Kallel + * Copyright (C) 2017 Inteno Broadband Technology AB. All rights reserved. + * + * Author: Omar Kallel <omar.kallel@pivasoftware.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include <stdio.h>