get_gateway.h 641 B

1234567891011121314151617181920
  1. /*
  2. * ZMap Copyright 2013 Regents of the University of Michigan
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy
  6. * of the License at http://www.apache.org/licenses/LICENSE-2.0
  7. */
  8. #ifndef GET_GATEWAY_H
  9. #define GET_GATEWAY_H
  10. #include <netinet/in.h>
  11. int get_hw_addr(struct in_addr *gw_ip, char *iface, unsigned char *hw_mac);
  12. int get_default_gw(struct in_addr *gw, char *iface);
  13. int get_iface_ip(char *iface, struct in_addr *ip);
  14. int get_iface_hw_addr(char *iface, unsigned char *hw_mac);
  15. char* get_default_iface(void);
  16. #endif