smtp.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. enum {
  2. Maxbustedmx = 100,
  3. };
  4. typedef struct Node Node;
  5. typedef struct Field Field;
  6. typedef Node *Nodeptr;
  7. #define YYSTYPE Nodeptr
  8. struct Node {
  9. Node *next;
  10. int c; /* token type */
  11. char addr; /* true if this is an address */
  12. String *s; /* string representing token */
  13. String *white; /* white space following token */
  14. char *start; /* first byte for this token */
  15. char *end; /* next byte in input */
  16. };
  17. struct Field {
  18. Field *next;
  19. Node *node;
  20. int source;
  21. };
  22. typedef struct DS DS;
  23. struct DS {
  24. /* dist string */
  25. char buf[128];
  26. char expand[128];
  27. char *netdir;
  28. char *proto;
  29. char *host;
  30. char *service;
  31. };
  32. extern Field *firstfield;
  33. extern Field *lastfield;
  34. extern Node *usender;
  35. extern Node *usys;
  36. extern Node *udate;
  37. extern int originator;
  38. extern int destination;
  39. extern int date;
  40. extern int debug;
  41. extern int messageid;
  42. extern char *bustedmxs[Maxbustedmx];
  43. Node* anonymous(Node*);
  44. Node* address(Node*);
  45. int badfieldname(Node*);
  46. Node* bang(Node*, Node*);
  47. Node* colon(Node*, Node*);
  48. int cistrcmp(char*, char*);
  49. Node* link2(Node*, Node*);
  50. Node* link3(Node*, Node*, Node*);
  51. void freenode(Node*);
  52. void newfield(Node*, int);
  53. void freefield(Field*);
  54. void yyinit(char*, int);
  55. int yyparse(void);
  56. int yylex(void);
  57. String* yywhite(void);
  58. Node* whiten(Node*);
  59. void yycleanup(void);
  60. int mxdial(char*, char*, char*);
  61. void dial_string_parse(char*, DS*);