next up previous contents index
Up: Network Application Security Using Previous: B. Sample Certificates   Contents   Index


C. Benchmarking Tool

This appendix contains source code of the benchmarking tool used in 4.4.6. It is included here for inspection of how the test proceeded, points to note are that only TCP is used in the DNS case and that the TCP connection is closed between every connection.

/* DNS/LDAP performance program,
 * by Simon Josefsson <sjosefsson@rsasecurity.com>
 *
 * Compile with
 *
 * cc -g -o bench bench.c dnssec.c res_searchN.c -lresolv -lldap -llber -pg -a
 *
 * If running on linux, you need to run this:
 *
 * sysctl -w net.ipv4.ip_local_port_range="1024     30000"
 *
 * otherwise DNS will flood your local tcp ports.
 *
 * Example:
 *
 * ./bench ldap 172.16.13.119 "cn=User 5, dc=josefsson, dc=org" 5000
 * ./bench dns 172.16.13.119 user5.josefsson.org 5000
 */











































































































next up previous contents index
Up: Network Application Security Using Previous: B. Sample Certificates   Contents   Index
2002-01-07