Changeset 5400f07 in rtems
- Timestamp:
- 09/19/01 17:40:37 (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- abde5688
- Parents:
- 6a9db57
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libnetworking/ChangeLog
r6a9db57 r5400f07 1 2001-09-19 Eric Norum <eric.norum@usask.ca> 2 3 * lib/tftpDriver.c: Add some debugging capability. 4 1 5 2001-09-19 Chris Johns <ccj@acm.org> 2 6 -
c/src/exec/libnetworking/lib/tftpDriver.c
r6a9db57 r5400f07 36 36 #endif 37 37 38 #ifdef RTEMS_TFTP_DRIVER_DEBUG 39 int rtems_tftp_driver_debug = 1; 40 #endif 38 41 39 42 /* … … 350 353 tv.tv_usec = 0; 351 354 setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv); 355 #ifdef RTEMS_TFTP_DRIVER_DEBUG 356 if (rtems_tftp_driver_debug) { 357 if (len >= (int) sizeof tp->pkbuf.tftpACK) { 358 int opcode = ntohs (tp->pkbuf.tftpDATA.opcode); 359 switch (opcode) { 360 default: 361 printf ("TFTP: OPCODE %d\n", opcode); 362 break; 363 364 case TFTP_OPCODE_DATA: 365 printf ("TFTP: RECV %d\n", ntohs (tp->pkbuf.tftpDATA.blocknum)); 366 break; 367 368 case TFTP_OPCODE_ACK: 369 printf ("TFTP: GOT ACK %d\n", ntohs (tp->pkbuf.tftpACK.blocknum)); 370 break; 371 } 372 } 373 else { 374 printf ("TFTP: %d0-byte packet\n", len); 375 } 376 } 377 #endif 352 378 return len; 353 379 } … … 359 385 sendAck (struct tftpStream *tp) 360 386 { 387 #ifdef RTEMS_TFTP_DRIVER_DEBUG 388 if (rtems_tftp_driver_debug) 389 printf ("TFTP: ACK %d\n", tp->blocknum); 390 #endif 391 361 392 /* 362 393 * Create the acknowledgement … … 720 751 tp->pkbuf.tftpDATA.opcode = htons (TFTP_OPCODE_DATA); 721 752 tp->pkbuf.tftpDATA.blocknum = htons (tp->blocknum); 753 #ifdef RTEMS_TFTP_DRIVER_DEBUG 754 if (rtems_tftp_driver_debug) 755 printf ("TFTP: SEND %d\n", tp->blocknum); 756 #endif 722 757 if (sendto (tp->socket, (char *)&tp->pkbuf, wlen, 0, 723 758 (struct sockaddr *)&tp->farAddress, -
c/src/libnetworking/ChangeLog
r6a9db57 r5400f07 1 2001-09-19 Eric Norum <eric.norum@usask.ca> 2 3 * lib/tftpDriver.c: Add some debugging capability. 4 1 5 2001-09-19 Chris Johns <ccj@acm.org> 2 6 -
c/src/libnetworking/lib/tftpDriver.c
r6a9db57 r5400f07 36 36 #endif 37 37 38 #ifdef RTEMS_TFTP_DRIVER_DEBUG 39 int rtems_tftp_driver_debug = 1; 40 #endif 38 41 39 42 /* … … 350 353 tv.tv_usec = 0; 351 354 setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv); 355 #ifdef RTEMS_TFTP_DRIVER_DEBUG 356 if (rtems_tftp_driver_debug) { 357 if (len >= (int) sizeof tp->pkbuf.tftpACK) { 358 int opcode = ntohs (tp->pkbuf.tftpDATA.opcode); 359 switch (opcode) { 360 default: 361 printf ("TFTP: OPCODE %d\n", opcode); 362 break; 363 364 case TFTP_OPCODE_DATA: 365 printf ("TFTP: RECV %d\n", ntohs (tp->pkbuf.tftpDATA.blocknum)); 366 break; 367 368 case TFTP_OPCODE_ACK: 369 printf ("TFTP: GOT ACK %d\n", ntohs (tp->pkbuf.tftpACK.blocknum)); 370 break; 371 } 372 } 373 else { 374 printf ("TFTP: %d0-byte packet\n", len); 375 } 376 } 377 #endif 352 378 return len; 353 379 } … … 359 385 sendAck (struct tftpStream *tp) 360 386 { 387 #ifdef RTEMS_TFTP_DRIVER_DEBUG 388 if (rtems_tftp_driver_debug) 389 printf ("TFTP: ACK %d\n", tp->blocknum); 390 #endif 391 361 392 /* 362 393 * Create the acknowledgement … … 720 751 tp->pkbuf.tftpDATA.opcode = htons (TFTP_OPCODE_DATA); 721 752 tp->pkbuf.tftpDATA.blocknum = htons (tp->blocknum); 753 #ifdef RTEMS_TFTP_DRIVER_DEBUG 754 if (rtems_tftp_driver_debug) 755 printf ("TFTP: SEND %d\n", tp->blocknum); 756 #endif 722 757 if (sendto (tp->socket, (char *)&tp->pkbuf, wlen, 0, 723 758 (struct sockaddr *)&tp->farAddress, -
cpukit/libnetworking/ChangeLog
r6a9db57 r5400f07 1 2001-09-19 Eric Norum <eric.norum@usask.ca> 2 3 * lib/tftpDriver.c: Add some debugging capability. 4 1 5 2001-09-19 Chris Johns <ccj@acm.org> 2 6 -
cpukit/libnetworking/lib/tftpDriver.c
r6a9db57 r5400f07 36 36 #endif 37 37 38 #ifdef RTEMS_TFTP_DRIVER_DEBUG 39 int rtems_tftp_driver_debug = 1; 40 #endif 38 41 39 42 /* … … 350 353 tv.tv_usec = 0; 351 354 setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv); 355 #ifdef RTEMS_TFTP_DRIVER_DEBUG 356 if (rtems_tftp_driver_debug) { 357 if (len >= (int) sizeof tp->pkbuf.tftpACK) { 358 int opcode = ntohs (tp->pkbuf.tftpDATA.opcode); 359 switch (opcode) { 360 default: 361 printf ("TFTP: OPCODE %d\n", opcode); 362 break; 363 364 case TFTP_OPCODE_DATA: 365 printf ("TFTP: RECV %d\n", ntohs (tp->pkbuf.tftpDATA.blocknum)); 366 break; 367 368 case TFTP_OPCODE_ACK: 369 printf ("TFTP: GOT ACK %d\n", ntohs (tp->pkbuf.tftpACK.blocknum)); 370 break; 371 } 372 } 373 else { 374 printf ("TFTP: %d0-byte packet\n", len); 375 } 376 } 377 #endif 352 378 return len; 353 379 } … … 359 385 sendAck (struct tftpStream *tp) 360 386 { 387 #ifdef RTEMS_TFTP_DRIVER_DEBUG 388 if (rtems_tftp_driver_debug) 389 printf ("TFTP: ACK %d\n", tp->blocknum); 390 #endif 391 361 392 /* 362 393 * Create the acknowledgement … … 720 751 tp->pkbuf.tftpDATA.opcode = htons (TFTP_OPCODE_DATA); 721 752 tp->pkbuf.tftpDATA.blocknum = htons (tp->blocknum); 753 #ifdef RTEMS_TFTP_DRIVER_DEBUG 754 if (rtems_tftp_driver_debug) 755 printf ("TFTP: SEND %d\n", tp->blocknum); 756 #endif 722 757 if (sendto (tp->socket, (char *)&tp->pkbuf, wlen, 0, 723 758 (struct sockaddr *)&tp->farAddress,
Note: See TracChangeset
for help on using the changeset viewer.