proxy.h 488 B

1234567891011121314151617181920212223242526
  1. #ifndef PROXY_H
  2. #define PROXY_H
  3. #include <netinet/in.h>
  4. #ifdef CMD_DEFINE
  5. # define cmdexport
  6. #else
  7. # define cmdexport static
  8. #endif
  9. cmdexport const int CMD_SET_ROUTE = 1;
  10. cmdexport const int CMD_DEL_ROUTE = 2;
  11. cmdexport const int CMD_STOP = 3;
  12. typedef struct command {
  13. int cmd;
  14. in_addr_t dest_net;
  15. int dest_net_len;
  16. in_addr_t next_hop_ip;
  17. short next_hop_port;
  18. } command;
  19. void run_proxy(int tun, int sock, int ctl, in_addr_t tun_ip, int log_errors);
  20. #endif