-
Notifications
You must be signed in to change notification settings - Fork 875
Script for updating "oui.c" #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Almost there... |
Hi,
|
Also it would help to have one clean commit instead of many draft changes. |
So is
Sorry. You're right. I keep forgetting that. Executable bits aren't really a thing one my main OS. I will fix it that.
I guess there are cases where increases file size could be a problem. So this could be done. Although I also think that compiling these entries in should be the default. Also, I noticed that prefixing every entry with
oui.txt (from http://standards-oui.ieee.org/oui.txt) has Windows line endings by default. 😆 😆
I will squash them into a single commit once I come after some of the points mentioned. @gvanem |
if you are talking about the 0x in the oui_values table in oui.c, then the size of the .c file has no relationship to the resulting object file. |
There is also the PEN table in oui.c, which would be nice to update. |
I agree, an #ifdef SMALL or something in oui.c and a note somewhere should be enough.
The OUI database is significantly smaller than the PEN table. This would add 51000+ entries. |
@sgeto Python and I aren't on out best terms. The dry-run option is great though I deleted that comment since you d/l it since it failed in Python3 (it still have some Unicode issue). I.e. it doesn't download again if |
@gvanem This is clever but the script adds only "netdissect.h" when oui.c needs
It also seems to overrides already existing content in oui.c (PEN table, copyright notice, includes etc). |
What is PEN table? |
the other structure in oui,c that begins with
|
I'm pretty happy with how the PR is right now. So what would it take to get this baby on the road? |
I'm still tinkering with my Having all these
functions? (ref. Edit: I've updated my .py script for a Compiles okay with gcc/clang-cl now. But MSVC says:
Besides the size of |
As a matter of style, for a change of this scope 1 commit would be better than 12 commits trying to amend one another. |
Remove old OUI list: Except for some defines in oui.h needed by print-llc.c Generate new OUI list Brought some needed defines back: needed by print-llc.c and print-openflow-1.0.c Add update-oui-database.sh as dist target Adjusted tests Added executable permission to update-oui-database.sh Merge branch 'master' into oui Convert DOS newlines (CR/LF) to Unix format Allow skipping full OUI database by defining NOOUIDB Add an --disable-oui-database option to the configure script The last entry in should be 0xFFFFFF shout-out to @gvanem Updated OUI database again
@infrastation |
Will this change, these definitions are only around for print-lldp.c and print-llc.c.
I agree but just leave them there. Another option would be to replace these macros in print-lldp.c and print-llc.c with with their actual value since they will probably stay the same forever anyways.
Have not build this branch with MSVC yet.
oui.txt is a big list. An alternative would be to make the list optional or to make tcpdump read a plain oui.txt at runtime. See @mcr 's comment on that. The latter will require quite some coding. |
Need to study memory and size before/after adding a complete oui file. |
Alternatively, I have the OUIs as a reverse DNS lookup:
I don't really want to put this in my zone. It could go into tcpdump.net if desired. |
@fxlb, did you have a chance to see what effect this change would have on performance and memory footprint? |
Stripped size of tcpdump increases from 1.6M -> 2.2M on Debian Bullseye. No time for other studies. (This PR updates 107 files : problem!) |
Most of the changes are not related to OUI printing, possibly a git rebase went wrong at some point. The proposed change would need to be extracted into a small commit before it can be considered again. |
The changes that belong to the commit are:
The original changes to |
No description provided.