These are chat archives for Exa-Networks/exabgp

Oct 2015
Nikos Skalis
Oct 01 2015 11:16
hi guys. can you please help and advise me on how to get the octets of an extended community ? examples: "extended-community": [ 9223372036854777089, 9223751951997599744 ] and "extended-community": [ 217861631974049024 ]. (am running ExaBGP : 3.9.0)
Oct 01 2015 12:45
@nskalis In python hex(9223372036854777089) produces 0x8000000000000501L
Thomas Mangin
Oct 01 2015 13:48
I believe the The L is for “LONG” i.e. the data does not fit in 64 bits signed integer
But this is indeed the way to convert base 10 to base 16
The other way around is :
Nikos Skalis
Oct 01 2015 15:00
thank you guys. but is there any way to distinguish which type should be translated into ? with reference is there a way i can tell which format is coded into that list if it is an ip or asn ?
Thomas Mangin
Oct 01 2015 15:14
If it starts with 0x - it is hexadecimal otherwise it is decimal
Oh !
Not sure I need to look at the code and I can not right now
But I believe that you need to look the “prefix"
target / target4 is defined with 16 bits and then 32 bits
when orgin is the other way round ( that what I need to check in the code )
The fact is that it is not really an ASN and IP just 32 and 16 bits numbers
if it is just a numeric then it must be decoded fully ..