Move error codes to public includes

This commit is contained in:
authmillenon 2013-08-08 13:22:24 +02:00 committed by authmillenon
parent b944a48da9
commit 661b03b88a
7 changed files with 20 additions and 21 deletions

View File

@ -25,6 +25,7 @@
#include <posix_io.h>
#include <board_uart0.h>
#include "sixlowpan/error.h"
#include "bordermultiplex.h"
#include "flowcontrol.h"
@ -32,7 +33,6 @@
#include "ip.h"
#include "icmp.h"
#include "serialnumber.h"
#include "error.h"
#include "sys/net/ieee802154/ieee802154_frame.h"
#include "sys/net/net_help/net_help.h"

View File

@ -20,12 +20,12 @@
#include <string.h>
#include <board_uart0.h>
#include "sixlowpan/error.h"
#include "flowcontrol.h"
#include "lowpan.h"
#include "icmp.h"
#include "border.h"
#include "error.h"
#include "bordermultiplex.h"

View File

@ -1,16 +0,0 @@
#ifndef _SIXLOWPAN_ERROR_H
#define _SIXLOWPAN_ERROR_H
#define SUCCESS 0
#define SIXLOWERROR_ARRAYFULL 132 // array is full
#define SIXLOWERROR_NULLPTR 133 // null pointer error
#define SIXLOWERROR_VALUE 134 // illegal value
#define SIXLOWERROR_ADDRESS 135 // illegal address
#define SIXLOWERROR_DISPATCH 136 // lowpan dispatch unknown
#define SIXLOWERROR_FSTFRAG 137 // first lowpan fragment not received
#define SIXLOWERROR_INVFRAG 138 // invalid fragment received
#define SIXLOWERROR_SCI 139 // source context not found
#define SIXLOWERROR_DCI 140 // destination context not found
#define SIXLOWERROR_CSUM 141 // wrong checksum
#endif /* _SIXLOWPAN_ERROR_H*/

View File

@ -20,11 +20,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sixlowpan/error.h"
#include "ip.h"
#include "icmp.h"
#include "mac.h"
#include "lowpan.h"
#include "error.h"
#include "serialnumber.h"
#include "sys/net/net_help/net_help.h"
#include "vtimer.h"

View File

@ -23,7 +23,6 @@
#include "sixlowpan/icmp.h"
#include "sixlowpan/ndp.h"
#include "../error.h" /* TODO: remove if not needed anymore */
#include "../ip.h" /* TODO: remove if not needed anymore */
#include "../icmp.h" /* TODO: remove if not needed anymore */

View File

@ -24,7 +24,6 @@
#include "sixlowpan/lowpan.h"
#include "sixlowpan/mac.h"
#include "../error.h" /* TODO: remove if not needed anymore */
#include "../border.h" /* TODO: remove if not needed anymore */
#include "../lowpan.h" /* TODO: remove if not needed anymore */
#include "../mac.h" /* TODO: remove if not needed anymore */

View File

@ -18,4 +18,19 @@
#ifndef SIXLOWPAN_ERROR_H
#define SIXLOWPAN_ERROR_H
#ifndef SUCCESS
#define SUCCESS (0)
#endif
#define SIXLOWERROR_ARRAYFULL (132) // array is full
#define SIXLOWERROR_NULLPTR (133) // null pointer error
#define SIXLOWERROR_VALUE (134) // illegal value
#define SIXLOWERROR_ADDRESS (135) // illegal address
#define SIXLOWERROR_DISPATCH (136) // lowpan dispatch unknown
#define SIXLOWERROR_FSTFRAG (137) // first lowpan fragment not received
#define SIXLOWERROR_INVFRAG (138) // invalid fragment received
#define SIXLOWERROR_SCI (139) // source context not found
#define SIXLOWERROR_DCI (140) // destination context not found
#define SIXLOWERROR_CSUM (141) // wrong checksum
#endif /* SIXLOWPAN_ERROR_H */