Skip to content

shell: add ng_ipv6 support for ifconfig#2582

Merged
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
miri64:shell/feat/ifconfig-ipv6-output
Apr 26, 2015
Merged

shell: add ng_ipv6 support for ifconfig#2582
kaspar030 merged 1 commit intoRIOT-OS:masterfrom
miri64:shell/feat/ifconfig-ipv6-output

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Mar 11, 2015

Depends on #2736 (merged)

Waiting for #2602 (merged)

Ports the listing functionality, ifconfig add and ifconfig del for ng_ipv6_netif.

@miri64 miri64 added Area: network Area: Networking State: waiting for other PR State: The PR requires another PR to be merged first NSTF labels Mar 11, 2015
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch 2 times, most recently from 379e438 to 97e1550 Compare March 17, 2015 09:31
@miri64 miri64 added this to the Network Stack Task Force milestone Mar 17, 2015
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 97e1550 to 74e6842 Compare March 19, 2015 14:24
@miri64 miri64 removed the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 19, 2015
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 19, 2015

Rebased to current master

@OlegHahm
Copy link
Copy Markdown
Member

Which configuration/branch do I have to use to test this?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 19, 2015

Try miri64/RIOT@138d113 (current HEAD of branch tmp):

$ git log --simplify-by-decoration --decorate --graph --oneline 138d113
* 138d113 (origin/tmp, tmp) Adapt default application
*   ece2378 Merge branch 'ng_netreg/feat/allow_nettype_undef' into HEAD
|\  
| * 7f7e5f2 (origin/ng_netreg/feat/allow_nettype_undef, ng_netreg/feat/allow_nettype_undef) [SQUASH ME] netreg: fix look
* |   bf76871 Merge branch 'shell/feat/ifconfig-ipv6-output' into HEAD
|\ \  
| * | ac99c22 (origin/shell/feat/ifconfig-ipv6-output, shell/feat/ifconfig-ipv6-output) [SQUASH ME] ifconfig: fixes
* | | 1c4c35a (origin/ng_tapnet/feat/initial, ng_tapnet/feat/initial) [SQUASH ME] ng_tapnet: fix ethernet check
[…]

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 19, 2015

(with default application ;-))

@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from ac99c22 to 6c8f478 Compare March 24, 2015 18:41
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 24, 2015

rebased to master

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 24, 2015

@OlegHahm you can also now compile tests/ng_tapnet in #2558 with

USEMODULE=ng_ipv6_if make all term

if you merge this branch in.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 25, 2015

Merge stalled before #2602 is merged. (merged)

@miri64 miri64 added the State: waiting for other PR State: The PR requires another PR to be merged first label Mar 25, 2015
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 6c8f478 to aff58c5 Compare March 29, 2015 23:12
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 29, 2015

Adapted for return values and prefixes

@OlegHahm OlegHahm force-pushed the master branch 3 times, most recently from 9f184dd to 45554bf Compare March 31, 2015 13:01
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 6a6fc52 to 8dee4e7 Compare April 6, 2015 15:42
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 6, 2015

Rebased to current #2736.

@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch 2 times, most recently from f498593 to f94cabb Compare April 10, 2015 06:17
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 39ed42b to 9890132 Compare April 22, 2015 21:41
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 22, 2015

Rebased to current #2736 and squashed

@miri64 miri64 removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable State: waiting for other PR State: The PR requires another PR to be merged first labels Apr 22, 2015
@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 9890132 to e7f377d Compare April 23, 2015 14:26
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 23, 2015

Rebased to current master

@OlegHahm
Copy link
Copy Markdown
Member

/home/oleg/git/RIOT/sys/shell/commands/sc_netif.c: In function ‘_netif_list’
/home/oleg/git/RIOT/sys/shell/commands/sc_netif.c:272:45: error: ‘NG_IPV6_NETIF_FLAGS_NON_UNICAST’ undeclared (first use in this function)
                 if (entry->addrs[i].flags & NG_IPV6_NETIF_FLAGS_NON_UNICAST) {
                                             ^

Am I missing something?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 23, 2015

No, I did. Will fix.

@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from e7f377d to 8e45bed Compare April 24, 2015 16:57
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 24, 2015

Rebased to current master and adapted for changes there (including #2582 (comment))

@miri64 miri64 added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 24, 2015
@OlegHahm
Copy link
Copy Markdown
Member

How do I test on native? ng_tapnet is gone and I don't know how to use Kaspar's Ethernet foobar.

@kaspar030
Copy link
Copy Markdown
Contributor

@OlegHahm Did you take a look at my Ethernet foobar? It's rather simple. The test/driver_netdev_eth shows how to initialize everything up to the mac layer.

edit tapnet (#2558) was incomplete and has been closed in favour of #2766.

@OlegHahm
Copy link
Copy Markdown
Member

I did briefly look at it (I'm in a local train with shitty Internet connection right now) and copied stuff from the test Makefile, but I got:

/home/oleg/git/RIOT/examples/default/bin/native/ng_nativenet.a(dev_eth_tap.o): In function `_isr'
dev_eth_tap.c:(.text+0xe9): undefined reference to `dev_eth_rx_handler'
/home/oleg/git/RIOT/examples/default/bin/native/ng_nativenet.a(dev_eth_tap.o): In function `_tap_isr'
dev_eth_tap.c:(.text+0x4e3): undefined reference to `dev_eth_isr'
collect2: error: ld returned 1 exit status
/home/oleg/git/RIOT/examples/default/../../Makefile.include:162: recipe for target 'all' failed
make: *** [all] Error 1

@kaspar030
Copy link
Copy Markdown
Contributor

@OlegHahm Try to add "ng_netdev_eth" and "ng_nativenet" to USEMODULES.

@OlegHahm
Copy link
Copy Markdown
Member

Thanks. Worked. ng_netdev_eth was mising.

@OlegHahm
Copy link
Copy Markdown
Member

Ok, after merging this PR and #2766 and #2776 in order to test on native, I'm able to build. (make term is broken but I guess that's related to the two WIP PRs.)

However, in the shell I get:

> help
help
Command              Description
---------------------------------------
reboot               Reboot the node
ps                   Prints information about running threads.
cur                  Prints current and average power consumption.
rstcur               Resets coulomb counter.
mersenne_init        initializes the PRNG
mersenne_get         returns 32 bit of pseudo randomness
rtc                  control RTC peripheral interface
ifconfig             Configure network interfaces
txtsnd               send raw data
> ifconfig
ifconfig
>

My Makefile diff looks like

diff --git a/examples/default/Makefile b/examples/default/Makefile
index dfaee97..db9aac9 100644
--- a/examples/default/Makefile
+++ b/examples/default/Makefile
@@ -34,10 +34,15 @@ USEMODULE += shell
 USEMODULE += shell_commands
 USEMODULE += ps
 USEMODULE += vtimer
-USEMODULE += defaulttransceiver
 USEMODULE += config

-FEATURES_OPTIONAL += transceiver
+USEMODULE += ng_netbase
+USEMODULE += ng_nomac
+USEMODULE += ng_nativenet
+USEMODULE += dev_eth_autoinit
+USEMODULE += ng_ipv6_netif
+USEMODULE += ng_netdev_eth
+
 FEATURES_OPTIONAL += config
 FEATURES_OPTIONAL += periph_rtc

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 25, 2015

@OlegHahm what were your changes to main.c? If you did not change anything, there is of course no interface, because it wasn't initialized.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 25, 2015

Use tests/driver_netdev_eth with the following change:

diff --git a/tests/driver_netdev_eth/Makefile b/tests/driver_netdev_eth/Makefile
index 1ed3733..f7d9e25 100644
--- a/tests/driver_netdev_eth/Makefile
+++ b/tests/driver_netdev_eth/Makefile
@@ -6,6 +6,7 @@ BOARD_WHITELIST := native
 USEMODULE += ng_nativenet
 USEMODULE += ng_netbase
 USEMODULE += ng_nomac
+USEMODULE += ng_ipv6
 USEMODULE += ng_pktdump
 USEMODULE += ng_netdev_eth
 USEMODULE += shell

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 25, 2015

$ ./tests/driver_netdev_eth/bin/native/driver_netdev_eth.elf tap0
RIOT native interrupts/signals initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

kernel_init(): This is RIOT! (Version: 2014.12-1137-gf0d679-beutlin-tmp)
kernel_init(): jumping into first task...
netdev ethernet device driver test
> ifconfig 5
ifconfig 5
Iface  5   HWaddr: f2:30:3c:e2:5f:6a 
           inet6 addr: ff02::1/128  scope: local [multicast]

> ifconfig 5 add fe80::2
ifconfig 5 add fe80::2
success: added fe80::2/128 to interface 5
> ifconfig
ifconfig
Iface  5   HWaddr: f2:30:3c:e2:5f:6a 
           inet6 addr: ff02::1/128  scope: local [multicast]
           inet6 addr: fe80::2/128  scope: local

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 25, 2015

$ git log --graph --simplify-by-decoration --decorate --oneline
*   f0d6798 (HEAD, origin/tmp, tmp) Merge remote-tracking branch 'kaspar/add_dev_eth_netdev2' into tmp
|\  
| * 03cd524 (kaspar/add_dev_eth_netdev2) net: netdev_eth: output warning on lost interrupt
| * a7c53f5 (kaspar/add_dev_eth) dev_eth_tap: increase mac address last byte by one
* | fded17f (origin/shell/feat/ifconfig-ipv6-output, shell/feat/ifconfig-ipv6-output) [SQUASH ME] shell: sc_netif: fix for chan
[…]

@kaspar030
Copy link
Copy Markdown
Contributor

ACK when squashed.

@miri64 miri64 force-pushed the shell/feat/ifconfig-ipv6-output branch from 40b7b48 to cb07cd0 Compare April 26, 2015 12:01
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 26, 2015

Squashed.

@miri64 miri64 removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 26, 2015
@kaspar030
Copy link
Copy Markdown
Contributor

and GO.

kaspar030 added a commit that referenced this pull request Apr 26, 2015
…utput

shell: add ng_ipv6 support for ifconfig
@kaspar030 kaspar030 merged commit 8921a37 into RIOT-OS:master Apr 26, 2015
@miri64 miri64 deleted the shell/feat/ifconfig-ipv6-output branch April 26, 2015 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants