Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
c6fb2618
Commit
c6fb2618
authored
9 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
ng_{sixlowpan|ipv6}_netif: don't create ng_sixlowpan_netif_ts adhoc
parent
dc2113d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c
+13
-2
13 additions, 2 deletions
sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c
sys/net/network_layer/ng_sixlowpan/ng_sixlowpan.c
+3
-13
3 additions, 13 deletions
sys/net/network_layer/ng_sixlowpan/ng_sixlowpan.c
with
16 additions
and
15 deletions
sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c
+
13
−
2
View file @
c6fb2618
...
...
@@ -26,6 +26,7 @@
#include
"net/ng_netapi.h"
#include
"net/ng_netif.h"
#include
"net/ng_netif/hdr.h"
#include
"net/ng_sixlowpan/netif.h"
#include
"net/ng_ipv6/netif.h"
...
...
@@ -474,14 +475,24 @@ void ng_ipv6_netif_init_by_dev(void)
sizeof
(
if_type
))
!=
-
ENOTSUP
)
&&
(
if_type
==
NG_NETTYPE_SIXLOWPAN
))
{
uint16_t
src_len
=
8
;
DEBUG
(
"Set 6LoWPAN flag
\n
"
);
uint16_t
max_frag_size
=
UINT16_MAX
;
DEBUG
(
"ipv6 netif: Set 6LoWPAN flag
\n
"
);
ipv6_ifs
[
i
].
flags
|=
NG_IPV6_NETIF_FLAGS_SIXLOWPAN
;
/* use EUI-64 (8-byte address) for IID generation and for sending
* packets */
ng_netapi_set
(
ifs
[
i
],
NG_NETOPT_SRC_LEN
,
0
,
&
src_len
,
sizeof
(
src_len
));
/* don't care for result */
}
if
(
ng_netapi_get
(
ifs
[
i
],
NG_NETOPT_MAX_PACKET_SIZE
,
0
,
&
max_frag_size
,
sizeof
(
max_frag_size
))
<
0
)
{
/* if error we assume it works */
DEBUG
(
"ipv6 netif: Can not get max packet size from interface %"
PRIkernel_pid
"
\n
"
,
ifs
[
i
]);
}
ng_sixlowpan_netif_add
(
ifs
[
i
],
max_frag_size
);
}
#endif
if
((
ng_netapi_get
(
ifs
[
i
],
NG_NETOPT_IPV6_IID
,
0
,
&
iid
,
...
...
This diff is collapsed.
Click to expand it.
sys/net/network_layer/ng_sixlowpan/ng_sixlowpan.c
+
3
−
13
View file @
c6fb2618
...
...
@@ -196,19 +196,9 @@ static void _send(ng_pktsnip_t *pkt)
iface
=
ng_sixlowpan_netif_get
(
hdr
->
if_pid
);
if
(
iface
==
NULL
)
{
if
(
ng_netapi_get
(
hdr
->
if_pid
,
NG_NETOPT_MAX_PACKET_SIZE
,
0
,
&
max_frag_size
,
sizeof
(
max_frag_size
))
<
0
)
{
/* if error we assume it works */
DEBUG
(
"6lo: can not get max packet size from interface %"
PRIkernel_pid
"
\n
"
,
hdr
->
if_pid
);
max_frag_size
=
UINT16_MAX
;
}
ng_sixlowpan_netif_add
(
hdr
->
if_pid
,
max_frag_size
);
iface
=
ng_sixlowpan_netif_get
(
hdr
->
if_pid
);
}
else
{
max_frag_size
=
iface
->
max_frag_size
;
DEBUG
(
"6lo: Can not get 6LoWPAN specific interface information.
\n
"
);
ng_pktbuf_release
(
pkt
);
return
;
}
#ifdef MODULE_NG_SIXLOWPAN_IPHC
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment