Skip to content
Browse files

now i'm really done

  • Loading branch information...
1 parent a07c118 commit d5dad3549fffc49260ba59f51ee982cf54578cb8 @uberj committed Mar 10, 2011
Showing with 16 additions and 2 deletions.
  1. +3 −2 Makefile
  2. +8 −0 README
  3. +5 −0 client.c
View
5 Makefile
@@ -4,11 +4,12 @@ CFLAGS = -g -Wall
objects = client.o dns_c.h socket_utils.o constructor.o c_utils.o parser.o
+build: shell_lib.a
+ $(CC) $(CFLAGS) -o client client.c dns_client.a
+
shell_lib.a: $(objects)
ar -r dns_client.a $(objects)
-build: shell_lib.a
- $(CC) $(CFLAGS) -o client client.c dns_client.a
test: build
./client www.google.com
View
8 README
@@ -1,3 +1,11 @@
+Usage:
+ ./client <host-name>
+
+
+
+
+
+
Don't read this.
View
5 client.c
@@ -16,6 +16,11 @@ int main( int argc, char **argv ){
struct DNS_REQUEST question;
unsigned char answer[SIZE_OF_RESP];
memset(answer,0,SIZE_OF_RESP);
+ /* Sanitize inputs */
+ if(argv[1]==0){
+ printf("Usage:\t./client <host-name>\n");
+ exit(1);
+ }
/*
* Ahead of all else, make the head.
*/

0 comments on commit d5dad35

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