its easy with the help of ethereal. If u really want a C program. Post this in the programming forum