]> arthur.barton.de Git - netatalk.git/blob - libatalk/asp/asp_tickle.c
implemented config.h
[netatalk.git] / libatalk / asp / asp_tickle.c
1 #ifdef HAVE_CONFIG_H
2 #include "config.h"
3 #endif
4
5 #include <syslog.h>
6 #include <atalk/atp.h>
7 #include <atalk/asp.h>
8
9 /* send off a tickle */
10 void asp_tickle(ASP asp, const u_int8_t sid, struct sockaddr_at *sat)
11 {
12   struct atp_block atpb;
13   char buf[ASP_HDRSIZ];
14
15   buf[ 0 ] = ASPFUNC_TICKLE;
16   buf[ 1 ] = sid;
17   buf[ 2 ] = buf[ 3 ] = 0;
18
19   atpb.atp_saddr = sat;
20   atpb.atp_sreqdata = buf;
21   atpb.atp_sreqdlen = sizeof(buf);
22   atpb.atp_sreqto = 0;
23   atpb.atp_sreqtries = 1;
24   if ( atp_sreq( asp->asp_atp, &atpb, 0, 0 ) < 0 ) {
25     syslog( LOG_ERR, "atp_sreq: %m" );
26   }
27 }