configuration.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef BUFSIZ
  2. #define BUFSIZ (1<<16)
  3. #endif
  4. // don't do to much rules, it will degrade performance
  5. #define MAXRULES (1<<8)
  6. // there's no need in more than 256 arguments while running action-script, IMHO :)
  7. #define MAXARGUMENTS (1<<8)
  8. // clsync should be used, if there's more than 5-10 nodes. So the limit in 255 is quite enough. :)
  9. #define MAXNODES ((1<<8)-1)
  10. #define DEFAULT_RULES_PERM RA_ALL
  11. #define DEFAULT_NOTIFYENGINE NE_INOTIFY
  12. #define DEFAULT_COLLECTDELAY 30
  13. #define DEFAULT_SYNCDELAY (DEFAULT_COLLECTDELAY)
  14. #define DEFAULT_BFILETHRESHOLD (128 * 1024 * 1024)
  15. #define DEFAULT_BFILECOLLECTDELAY 1800
  16. #define DEFAULT_LABEL "nolabel"
  17. #define DEFAULT_RSYNC_INCLUDELINESLIMIT 20000
  18. #define DEFAULT_SYNCTIMEOUT (3600 * 24)
  19. #define DEFAULT_CLUSTERTIMEOUT 1000
  20. #define DEFAULT_CLUSTERIPADDR "227.108.115.121"
  21. #define DEFAULT_CLUSTERIPPORT 40079
  22. #define DEFAULT_CLUSTERHDLMIN 1
  23. #define DEFAULT_CLUSTERHDLMAX 16
  24. #define DEFAULT_CLUSTERSDLMAX 32
  25. #define DEFAULT_CONFIG_BLOCK "default"
  26. #define FANOTIFY_FLAGS (FAN_CLOEXEC|FAN_UNLIMITED_QUEUE|FAN_UNLIMITED_MARKS)
  27. #define FANOTIFY_EVFLAGS (O_LARGEFILE|O_RDONLY|O_CLOEXEC)
  28. #define FANOTIFY_MARKMASK (FAN_OPEN|FAN_MODIFY|FAN_CLOSE|FAN_ONDIR|FAN_EVENT_ON_CHILD)
  29. #define INOTIFY_FLAGS 0
  30. //(FD_CLOEXEC)
  31. #define INOTIFY_MARKMASK (IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MODIFY|IN_DONT_FOLLOW)
  32. #define COUNTER_LIMIT (1<<10)
  33. #define SLEEP_SECONDS 1
  34. #define KILL_TIMEOUT 60
  35. #define ALLOC_PORTION (1<<10) /* 1 KiX */
  36. #define CLUSTER_WINDOW_BUFSIZE_PORTION (1<<20) /* 1 MiB */
  37. #define CLUSTER_PACKET_MAXSIZE (1<<24) /* 16 MiB */
  38. #define CONFIG_PATHS { ".clsync.conf", "/etc/clsync/clsync.conf", NULL } /* "~/.clsync.conf" and "/etc/clsync/clsync.conf" */
  39. #define API_PREFIX "clsyncapi_"