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