-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
395 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,40 @@ | ||
/* | ||
* Copyright (c) 2008-2015 | ||
* NES Dev <nes.open.switch@gmail.com> | ||
* | ||
* All rights reserved. This source file is the sole property of NES, and | ||
* contain proprietary and confidential information related to NES. | ||
* | ||
* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
* not use this file except in compliance with the License. You may obtain a | ||
* copy of the License bundled along with this file. Any kind of reproduction | ||
* or duplication of any part of this file which conflicts with the License | ||
* without prior written consent from NES is strictly prohibited. | ||
* | ||
* Unless required by applicable law and agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
//set ts=4 sw=4 | ||
|
||
#ifndef __MPLS_EXT_H__ | ||
# define __MPLS_EXT_H__ | ||
|
||
# ifdef __cplusplus | ||
extern "C" { | ||
# endif | ||
|
||
|
||
|
||
extern void *mpls_main (void *pvArgv); | ||
extern void *mpls_start (void *pvArgv); | ||
|
||
|
||
|
||
# ifdef __cplusplus | ||
} | ||
# endif | ||
|
||
#endif // __MPLS_EXT_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
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,40 @@ | ||
/* | ||
* Copyright (c) 2008-2015 | ||
* NES Dev <nes.open.switch@gmail.com> | ||
* | ||
* All rights reserved. This source file is the sole property of NES, and | ||
* contain proprietary and confidential information related to NES. | ||
* | ||
* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
* not use this file except in compliance with the License. You may obtain a | ||
* copy of the License bundled along with this file. Any kind of reproduction | ||
* or duplication of any part of this file which conflicts with the License | ||
* without prior written consent from NES is strictly prohibited. | ||
* | ||
* Unless required by applicable law and agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
//set ts=4 sw=4 | ||
|
||
#ifndef __TED_EXT_H__ | ||
# define __TED_EXT_H__ | ||
|
||
# ifdef __cplusplus | ||
extern "C" { | ||
# endif | ||
|
||
|
||
|
||
extern void *ted_main (void *pvArgv); | ||
extern void *ted_start (void *pvArgv); | ||
|
||
|
||
|
||
# ifdef __cplusplus | ||
} | ||
# endif | ||
|
||
#endif // __TED_EXT_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#* | ||
#* Copyright (c) 2008-2015 | ||
#* NES Dev <nes.open.switch@gmail.com> | ||
#* | ||
#* All rights reserved. This source file is the sole property of NES, and | ||
#* contain proprietary and confidential information related to NES. | ||
#* | ||
#* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
#* not use this file except in compliance with the License. You may obtain a | ||
#* copy of the License bundled along with this file. Any kind of reproduction | ||
#* or duplication of any part of this file which conflicts with the License | ||
#* without prior written consent from NES is strictly prohibited. | ||
#* | ||
#* Unless required by applicable law and agreed to in writing, software | ||
#* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
#* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
#* License for the specific language governing permissions and limitations | ||
#* under the License. | ||
#* | ||
|
||
MODULE := mpls | ||
MODULE_BIN = ${MODULE}${OBJ_EXT} | ||
MODULE_TREE := | ||
|
||
|
||
ifneq (${PROJECT_NAME},) | ||
$(eval $(call MODULE_INC,${MODULE},${MODULE_TREE})) | ||
else | ||
|
||
include ${MK_COMMON} | ||
|
||
CFLAGS += | ||
|
||
SNMP_SRC := | ||
MODULE_SRC := mpls_main.c ${SNMP_SRC} | ||
|
||
$(call MODULE_DEP,${MODULE_SRC},${CFLAGS},${INCLUDES}) | ||
|
||
$(SNMP_SRC:%.c=%.o): CFLAGS += ${SNMP_CFLAGS} | ||
|
||
all: ${MODULE_BIN} | ||
|
||
${MODULE_BIN}: $(MODULE_SRC:%.c=%.o) | ||
|
||
include make.dep | ||
|
||
endif |
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,42 @@ | ||
/* | ||
* Copyright (c) 2008-2015 | ||
* NES Dev <nes.open.switch@gmail.com> | ||
* | ||
* All rights reserved. This source file is the sole property of NES, and | ||
* contain proprietary and confidential information related to NES. | ||
* | ||
* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
* not use this file except in compliance with the License. You may obtain a | ||
* copy of the License bundled along with this file. Any kind of reproduction | ||
* or duplication of any part of this file which conflicts with the License | ||
* without prior written consent from NES is strictly prohibited. | ||
* | ||
* Unless required by applicable law and agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
//set ts=4 sw=4 | ||
|
||
#ifndef __MPLS_DEFINES_H__ | ||
# define __MPLS_DEFINES_H__ | ||
|
||
# ifdef __cplusplus | ||
extern "C" { | ||
# endif | ||
|
||
|
||
|
||
#include "lib/log.h" | ||
|
||
#define MOD_NAME "MPLS" | ||
#define Mpls_log(_pri, _frmt, _args ...) xLog_print (MOD_NAME, _pri, _frmt, ## _args) | ||
|
||
|
||
|
||
# ifdef __cplusplus | ||
} | ||
# endif | ||
|
||
#endif // __MPLS_DEFINES_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (c) 2008-2015 | ||
* NES Dev <nes.open.switch@gmail.com> | ||
* | ||
* All rights reserved. This source file is the sole property of NES, and | ||
* contain proprietary and confidential information related to NES. | ||
* | ||
* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
* not use this file except in compliance with the License. You may obtain a | ||
* copy of the License bundled along with this file. Any kind of reproduction | ||
* or duplication of any part of this file which conflicts with the License | ||
* without prior written consent from NES is strictly prohibited. | ||
* | ||
* Unless required by applicable law and agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
//set ts=4 sw=4 | ||
|
||
#ifndef __MPLS_MAIN_C__ | ||
# define __MPLS_MAIN_C__ | ||
|
||
|
||
#include "mpls_ext.h" | ||
#include "mpls_defines.h" | ||
#include "switch_ext.h" | ||
|
||
#include "lib/thread.h" | ||
|
||
|
||
static xThreadInfo_t oMplsThread = | ||
{ | ||
.u32Index = XTHREAD_ID (ModuleId_mpls_c, 0), | ||
.u8SchedPolicy = SCHED_RR, | ||
.u8Priority = 1, | ||
.poStart = &mpls_start, | ||
}; | ||
|
||
|
||
void * | ||
mpls_main (void *pvArgv) | ||
{ | ||
if (xThread_create (&oMplsThread) == NULL) | ||
{ | ||
Mpls_log (xLog_err_c, "xThread_create() failed\n"); | ||
return NULL; | ||
} | ||
|
||
return NULL; | ||
} | ||
|
||
void * | ||
mpls_start (void *pvArgv) | ||
{ | ||
while (1) | ||
{ | ||
xThread_sleep (1); | ||
} | ||
return NULL; | ||
} | ||
|
||
|
||
#endif // __MPLS_MAIN_C__ |
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,47 @@ | ||
#* | ||
#* Copyright (c) 2008-2015 | ||
#* NES Dev <nes.open.switch@gmail.com> | ||
#* | ||
#* All rights reserved. This source file is the sole property of NES, and | ||
#* contain proprietary and confidential information related to NES. | ||
#* | ||
#* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
#* not use this file except in compliance with the License. You may obtain a | ||
#* copy of the License bundled along with this file. Any kind of reproduction | ||
#* or duplication of any part of this file which conflicts with the License | ||
#* without prior written consent from NES is strictly prohibited. | ||
#* | ||
#* Unless required by applicable law and agreed to in writing, software | ||
#* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
#* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
#* License for the specific language governing permissions and limitations | ||
#* under the License. | ||
#* | ||
|
||
MODULE := ted | ||
MODULE_BIN = ${MODULE}${OBJ_EXT} | ||
MODULE_TREE := | ||
|
||
|
||
ifneq (${PROJECT_NAME},) | ||
$(eval $(call MODULE_INC,${MODULE},${MODULE_TREE})) | ||
else | ||
|
||
include ${MK_COMMON} | ||
|
||
CFLAGS += | ||
|
||
SNMP_SRC := | ||
MODULE_SRC := ted_main.c ${SNMP_SRC} | ||
|
||
$(call MODULE_DEP,${MODULE_SRC},${CFLAGS},${INCLUDES}) | ||
|
||
$(SNMP_SRC:%.c=%.o): CFLAGS += ${SNMP_CFLAGS} | ||
|
||
all: ${MODULE_BIN} | ||
|
||
${MODULE_BIN}: $(MODULE_SRC:%.c=%.o) | ||
|
||
include make.dep | ||
|
||
endif |
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,42 @@ | ||
/* | ||
* Copyright (c) 2008-2015 | ||
* NES Dev <nes.open.switch@gmail.com> | ||
* | ||
* All rights reserved. This source file is the sole property of NES, and | ||
* contain proprietary and confidential information related to NES. | ||
* | ||
* Licensed under the NES RED License, Version 1.0 (the "License"); you may | ||
* not use this file except in compliance with the License. You may obtain a | ||
* copy of the License bundled along with this file. Any kind of reproduction | ||
* or duplication of any part of this file which conflicts with the License | ||
* without prior written consent from NES is strictly prohibited. | ||
* | ||
* Unless required by applicable law and agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
//set ts=4 sw=4 | ||
|
||
#ifndef __TED_DEFINES_H__ | ||
# define __TED_DEFINES_H__ | ||
|
||
# ifdef __cplusplus | ||
extern "C" { | ||
# endif | ||
|
||
|
||
|
||
#include "lib/log.h" | ||
|
||
#define MOD_NAME "TED" | ||
#define Ted_log(_pri, _frmt, _args ...) xLog_print (MOD_NAME, _pri, _frmt, ## _args) | ||
|
||
|
||
|
||
# ifdef __cplusplus | ||
} | ||
# endif | ||
|
||
#endif // __TED_DEFINES_H__ |
Oops, something went wrong.