]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/atp/atp_sreq.c
Big configure.in cleanup
[netatalk.git] / libatalk / atp / atp_sreq.c
index 0ec1b194c27b37ee0725afd6eaaaa2a8adb0dcd2..a34f3470c8e2480d1a6aadee3d602094aed8affd 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: atp_sreq.c,v 1.5 2002-01-17 06:08:55 srittau Exp $
+ *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
  *     netatalk@itd.umich.edu
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
 
 #include "atp_internals.h"
 
+/*
+ * ah:        open atp handle
+ * atpb:      parameter block
+ * respcount: buffers available for response
+ * flags:     ATP_XO, ATP_TREL
+ */
 int
-atp_sreq( ah, atpb, respcount, flags )
-    ATP                        ah;             /* open atp handle */
-    struct atp_block   *atpb;          /* parameter block */
-    int                        respcount;      /* buffers available for response */
-    u_int8_t           flags;          /* ATP_XO, ATP_TREL?? */
+atp_sreq( ATP ah, struct atp_block *atpb, int respcount, u_int8_t flags )
 {
     struct atpbuf      *req_buf;
     int                        i;
 
 #ifdef EBUG
     atp_print_bufuse( ah, "atp_sreq" );
-#endif
+#endif /* EBUG */
 
     /* check parameters
     */
@@ -87,17 +95,17 @@ atp_sreq( ah, atpb, respcount, flags )
     /* send the initial request
     */
 #ifdef EBUG
-    printf( "\n<%d> atp_sreq: sending a %d byte packet ", getpid(),
+    printf( "\n<%d> atp_sreq: sending a %ld byte packet ", getpid(),
            req_buf->atpbuf_dlen );
     atp_print_addr( " to", atpb->atp_saddr );
     putchar( '\n' );
     bprint( req_buf->atpbuf_info.atpbuf_data, req_buf->atpbuf_dlen );
-#endif
+#endif /* EBUG */
 
     gettimeofday( &ah->atph_reqtv, (struct timezone *)0 );
 #ifdef DROPPACKETS
 if (( random() % 3 ) != 2 ) {
-#endif
+#endif /* DROPPACKETS */
     if ( netddp_sendto( ah->atph_socket, req_buf->atpbuf_info.atpbuf_data,
            req_buf->atpbuf_dlen, 0, (struct sockaddr *) atpb->atp_saddr,
            sizeof( struct sockaddr_at )) != req_buf->atpbuf_dlen ) {
@@ -106,7 +114,7 @@ if (( random() % 3 ) != 2 ) {
     }
 #ifdef DROPPACKETS
 } else printf( "<%d> atp_sreq: dropped request\n", getpid() );
-#endif
+#endif /* DROPPACKETS */
 
     if ( atpb->atp_sreqto != 0 ) {
        if ( ah->atph_reqpkt != NULL ) {