-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial structure for "bridge" and "802.1q" implementation
* the naming is quite poor: I chose "linux" to indicate that we are using the modules that are already in linux; Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>
- Loading branch information
1 parent
011b28e
commit 48f072e
Showing
8 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TOP_DIR := $(shell pwd)/../../ | ||
CFLAGS = -fPIC -g | ||
|
||
|
||
|
||
include $(TOP_DIR)/scripts/Makefile.includes | ||
INC = $(LINUX_INC) \ | ||
$(TOP_DIR)/switch \ | ||
$(TOP_DIR)/include | ||
|
||
# LiSA Middleware | ||
SRCS = util_linux.c linux.c | ||
|
||
include $(TOP_DIR)/scripts/Makefile.variables | ||
include $(TOP_DIR)/scripts/Makefile.rules | ||
|
||
.DEFAULT_GOAL = all | ||
|
||
all: $(OBJS) | ||
|
||
dep: $(DEPS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <linux/net_switch.h> | ||
#include <errno.h> | ||
|
||
#include "switch.h" | ||
#include "util_linux.h" | ||
#include "linux.h" | ||
|
||
/** | ||
* TODO Create a bridge | ||
*/ | ||
static int linux_init(struct switch_operations *sw_ops) | ||
{ | ||
return 0; | ||
} | ||
|
||
struct linux_context lnx_ctx = { | ||
.sw_ops = (struct switch_operations) { | ||
.backend_init = linux_init | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef _LINUX_H | ||
#define _LINUX_H | ||
|
||
#include <unistd.h> | ||
#include <linux/sockios.h> | ||
|
||
#include "sw_api.h" | ||
|
||
struct linux_context { | ||
struct switch_operations sw_ops; | ||
}; | ||
|
||
extern struct linux_context lnx_ctx; | ||
|
||
#endif |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
#define _LISA_H | ||
|
||
#include <unistd.h> | ||
|
||
#include <linux/sockios.h> | ||
|
||
#include "sw_api.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters