Re: [riot-devel] IPV6 address

2015-11-04 Thread Oleg Hahm
Hi Baptiste,

Am Wed, Nov 04, 2015 at 05:01:47PM +0100 schrieb Baptiste Clenet:
> Ok I edit my question:
> How to add a global unique IPV6 address to RIOT iface? (IPV6 will be
> built from a unique EUI64)

basically just look at how it is done in the netif code here
https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c#L845
and replace the prefix by something else. 

Cheers,
Oleg
-- 
printk ("%s: This looks like a LART board to me.\n",module_name);
linux-2.6.6/drivers/mtd/devices/lart.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-04 Thread Baptiste Clenet
2015-11-04 16:31 GMT+01:00 Baptiste Clenet :
> Oleg, where did RIOT find those values for CPUID:
> #define SAMD21_CPUID_WORD0 (*(volatile uint32_t *)0x0080A00C)
> #define SAMD21_CPUID_WORD1 (*(volatile uint32_t *)0x0080A040)
> #define SAMD21_CPUID_WORD2 (*(volatile uint32_t *)0x0080A044)
> #define SAMD21_CPUID_WORD3 (*(volatile uint32_t *)0x0080A048)
>

My bad, I didn't see it was addresses corresponding to the serial
number of the board!

> Basically, if I fill the CPUID with my new EUI64 (in correct order) at
> boot time (before reset at86rf2xx), it will update all iface values (I
> tried it) or I should edit cpuid_get as I want.
>
> Last question, I saw that RIOT automatically edits the universal/local
> (U/L) flag (bit 7) in the OUI portion
> Long HWaddr: 5a:5a:XX
> inet addr fe80::585a:XX
>
> If I've got a global EUI64, not local, how should I proceed to tell
> RIOT to not create local address? Or did I misunderstand something?
>
> Baptiste
>
> 2015-11-04 11:40 GMT+01:00 Baptiste Clenet :
>> Thanks Oleg, I will have a look at it.
>>
>> 2015-11-04 10:05 GMT+01:00 Oleg Hahm :
>>> Baptiste,
>>>
 I wanted to update all ifconfig (Pv6 link-local address, Short
 address, Long HW address) information from a new EUI-64.
 I see that it's what RIOT does at build time then. So I should edit
 the EUI64 before IPV6-link-local address is calculated. What should I
 edit?  (and where in Riot source code)
>>>
>>> take a look at, e.g.
>>> https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx.c#L124
>>>
>>> Cheers,
>>> Oleg
>>> --
>>> Chuck Norris has only one OSI layer - Physical
>>>
>>> ___
>>> devel mailing list
>>> devel@riot-os.org
>>> https://lists.riot-os.org/mailman/listinfo/devel
>>>
>>
>>
>>
>> --
>> Baptiste
>
>
>
> --
> Baptiste



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-04 Thread Baptiste Clenet
Ok I edit my question:
How to add a global unique IPV6 address to RIOT iface? (IPV6 will be
built from a unique EUI64)

2015-11-04 16:35 GMT+01:00 Baptiste Clenet :
> 2015-11-04 16:31 GMT+01:00 Baptiste Clenet :
>> Oleg, where did RIOT find those values for CPUID:
>> #define SAMD21_CPUID_WORD0 (*(volatile uint32_t *)0x0080A00C)
>> #define SAMD21_CPUID_WORD1 (*(volatile uint32_t *)0x0080A040)
>> #define SAMD21_CPUID_WORD2 (*(volatile uint32_t *)0x0080A044)
>> #define SAMD21_CPUID_WORD3 (*(volatile uint32_t *)0x0080A048)
>>
>
> My bad, I didn't see it was addresses corresponding to the serial
> number of the board!
>
>> Basically, if I fill the CPUID with my new EUI64 (in correct order) at
>> boot time (before reset at86rf2xx), it will update all iface values (I
>> tried it) or I should edit cpuid_get as I want.
>>
>> Last question, I saw that RIOT automatically edits the universal/local
>> (U/L) flag (bit 7) in the OUI portion
>> Long HWaddr: 5a:5a:XX
>> inet addr fe80::585a:XX
>>
>> If I've got a global EUI64, not local, how should I proceed to tell
>> RIOT to not create local address? Or did I misunderstand something?
>>
>> Baptiste
>>
>> 2015-11-04 11:40 GMT+01:00 Baptiste Clenet :
>>> Thanks Oleg, I will have a look at it.
>>>
>>> 2015-11-04 10:05 GMT+01:00 Oleg Hahm :
 Baptiste,

> I wanted to update all ifconfig (Pv6 link-local address, Short
> address, Long HW address) information from a new EUI-64.
> I see that it's what RIOT does at build time then. So I should edit
> the EUI64 before IPV6-link-local address is calculated. What should I
> edit?  (and where in Riot source code)

 take a look at, e.g.
 https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx.c#L124

 Cheers,
 Oleg
 --
 Chuck Norris has only one OSI layer - Physical

 ___
 devel mailing list
 devel@riot-os.org
 https://lists.riot-os.org/mailman/listinfo/devel

>>>
>>>
>>>
>>> --
>>> Baptiste
>>
>>
>>
>> --
>> Baptiste
>
>
>
> --
> Baptiste



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-04 Thread Oleg Hahm
Baptiste,

> I wanted to update all ifconfig (Pv6 link-local address, Short
> address, Long HW address) information from a new EUI-64.
> I see that it's what RIOT does at build time then. So I should edit
> the EUI64 before IPV6-link-local address is calculated. What should I
> edit?  (and where in Riot source code)

take a look at, e.g.
https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx.c#L124 

Cheers,
Oleg
-- 
Chuck Norris has only one OSI layer - Physical


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-04 Thread Baptiste Clenet
> Not sure, what you're trying to achieve. The IPv6 link-local address is
> calculated at boot time from the node's EUI-64 address and won't be updated
> automatically by just changing the node's HW addresses later on. You can
> however remove the IPv6 address from the given interface and add a new one.
> Another way would be to preconfigure a different EUI-64 at build time.

I wanted to update all ifconfig (Pv6 link-local address, Short
address, Long HW address) information from a new EUI-64.
I see that it's what RIOT does at build time then. So I should edit
the EUI64 before IPV6-link-local address is calculated. What should I
edit?  (and where in Riot source code)


2015-11-04 0:00 GMT+01:00 Oleg Hahm :
> Hi Baptiste!
>
>> I want to edit the IPV6 address with a new EUI64. Which is the correct
>> way to edit the IPV6 address? I tried to edit the Long HWaddr with
>> gnrc_netapi_set but it doesn't automatically update inet6 addr.
>> Do I have to update each value (ie Short/Long addr and inet6 addr) or
>> is there a way to provide an EUI64 value and get those value updated?
>
> Not sure, what you're trying to achieve. The IPv6 link-local address is
> calculated at boot time from the node's EUI-64 address and won't be updated
> automatically by just changing the node's HW addresses later on. You can
> however remove the IPv6 address from the given interface and add a new one.
> Another way would be to preconfigure a different EUI-64 at build time.
>
> Cheers,
> Oleg
> --
> printk("CPU[%d]: Giving pardon to imprisoned penguins\n", smp_processor_id());
> linux-2.4.8/arch/sparc64/kernel/smp.c
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-04 Thread Baptiste Clenet
Thanks Oleg, I will have a look at it.

2015-11-04 10:05 GMT+01:00 Oleg Hahm :
> Baptiste,
>
>> I wanted to update all ifconfig (Pv6 link-local address, Short
>> address, Long HW address) information from a new EUI-64.
>> I see that it's what RIOT does at build time then. So I should edit
>> the EUI64 before IPV6-link-local address is calculated. What should I
>> edit?  (and where in Riot source code)
>
> take a look at, e.g.
> https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx.c#L124
>
> Cheers,
> Oleg
> --
> Chuck Norris has only one OSI layer - Physical
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] IPV6 address

2015-11-03 Thread Oleg Hahm
Hi Baptiste!

> I want to edit the IPV6 address with a new EUI64. Which is the correct
> way to edit the IPV6 address? I tried to edit the Long HWaddr with
> gnrc_netapi_set but it doesn't automatically update inet6 addr.
> Do I have to update each value (ie Short/Long addr and inet6 addr) or
> is there a way to provide an EUI64 value and get those value updated?

Not sure, what you're trying to achieve. The IPv6 link-local address is
calculated at boot time from the node's EUI-64 address and won't be updated
automatically by just changing the node's HW addresses later on. You can
however remove the IPv6 address from the given interface and add a new one.
Another way would be to preconfigure a different EUI-64 at build time.

Cheers,
Oleg
-- 
printk("CPU[%d]: Giving pardon to imprisoned penguins\n", smp_processor_id());
linux-2.4.8/arch/sparc64/kernel/smp.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel