Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

now i'm really done

  • Loading branch information...
commit d5dad3549fffc49260ba59f51ee982cf54578cb8 1 parent a07c118
Jacques Uber authored

Showing 3 changed files with 16 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 Makefile
  2. +8 0 README
  3. +5 0 client.c
5 Makefile
@@ -4,11 +4,12 @@ CFLAGS = -g -Wall
4 4 objects = client.o dns_c.h socket_utils.o constructor.o c_utils.o parser.o
5 5
6 6
  7 +build: shell_lib.a
  8 + $(CC) $(CFLAGS) -o client client.c dns_client.a
  9 +
7 10 shell_lib.a: $(objects)
8 11 ar -r dns_client.a $(objects)
9 12
10   -build: shell_lib.a
11   - $(CC) $(CFLAGS) -o client client.c dns_client.a
12 13
13 14 test: build
14 15 ./client www.google.com
8 README
... ... @@ -1,3 +1,11 @@
  1 +Usage:
  2 + ./client <host-name>
  3 +
  4 +
  5 +
  6 +
  7 +
  8 +
1 9 Don't read this.
2 10
3 11
5 client.c
@@ -16,6 +16,11 @@ int main( int argc, char **argv ){
16 16 struct DNS_REQUEST question;
17 17 unsigned char answer[SIZE_OF_RESP];
18 18 memset(answer,0,SIZE_OF_RESP);
  19 + /* Sanitize inputs */
  20 + if(argv[1]==0){
  21 + printf("Usage:\t./client <host-name>\n");
  22 + exit(1);
  23 + }
19 24 /*
20 25 * Ahead of all else, make the head.
21 26 */

0 comments on commit d5dad35

Please sign in to comment.
Something went wrong with that request. Please try again.