| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Sounds stupid, but we actually didn't support hex nibbles in one of
the two directions of the conversion, so let's make sure we test for
this.
Change-Id: I8445da54cc4f9b1cd64f286c2b238f4f7c87accb
|
|
|
|
|
|
| |
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: Idf75946eb0a84e145adad13fc7c78bb7a267aa0a
|
|
|
|
|
|
|
|
| |
This is particularly useful for hex dumps containing spaces found in a log
(e.g. osmo-nitb authentication rand token), which can now be passed in quotes
to osmo-auc-gen without having to edit the spaces away.
Change-Id: Ib7af07f674a2d26c8569acdee98835fb3e626c45
|
|
|
|
| |
Change-Id: Ic95ab00b57d54905a235109561c00419161cf4bc
|
|
|
|
|
|
|
|
| |
For some reason the structure is closer to be a LV (length
and value). The value is actually a tag but it is counted
inside the length. Introduce an overload of the parse function
to provide an offset for the length. This will be taken from
the returned length.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the osmo-bts and libosmo-abis code the hexdump routine is used
for every incoming/outgoing packet (including voice frames) and the
usage of snprintf showed up inside profiles.
There is a semantic change when more than 4096 characters are used.
The code will now truncate at byte boundaries (and not nibbles).
Code:
static const int lengths[] = { 23, 1000, 52 };
char buf[4096];
int i;
for (i = 0; i < 30000; ++i)
char *res = osmo_hexdump(buf, lengths[i & 3]);
Results:
before: after:
real 0m3.233s real 0m0.085s
user 0m3.212s user 0m0.084s
sys 0m0.000s sys 0m0.000s
|
|
This code makes a simple dump and tests for the corner case
|