Git Product home page Git Product logo

Comments (8)

nihilus avatar nihilus commented on August 31, 2024

Also by commenting out the usage I was able to reduce the binary by 20 KB!

from arp-scan.

nihilus avatar nihilus commented on August 31, 2024

Something like this: https://gist.github.com/cirocosta/e61e52cc6afe2633500b

from arp-scan.

nihilus avatar nihilus commented on August 31, 2024

I did fix some stuff over at https://github.com/nihilus/arp-scan

from arp-scan.

nihilus avatar nihilus commented on August 31, 2024

You can easily look at the changes related to the hashmap. However I am not sur how this handles dupes.

from arp-scan.

royhills avatar royhills commented on August 31, 2024

I'll look at using the hcreate(), hsearch() and hdestroy() posix functions instead of the hash table implementation that I borrowed from gas. The main thing I need to check is that these functions are available on all platforms that arp-scan is used on. That is basically the various flavours of Linux and BSD, as Solaris is not used as much as it used to be.

I'm interested in the reasons behind the changes you've made. I see that you've slimmed things down a lot - is this to reduce the memory footprint of the resulting executable?

from arp-scan.

nihilus avatar nihilus commented on August 31, 2024

@royhills yeah, a footprint of 350kb (MIPS32r2 ISA) when statically linked aginst plain libpcap is undesirable on an embedded Linux system so I figured out I better forked it off and tailored it after my needs.

Contrary to the reentrant hashmap functions (e.g. hsearch_r()) my changes were made to work on OS X.

from arp-scan.

royhills avatar royhills commented on August 31, 2024

I've implemented your suggestion, and it seems to work fine: it builds and passes checks on Linux (Debian Jessie), FreeBSD 10.2 and Solaris 10 u11, all on x86_64 architecture. I'll check out the other popular systems when I get time.

If you know you'll always be running on Linux, and never BSD or Solaris, you could reduce your footprint a bit by removing link-bpf and link-dlpi and just keeping link-packet-socket. You could also remove the configure.ac logic that chooses between the various link layer implementations to obtain the MAC address.

from arp-scan.

royhills avatar royhills commented on August 31, 2024

The new version also works on FreeBSD 9.3, NetBSD 6.0.1 and NetBSD 7.0.1. So I suspect it's pretty portable. I'm closing this issue now, as I believe it is resolved.

from arp-scan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.