dns.h 680 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * dns.h
  3. * stuff used by dns.c
  4. *
  5. */
  6. #ifndef _EGG_DNS_H
  7. #define _EGG_DNS_H
  8. typedef struct {
  9. char *name;
  10. int (*expmem)(void *);
  11. void (*event)(IP, char *, int, void *);
  12. } devent_type;
  13. typedef struct {
  14. char *proc; /* Tcl proc */
  15. char *paras; /* Additional parameters */
  16. } devent_tclinfo_t;
  17. typedef struct devent_str {
  18. struct devent_str *next; /* Pointer to next dns_event */
  19. devent_type *type;
  20. u_8bit_t lookup; /* RES_IPBYHOST or RES_HOSTBYIP */
  21. union {
  22. IP ip_addr; /* IP address */
  23. char *hostname; /* Hostname */
  24. } res_data;
  25. void *other; /* Data specific to the event type */
  26. } devent_t;
  27. #endif /* _EGG_DNS_H */