CS 3733 Operating Systems, Spring 2010 Assignment 6 Comments

Score on this assignment:
essentially complete: 3
Parts 1 and 2 mostly done: 8
Parts 1 and 2 not close: 14
Not handed in: 8

Outline of server loop:

Note: no call to copy2files

Filter (no error checking)

int main() {
   uint32_t n;
   char *p = (char *)&n;
   read(STDIN_FILENO,&p,1);
   read(STDIN_FILENO,&p+1,1);
   read(STDIN_FILENO,&p+2,1);
   read(STDIN_FILENO,&p+3,1);
   n = ntohl(n);
   fprintf(stdout,"%d\n",(int)n);
   return 0;
}
Why did I not do:
   read(STDIN_FILENO,&n,4);