name mode size
.gitignore 100644 0 kb
Makefile 100644 0 kb
README 100644 1 kb
checker.c 100644 2 kb
cidr.txt 100644 118 kb
email.txt 100644 20 kb
email.txt.match 100644 2 kb
email.txt.nomx 100644 7 kb
email.txt.unmatch 100644 11 kb
freelancer-project-1.txt 100644 4 kb 100755 7 kb
To start: 1) compile checker by running "make" 2) run "./" (with options you've described in the task description) $ time ./ Parsing CIDRs... ok Starting checker daemon...ok Processing emails now real 0m19,689s user 0m11,364s sys 0m4,084s $ LANG=C wc -l email.txt.* 104 email.txt.match 349 email.txt.nomx 547 email.txt.unmatch 1000 total Notes: Checker was a speed-hack, because I said I finish this work in 24 hours. Some stuff is hardcoded. F.e. it uses "/tmp/checker.socket" and it's not configurable. Don't worry about 19s of real time. 14s is CIDR parsing: Parsing CIDRs... real 0m13,923s user 0m1,084s sys 0m1,540s Now it's your time to play with configuration options and workers number. Btw I've added more options. Just look at the beginning of the script. It must be obvious. Dependencies: These tools must be available in your system: bash getopt socat bc dig tr