2 * Copyright (C) Volition, Inc. 2005. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on the
10 //Pilot tracker client code
13 #include <arpa/inet.h>
14 #include <netinet/in.h>
26 // check structs for size compatibility
27 SDL_COMPILE_TIME_ASSERT(udp_packet_header, sizeof(udp_packet_header) == 497);
28 SDL_COMPILE_TIME_ASSERT(vmt_freespace2_struct, sizeof(vmt_freespace2_struct) == 440);
29 SDL_COMPILE_TIME_ASSERT(validate_id_request, sizeof(validate_id_request) == 60);
30 SDL_COMPILE_TIME_ASSERT(squad_war_request, sizeof(squad_war_request) == 104);
31 SDL_COMPILE_TIME_ASSERT(squad_war_response, sizeof(squad_war_response) == 256);
32 SDL_COMPILE_TIME_ASSERT(squad_war_result, sizeof(squad_war_result) == 72);
33 SDL_COMPILE_TIME_ASSERT(pilot_request, sizeof(pilot_request) == 32);
40 SOCKADDR_IN ptrackaddr;
45 unsigned int FSLastSentWrite;
46 unsigned int FSFirstSentWrite;
47 unsigned int FSLastSent;
48 unsigned int FSFirstSent;
51 unsigned int SWLastSentWrite;
52 unsigned int SWFirstSentWrite;
55 udp_packet_header fs_pilot_req, fs_pilot_write, sw_res_write;
58 vmt_freespace_struct *ReadFSPilot;
60 vmt_freespace2_struct *ReadFSPilot;
64 squad_war_response SquadWarWriteResponse;
67 static int SerializePilotPacket(const udp_packet_header *uph, ubyte *data)
72 PXO_ADD_DATA(uph->type);
73 PXO_ADD_USHORT(uph->len);
74 PXO_ADD_UINT(uph->code);
75 PXO_ADD_USHORT(uph->xcode);
76 PXO_ADD_UINT(uph->sig);
77 PXO_ADD_UINT(uph->security);
80 // no extra data for this
84 case UNT_PILOT_DATA_WRITE_NEW: {
85 vmt_freespace2_struct *fs2 = (vmt_freespace2_struct *)&uph->data;
87 PXO_ADD_DATA(fs2->tracker_id);
88 PXO_ADD_DATA(fs2->pilot_name);
90 PXO_ADD_DATA(fs2->pad_a); // junk, for size/alignment
92 PXO_ADD_INT(fs2->score);
93 PXO_ADD_INT(fs2->rank);
94 PXO_ADD_INT(fs2->assists);
95 PXO_ADD_INT(fs2->kill_count);
96 PXO_ADD_INT(fs2->kill_count_ok);
97 PXO_ADD_UINT(fs2->p_shots_fired);
98 PXO_ADD_UINT(fs2->s_shots_fired);
100 PXO_ADD_UINT(fs2->p_shots_hit);
101 PXO_ADD_UINT(fs2->s_shots_hit);
103 PXO_ADD_UINT(fs2->p_bonehead_hits);
104 PXO_ADD_UINT(fs2->s_bonehead_hits);
105 PXO_ADD_INT(fs2->bonehead_kills);
107 PXO_ADD_INT(fs2->security);
108 PXO_ADD_DATA(fs2->virgin_pilot);
110 PXO_ADD_DATA(fs2->pad_b); // junk, for size/alignment
112 PXO_ADD_UINT(fs2->checksum);
114 PXO_ADD_UINT(fs2->missions_flown);
115 PXO_ADD_UINT(fs2->flight_time);
116 PXO_ADD_UINT(fs2->last_flown);
118 PXO_ADD_USHORT(fs2->num_medals);
119 PXO_ADD_USHORT(fs2->num_ship_types);
121 for (i = 0; i < MAX_FS2_MEDALS; i++) {
122 PXO_ADD_INT(fs2->medals[i]);
125 for (i =0; i < MAX_FS2_SHIP_TYPES; i++) {
126 PXO_ADD_USHORT(fs2->kills[i]);
132 case UNT_SW_RESULT_WRITE: {
133 squad_war_result *sw_result = (squad_war_result *)&uph->data;
135 PXO_ADD_DATA(sw_result->match_code);
136 PXO_ADD_DATA(sw_result->result);
137 PXO_ADD_DATA(sw_result->squad_count1);
138 PXO_ADD_DATA(sw_result->squad_count2);
139 PXO_ADD_DATA(sw_result->pad); // junk, for size/alignment
141 for (i = 0; i < MAX_SQUAD_PLAYERS; i++) {
142 PXO_ADD_INT(sw_result->squad_winners[i]);
145 for (i = 0; i < MAX_SQUAD_PLAYERS; i++) {
146 PXO_ADD_INT(sw_result->squad_losers[i]);
152 case UNT_PILOT_DATA_READ_NEW:
153 case UNT_PILOT_DATA_READ: {
154 pilot_request *pr = (pilot_request *)&uph->data;
156 PXO_ADD_DATA(pr->pilot_name);
157 PXO_ADD_DATA(pr->tracker_id);
158 PXO_ADD_DATA(pr->pad); // junk, for size/alignment
163 // we shouldn't be sending any other packet types
169 SDL_assert(packet_size >= (int)PACKED_HEADER_ONLY_SIZE);
170 SDL_assert(packet_size == (int)uph->len);
175 static void DeserializePilotPacket(const ubyte *data, const int data_size, udp_packet_header *uph)
179 memset(uph, 0, sizeof(udp_packet_header));
181 // make sure we received a complete base packet
182 if (data_size < (int)PACKED_HEADER_ONLY_SIZE) {
189 PXO_GET_DATA(uph->type);
190 PXO_GET_USHORT(uph->len);
191 PXO_GET_UINT(uph->code);
192 PXO_GET_USHORT(uph->xcode);
193 PXO_GET_UINT(uph->sig);
194 PXO_GET_UINT(uph->security);
196 // sanity check data size to make sure we reveived all of the expected packet
197 // (not exactly sure what -1 is for, but that's how it is later)
198 if ((int)uph->len-1 > data_size) {
206 // no extra data for these
207 case UNT_PILOT_READ_FAILED:
208 case UNT_PILOT_WRITE_SUCCESS:
209 case UNT_PILOT_WRITE_FAILED:
212 case UNT_PILOT_DATA_RESPONSE: {
213 vmt_freespace2_struct *fs2 = (vmt_freespace2_struct *)&uph->data;
215 PXO_GET_DATA(fs2->tracker_id);
216 PXO_GET_DATA(fs2->pilot_name);
218 PXO_GET_DATA(fs2->pad_a); // junk, for size/alignment
220 PXO_GET_INT(fs2->score);
221 PXO_GET_INT(fs2->rank);
222 PXO_GET_INT(fs2->assists);
223 PXO_GET_INT(fs2->kill_count);
224 PXO_GET_INT(fs2->kill_count_ok);
225 PXO_GET_UINT(fs2->p_shots_fired);
226 PXO_GET_UINT(fs2->s_shots_fired);
228 PXO_GET_UINT(fs2->p_shots_hit);
229 PXO_GET_UINT(fs2->s_shots_hit);
231 PXO_GET_UINT(fs2->p_bonehead_hits);
232 PXO_GET_UINT(fs2->s_bonehead_hits);
233 PXO_GET_INT(fs2->bonehead_kills);
235 PXO_GET_INT(fs2->security);
236 PXO_GET_DATA(fs2->virgin_pilot);
238 PXO_GET_DATA(fs2->pad_b); // junk, for size/alignment
240 PXO_GET_UINT(fs2->checksum);
242 PXO_GET_UINT(fs2->missions_flown);
243 PXO_GET_UINT(fs2->flight_time);
244 PXO_GET_UINT(fs2->last_flown);
246 PXO_GET_USHORT(fs2->num_medals);
247 PXO_GET_USHORT(fs2->num_ship_types);
249 for (i = 0; i < MAX_FS2_MEDALS; i++) {
250 PXO_GET_INT(fs2->medals[i]);
253 for (i =0; i < MAX_FS2_SHIP_TYPES; i++) {
254 PXO_GET_USHORT(fs2->kills[i]);
260 case UNT_SW_RESULT_RESPONSE: {
261 squad_war_response *sw_resp = (squad_war_response *)&uph->data;
263 PXO_GET_DATA(sw_resp->reason);
264 PXO_GET_DATA(sw_resp->accepted);
273 //SDL_assert(offset == data_size);
277 int InitPilotTrackerClient()
279 SOCKADDR_IN sockaddr;
282 FSWriteState = STATE_IDLE;
283 FSReadState = STATE_IDLE;
284 SWWriteState = STATE_IDLE;
288 fs_pr = (pilot_request *)&fs_pilot_req.data;
291 pilotsock = socket(AF_INET,SOCK_DGRAM,0);
293 if ( pilotsock == INVALID_SOCKET )
295 printf("Unable to open a socket.\n");
300 memset( &sockaddr, 0, sizeof(SOCKADDR_IN) );
301 sockaddr.sin_family = AF_INET;
302 sockaddr.sin_addr.s_addr = INADDR_ANY;
303 sockaddr.sin_port = 0;//htons(REGPORT);
306 if (SOCKET_ERROR==bind(pilotsock, (SOCKADDR*)&sockaddr, sizeof (sockaddr)))
308 printf("Unable to bind a socket.\n");
309 printf("WSAGetLastError() returned %d.\n",WSAGetLastError());
314 // iaddr = inet_addr ( Multi_user_tracker_ip_address );
316 // first try and resolve by name
317 iaddr = inet_addr( Multi_options_g.user_tracker_ip );
318 if ( iaddr == INADDR_NONE ) {
320 he = gethostbyname( Multi_options_g.user_tracker_ip );
325 // try and resolve by address
326 unsigned int n_order = inet_addr(Multi_user_tracker_ip_address);
327 he = gethostbyaddr((char*)&n_order,4,PF_INET);
334 memcpy(&iaddr, he->h_addr_list[0],4);
337 memcpy(&ptrackaddr.sin_addr.s_addr, &iaddr, 4);
338 ptrackaddr.sin_family = AF_INET;
339 ptrackaddr.sin_port = htons(REGPORT);
345 // -3 Error -- Called with NULL, but no request is waiting
346 // -2 Error -- Already sending data (hasn't timed out yet)
347 // -1 Timeout trying to send pilot data
349 // 1 Data succesfully sent
350 // 2 Send Cancelled (data may still have been written already, we just haven't been ACK'd yet)
351 // 3 Pilot not written (for some reason)
353 // Call with NULL to poll
354 // Call with -1 to cancel send
355 // Call with valid pointer to a vmt_descent3_struct to initiate send
357 int SendFSPilotData(vmt_freespace_struct *fs_pilot)
359 int SendFSPilotData(vmt_freespace2_struct *fs_pilot)
362 //First check the network
367 if(FSWriteState == STATE_IDLE)
371 if(FSWriteState == STATE_SENDING_PILOT)
375 if(FSWriteState == STATE_WROTE_PILOT)
377 //We wrote this pilot, and now we are about to inform the app, so back to idle
378 FSWriteState = STATE_IDLE;
381 if(FSWriteState == STATE_TIMED_OUT)
383 //We gave up on sending this pilot, and now we are about to inform the app, so back to idle
384 FSWriteState = STATE_IDLE;
388 if(FSWriteState == STATE_WRITE_PILOT_FAILED)
390 //The tracker said this dude couldn't be written
391 FSWriteState = STATE_IDLE;
397 else if(fs_pilot == (vmt_freespace2_struct*)0xffffffff)
399 if(FSWriteState == STATE_IDLE)
406 FSWriteState = STATE_IDLE;
412 else if(FSWriteState == STATE_IDLE)
414 //New request, send out the req, and go for it.
416 FSWriteState = STATE_SENDING_PILOT;
419 FSFirstSentWrite = timer_get_milliseconds();
421 fs_pilot_write.type = UNT_PILOT_DATA_WRITE_NEW;
423 fs_pilot_write.len = PACKED_HEADER_ONLY_SIZE+sizeof(vmt_freespace_struct);
424 fs_pilot_write.code = CMD_GAME_FREESPACE;
425 memcpy(&fs_pilot_write.data,fs_pilot,sizeof(vmt_freespace_struct));
427 fs_pilot_write.len = PACKED_HEADER_ONLY_SIZE+sizeof(vmt_freespace2_struct);
428 fs_pilot_write.code = CMD_GAME_FREESPACE2;
429 memcpy(&fs_pilot_write.data,fs_pilot,sizeof(vmt_freespace2_struct));
438 // -3 Error -- Called with NULL, but no request is waiting
439 // -2 Error -- Already sending data (hasn't timed out yet)
440 // -1 Timeout trying to send pilot data
442 // 1 Data succesfully sent
443 // 2 Send Cancelled (data may still have been written already, we just haven't been ACK'd yet)
444 // 3 Pilot not written (for some reason)
446 // Call with NULL to poll
447 // Call with -1 to cancel send
448 // Call with valid pointer to a vmt_descent3_struct to initiate send
449 int SendSWData(squad_war_result *sw_res, squad_war_response *sw_resp)
451 //First check the network
455 if(SWWriteState == STATE_IDLE){
458 if(SWWriteState == STATE_SENDING_PILOT){
462 // fill in the response
463 if(SWWriteState == STATE_WROTE_PILOT){
464 // We wrote this pilot, and now we are about to inform the app, so back to idle
465 SWWriteState = STATE_IDLE;
468 memcpy(sw_resp, &SquadWarWriteResponse, sizeof(squad_war_response));
472 // fill in the response
473 if(SWWriteState == STATE_WRITE_PILOT_FAILED){
474 // The tracker said this dude couldn't be written
475 SWWriteState = STATE_IDLE;
478 memcpy(sw_resp, &SquadWarWriteResponse, sizeof(squad_war_response));
483 if(SWWriteState == STATE_TIMED_OUT){
484 // We gave up on sending this pilot, and now we are about to inform the app, so back to idle
485 SWWriteState = STATE_IDLE;
489 } else if(sw_res == (squad_war_result*)0xffffffff){
490 if(SWWriteState == STATE_IDLE){
494 SWWriteState = STATE_IDLE;
498 } else if(SWWriteState == STATE_IDLE) {
499 //New request, send out the req, and go for it.
501 SWWriteState = STATE_SENDING_PILOT;
504 SWFirstSentWrite = timer_get_milliseconds();
506 sw_res_write.len = PACKED_HEADER_ONLY_SIZE+sizeof(squad_war_result);
507 sw_res_write.type = UNT_SW_RESULT_WRITE;
509 sw_res_write.code = CMD_GAME_FREESPACE;
511 sw_res_write.code = CMD_GAME_FREESPACE2;
513 memcpy(&sw_res_write.data, sw_res, sizeof(squad_war_result));
522 // -3 Error -- Called with NULL, but no request is waiting
523 // -2 Error -- Already waiting on data (hasn't timed out yet)
524 // -1 Timeout waiting for pilot data
525 // 0 Waiting for data
530 // Call with NULL to poll
531 // Call with -1 to cancel wait
532 // Call with valid pointer to a vmt_descent3_struct to get a response
534 int GetFSPilotData(vmt_freespace_struct *fs_pilot, const char *pilot_name, const char *tracker_id, int get_security)
536 int GetFSPilotData(vmt_freespace2_struct *fs_pilot, const char *pilot_name, const char *tracker_id, int get_security)
539 //First check the network
544 if(FSReadState == STATE_IDLE)
548 if(FSReadState == STATE_READING_PILOT)
552 if(FSReadState == STATE_RECEIVED_PILOT)
554 // We got this pilot, and now we are about to inform the app, so back to idle
555 FSReadState = STATE_IDLE;
559 if(FSReadState == STATE_TIMED_OUT)
561 // We gave up on this pilot, and now we are about to inform the app, so back to idle
562 FSReadState = STATE_IDLE;
566 if(FSReadState == STATE_PILOT_NOT_FOUND)
568 //The tracker said this dude is not found.
569 FSReadState = STATE_IDLE;
575 else if(fs_pilot == (vmt_freespace2_struct*)0xffffffff)
577 if(FSReadState == STATE_IDLE)
584 FSReadState = STATE_IDLE;
590 else if(FSReadState == STATE_IDLE)
592 //New request, send out the req, and go for it.
594 FSReadState = STATE_READING_PILOT;
595 ReadFSPilot = fs_pilot;
597 FSFirstSent = timer_get_milliseconds();
599 fs_pilot_req.len = PACKED_HEADER_ONLY_SIZE+sizeof(pilot_request);
602 fs_pilot_req.type = UNT_PILOT_DATA_READ_NEW;
604 fs_pilot_req.type = UNT_PILOT_DATA_READ;
608 fs_pilot_req.code = CMD_GAME_FREESPACE;
610 fs_pilot_req.code = CMD_GAME_FREESPACE2;
612 strcpy(fs_pr->pilot_name,pilot_name);
613 strncpy(fs_pr->tracker_id,tracker_id,TRACKER_ID_LEN);
621 // Send an ACK to the server
622 void AckServer(unsigned int sig)
624 udp_packet_header ack_pack;
625 ubyte packet_data[sizeof(udp_packet_header)];
626 int packet_length = 0;
628 ack_pack.type = UNT_CONTROL;
630 ack_pack.code = CMD_CLIENT_RECEIVED;
631 ack_pack.len = PACKED_HEADER_ONLY_SIZE;
633 packet_length = SerializePilotPacket(&ack_pack, packet_data);
634 SDL_assert(packet_length == PACKED_HEADER_ONLY_SIZE);
635 SENDTO(Unreliable_socket, (char *)&packet_data, packet_length, 0, (SOCKADDR *)&ptrackaddr, sizeof(SOCKADDR_IN), PSNET_TYPE_USER_TRACKER);
640 ubyte packet_data[sizeof(udp_packet_header)];
641 int packet_length = 0;
643 PSNET_TOP_LAYER_PROCESS();
645 // reading pilot data
646 if(FSReadState == STATE_READING_PILOT){
647 if((timer_get_milliseconds()-FSFirstSent)>=PILOT_REQ_TIMEOUT){
648 FSReadState = STATE_TIMED_OUT;
649 } else if((timer_get_milliseconds()-FSLastSent)>=PILOT_REQ_RESEND_TIME){
651 packet_length = SerializeValidatePacket(&fs_pilot_req, packet_data);
652 SENDTO(Unreliable_socket, (char *)&packet_data, packet_length, 0, (SOCKADDR *)&ptrackaddr, sizeof(SOCKADDR_IN), PSNET_TYPE_USER_TRACKER);
653 FSLastSent = timer_get_milliseconds();
657 // writing pilot data
658 if(FSWriteState == STATE_SENDING_PILOT){
659 if((timer_get_milliseconds()-FSFirstSentWrite)>=PILOT_REQ_TIMEOUT){
660 FSWriteState = STATE_TIMED_OUT;
662 } else if((timer_get_milliseconds()-FSLastSentWrite)>=PILOT_REQ_RESEND_TIME){
664 packet_length = SerializeValidatePacket(&fs_pilot_write, packet_data);
665 SENDTO(Unreliable_socket, (char *)&packet_data, packet_length, 0, (SOCKADDR *)&ptrackaddr, sizeof(SOCKADDR_IN), PSNET_TYPE_USER_TRACKER);
666 FSLastSentWrite = timer_get_milliseconds();
670 // writing squad war results
671 if(SWWriteState == STATE_SENDING_PILOT){
672 if((timer_get_milliseconds()-SWFirstSentWrite) >= PILOT_REQ_TIMEOUT){
673 SWWriteState = STATE_TIMED_OUT;
674 } else if((timer_get_milliseconds()-SWLastSentWrite) >= PILOT_REQ_RESEND_TIME){
676 packet_length = SerializeValidatePacket(&sw_res_write, packet_data);
677 SENDTO(Unreliable_socket, (char *)&packet_data, packet_length, 0, (SOCKADDR *)&ptrackaddr, sizeof(SOCKADDR_IN), PSNET_TYPE_USER_TRACKER);
678 SWLastSentWrite = timer_get_milliseconds();
694 FD_SET(Unreliable_socket, &read_fds);
697 if(SELECT(0, &read_fds,NULL,NULL,&timeout, PSNET_TYPE_USER_TRACKER)){
699 if(SELECT(Unreliable_socket+1, &read_fds,NULL,NULL,&timeout, PSNET_TYPE_USER_TRACKER)){
703 SOCKADDR_IN fromaddr;
705 udp_packet_header inpacket;
706 addrsize = sizeof(SOCKADDR_IN);
708 bytesin = RECVFROM(Unreliable_socket, (char *)&inpacket,sizeof(udp_packet_header),0,(SOCKADDR *)&fromaddr,&addrsize, PSNET_TYPE_USER_TRACKER);
710 int wserr=WSAGetLastError();
711 printf("recvfrom() failure. WSAGetLastError() returned %d\n",wserr);
715 // decrease packet size by 1
718 //Check to make sure the packets ok
719 if(bytesin==inpacket.len){
720 switch(inpacket.type){
721 case UNT_PILOT_DATA_RESPONSE:
722 if(inpacket.code == CMD_GAME_FREESPACE2){
726 if(FSReadState == STATE_READING_PILOT){
727 vmt_freespace2_struct *stats;
729 // 9/17/98 MWA. Compare the tracker id of this packet with the tracker id of
730 // what we are expecting. Only set our state to something different when
731 // the tracker id's match. This fixes possible multiple packets for a single pilto
732 // accidentally getting set for the wrong pilot
734 stats = (vmt_freespace2_struct *)(&inpacket.data);
735 if ( !SDL_strncasecmp(stats->tracker_id, fs_pr->tracker_id,TRACKER_ID_LEN) ) {
737 memcpy(ReadFSPilot,&inpacket.data,sizeof(vmt_freespace2_struct));
739 FSReadState = STATE_RECEIVED_PILOT;
743 } else if(inpacket.code == CMD_GAME_FREESPACE){
747 if(FSReadState == STATE_READING_PILOT){
748 vmt_freespace_struct *stats;
750 // 9/17/98 MWA. Compare the tracker id of this packet with the tracker id of
751 // what we are expecting. Only set our state to something different when
752 // the tracker id's match. This fixes possible multiple packets for a single pilto
753 // accidentally getting set for the wrong pilot
755 stats = (vmt_freespace_struct *)(&inpacket.data);
756 if ( !SDL_strncasecmp(stats->tracker_id, fs_pr->tracker_id,TRACKER_ID_LEN) ) {
758 memcpy(ReadFSPilot,&inpacket.data,sizeof(vmt_freespace_struct));
760 FSReadState = STATE_RECEIVED_PILOT;
769 case UNT_PILOT_READ_FAILED:
770 if(inpacket.code == CMD_GAME_FREESPACE2){
774 if(FSReadState == STATE_READING_PILOT){
775 FSReadState = STATE_PILOT_NOT_FOUND;
778 } else if(inpacket.code == CMD_GAME_FREESPACE){
782 if(FSReadState == STATE_READING_PILOT){
783 FSReadState = STATE_PILOT_NOT_FOUND;
791 case UNT_PILOT_WRITE_SUCCESS:
792 if(inpacket.code == CMD_GAME_FREESPACE2){
796 if(FSWriteState == STATE_SENDING_PILOT){
797 FSWriteState = STATE_WROTE_PILOT;
800 } else if(inpacket.code == CMD_GAME_FREESPACE){
804 if(FSWriteState == STATE_SENDING_PILOT){
805 FSWriteState = STATE_WROTE_PILOT;
813 case UNT_PILOT_WRITE_FAILED:
814 if(inpacket.code == CMD_GAME_FREESPACE2){
818 if(FSWriteState == STATE_SENDING_PILOT){
819 FSWriteState = STATE_WRITE_PILOT_FAILED;
822 } else if(inpacket.code == CMD_GAME_FREESPACE){
826 if(FSWriteState == STATE_SENDING_PILOT){
827 FSWriteState = STATE_WRITE_PILOT_FAILED;
835 case UNT_SW_RESULT_RESPONSE:
836 if(SWWriteState == STATE_SENDING_PILOT){
838 SDL_assert((bytesin - PACKED_HEADER_ONLY_SIZE) == sizeof(squad_war_response));
839 if((bytesin - PACKED_HEADER_ONLY_SIZE) == sizeof(squad_war_response)){
840 memset(&SquadWarWriteResponse, 0, sizeof(squad_war_response));
841 memcpy(&SquadWarWriteResponse, inpacket.data, sizeof(squad_war_response));
843 // now check to see if we're good
844 if(SquadWarWriteResponse.accepted){
845 SWWriteState = STATE_WROTE_PILOT;
847 SWWriteState = STATE_WRITE_PILOT_FAILED;
850 SWWriteState = STATE_WRITE_PILOT_FAILED;
859 case UNT_CONTROL_VALIDATION:
866 AckServer(inpacket.sig);