Skip to content

Commit

Permalink
Merge pull request #2706 from authmillenon/nettype/feat/introduce_netif
Browse files Browse the repository at this point in the history
nettype: introduce type for ng_netif_hdr_t
  • Loading branch information
miri64 committed Mar 27, 2015
2 parents 7f8d680 + 70c1e4d commit 2219d21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions sys/include/net/ng_nettype.h
Expand Up @@ -37,6 +37,11 @@ extern "C" {
* @note Expand at will.
*/
typedef enum {
/**
* @brief Protocol is as defined in @ref ng_netif_hdr_t. Not usable with
* @ref net_ng_netreg
*/
NG_NETTYPE_NETIF = -1,
NG_NETTYPE_UNDEF = 0, /**< Protocol is undefined */

#ifdef MODULE_NG_SIXLOWPAN
Expand Down
2 changes: 1 addition & 1 deletion sys/shell/commands/sc_netif.c
Expand Up @@ -324,7 +324,7 @@ void _netif_send(int argc, char **argv)
/* put packet together */
pkt = ng_pktbuf_add(NULL, argv[3], strlen(argv[3]), NG_NETTYPE_UNDEF);
pkt = ng_pktbuf_add(pkt, NULL, sizeof(ng_netif_hdr_t) + addr_len,
NG_NETTYPE_UNDEF);
NG_NETTYPE_NETIF);
nethdr = (ng_netif_hdr_t *)pkt->data;
ng_netif_hdr_init(nethdr, 0, addr_len);
ng_netif_hdr_set_dst_addr(nethdr, addr, addr_len);
Expand Down

0 comments on commit 2219d21

Please sign in to comment.