packet.h
上传用户:tany51
上传日期:2013-06-12
资源大小:1397k
文件大小:21k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /*
  2.  * Copyright (C) 1998  Mark Baysinger (mbaysng@ucsd.edu)
  3.  * Copyright (C) 1998,1999,2000  Ross Combs (rocombs@cs.nmsu.edu)
  4.  *
  5.  * This program is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU General Public License
  7.  * as published by the Free Software Foundation; either version 2
  8.  * of the License, or (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  */
  19. #ifndef INCLUDED_PACKET_TYPES
  20. #define INCLUDED_PACKET_TYPES
  21. #ifdef JUST_NEED_TYPES
  22. # include "common/field_sizes.h"
  23. # include "common/init_protocol.h"
  24. # include "common/bnet_protocol.h"
  25. # include "common/anongame_protocol.h"
  26. # include "common/file_protocol.h"
  27. # include "common/bot_protocol.h"
  28. # include "common/udp_protocol.h"
  29. # include "common/d2game_protocol.h"
  30. # include "d2cs/d2cs_protocol.h"
  31. # include "d2cs/d2cs_d2gs_protocol.h"
  32. # include "d2cs/d2cs_bnetd_protocol.h"
  33. # include "common/auth_protocol.h"
  34. # include "common/w3xp_protocol.h"
  35. #else
  36. # define JUST_NEED_TYPES
  37. # include "common/field_sizes.h"
  38. # include "common/init_protocol.h"
  39. # include "common/bnet_protocol.h"
  40. # include "common/anongame_protocol.h"
  41. # include "common/file_protocol.h"
  42. # include "common/bot_protocol.h"
  43. # include "common/udp_protocol.h"
  44. # include "common/d2game_protocol.h"
  45. # include "d2cs/d2cs_protocol.h"
  46. # include "d2cs/d2cs_d2gs_protocol.h"
  47. # include "d2cs/d2cs_bnetd_protocol.h"
  48. # include "common/auth_protocol.h"
  49. # include "common/w3xp_protocol.h"
  50. # undef JUST_NEED_TYPES
  51. #endif
  52. typedef enum
  53. {
  54.     packet_class_none,
  55.     packet_class_init,
  56.     packet_class_bnet,
  57.     packet_class_file,
  58.     packet_class_raw,
  59.     packet_class_udp,
  60.     packet_class_d2game,
  61.     packet_class_d2gs,
  62.     packet_class_d2cs,
  63.     packet_class_d2cs_bnetd,
  64.     packet_class_auth,
  65.     packet_class_w3route
  66. } t_packet_class;
  67. typedef enum
  68. {
  69.     packet_dir_from_client,
  70.     packet_dir_from_server
  71. } t_packet_dir;
  72. /* These aren't really packets so much as records in a TCP stream. They are variable-
  73.  * length structures which make up the Battle.net protocol. It is just easier to call
  74.  * them "packets".
  75.  */
  76. typedef struct
  77. {
  78.     unsigned int   ref;   /* reference count */
  79.     t_packet_class class;
  80.     unsigned int   flags; /* user-defined flags (used to mark UDP in bnproxy) */
  81.     unsigned int   len;   /* raw packets have no header, so we use this */
  82.     
  83.     /* next part looks just like it would on the network (no padding, byte for byte) */
  84.     union
  85.     {
  86.         char data[MAX_PACKET_SIZE];
  87.         
  88.         t_bnet_generic   bnet;
  89.         t_file_generic   file;
  90.         t_udp_generic    udp;
  91.         t_d2game_generic d2game;
  92. t_auth_generic   auth;
  93. t_w3route_generic w3route;
  94.         
  95. t_client_initconn client_initconn;
  96.         t_server_authreply1         server_authreply1;
  97.         t_server_authreq1           server_authreq1;
  98.         t_client_authreq1           client_authreq1;
  99.         t_server_authreply_109      server_authreply_109;
  100.         t_server_authreq_109        server_authreq_109;
  101.         t_client_authreq_109        client_authreq_109;
  102.         t_client_cdkey              client_cdkey;
  103.         t_server_cdkeyreply         server_cdkeyreply;
  104.         t_client_statsreq           client_statsreq;
  105.         t_server_statsreply         server_statsreply;
  106.         t_client_loginreq1          client_loginreq1;
  107.         t_server_loginreply1        server_loginreply1;
  108.         t_client_progident          client_progident;
  109.         t_client_progident2         client_progident2;
  110.         t_client_joinchannel        client_joinchannel;
  111.         t_server_channellist        server_channellist;
  112.         t_server_serverlist         server_serverlist;
  113.         t_server_message            server_message;
  114.         t_client_message            client_message;
  115.         t_client_gamelistreq        client_gamelistreq;
  116.         t_server_gamelistreply      server_gamelistreply;
  117.         t_client_udpok              client_udpok;
  118.         t_client_unknown_1b         client_unknown_1b;
  119.         t_client_startgame1         client_startgame1;
  120.         t_server_startgame1_ack     server_startgame1_ack;
  121.         t_client_startgame3         client_startgame3;
  122.         t_server_startgame3_ack     server_startgame3_ack;
  123.         t_client_startgame4         client_startgame4;
  124.         t_server_startgame4_ack     server_startgame4_ack;
  125.         t_client_leavechannel       client_leavechannel;
  126.         t_client_closegame          client_closegame;
  127.         t_client_mapauthreq1        client_mapauthreq1;
  128.         t_server_mapauthreply1      server_mapauthreply1;
  129.         t_client_mapauthreq2        client_mapauthreq2;
  130.         t_server_mapauthreply2      server_mapauthreply2;
  131.         t_client_ladderreq          client_ladderreq;
  132.         t_server_ladderreply        server_ladderreply;
  133. t_client_laddersearchreq    client_laddersearchreq;
  134. t_server_laddersearchreply  server_laddersearchreply;
  135.         t_client_adreq              client_adreq;
  136.         t_server_adreply            server_adreply;
  137.         t_client_adack              client_adack;
  138. t_client_adclick            client_adclick;
  139. t_client_adclick2           client_adclick2;
  140. t_server_adclickreply2      server_adclickreply2;
  141.         t_client_game_report        client_gamerep;
  142.         t_server_sessionkey1        server_sessionkey1;
  143.         t_server_sessionkey2        server_sessionkey2;
  144.         t_client_createacctreq1     client_createacctreq1;
  145.         t_server_createacctreply1   server_createacctreply1;
  146.         t_client_changepassreq      client_changepassreq;
  147.         t_server_changepassack      server_changepassack;
  148.         t_client_iconreq            client_iconreq;
  149.         t_server_iconreply          server_iconreply;
  150.         t_client_fileinforeq        client_fileinforeq;
  151.         t_server_fileinforeply      server_fileinforeply;
  152.         t_client_statsupdate        client_statsupdate;
  153.         t_client_countryinfo1       client_countryinfo1;
  154.         t_client_countryinfo_109    client_countryinfo_109;
  155.         t_client_unknown_2b         client_unknown_2b;
  156.         t_client_compinfo1          client_compinfo1;
  157.         t_client_compinfo2          client_compinfo2;
  158.         t_server_compreply          server_compreply;
  159.         t_server_echoreq            server_echoreq;
  160.         t_client_echoreply          client_echoreply;
  161.         t_client_playerinforeq      client_playerinforeq;
  162.         t_server_playerinforeply    server_playerinforeply;
  163. t_client_pingreq            client_pingreq;
  164. t_server_pingreply          server_pingreply;
  165.         t_client_cdkey2             client_cdkey2;
  166.         t_server_cdkeyreply2        server_cdkeyreply2;
  167.         t_client_cdkey3             client_cdkey3;
  168.         t_server_cdkeyreply3        server_cdkeyreply3;
  169.         t_server_regsnoopreq        server_regsnoopreq;
  170.         t_client_regsnoopreply      client_regsnoopreply;
  171.         t_client_realmlistreq       client_realmlistreq;
  172.         t_client_realmlistreq_110   client_realmlistreq_110;
  173.         t_server_realmlistreply     server_realmlistreply;
  174.         t_server_realmlistreply_110 server_realmlistreply_110;
  175.         t_client_realmjoinreq       client_realmjoinreq;
  176.         t_server_realmjoinreply     server_realmjoinreply;
  177.         t_client_realmjoinreq_109   client_realmjoinreq_109;
  178.         t_server_realmjoinreply_109 server_realmjoinreply_109;
  179.         t_client_unknown_37         client_unknown_37;
  180.         t_server_unknown_37         server_unknown_37;
  181.         t_client_unknown_39         client_unknown_39;
  182.         t_client_loginreq2          client_loginreq2;
  183.         t_server_loginreply2        server_loginreply2;
  184.         t_client_loginreq_w3          client_loginreq_w3;
  185.         t_server_loginreply_w3        server_loginreply_w3;
  186. t_client_createacctreq2     client_createacctreq2;
  187. t_server_createacctreply2   server_createacctreply2;
  188. t_client_changegameport    client_changegameport;
  189. t_client_file_req          client_file_req;
  190. t_server_file_reply        server_file_reply;
  191. /* ADDED BY UNDYING SOULZZ 4/3/02 */
  192. t_server_file_unknown1    server_file_unknown1;
  193. t_client_war3113_file_req  client_war3113_file_req;
  194. t_server_udptest           server_udptest;
  195. t_client_udpping           client_udpping;
  196. t_client_sessionaddr1      client_sessionaddr1;
  197. t_client_sessionaddr2      client_sessionaddr2;
  198. t_client_authloginreq      client_authloginreq;
  199. t_server_authloginreply    server_authloginreply;
  200. t_client_createcharreq     client_createcharreq;
  201. t_server_createcharreply   server_createcharreply;
  202. t_client_creategamereq     client_creategamereq;
  203. t_server_creategamereply   server_creategamereply;
  204. t_client_joingamereq2      client_joingamereq2;
  205. t_server_joingamereply2    server_joingamereply2;
  206. t_server_creategame_wait   server_creategame_wait;
  207. t_client_cancel_create     client_cancel_create;
  208. t_client_d2gamelistreq     client_d2gamelistreq;
  209. t_server_d2gamelistreply   server_d2gamelistreply;
  210. t_client_gameinforeq       client_gameinforeq;
  211. t_server_gameinforeply     server_gameinforeply;
  212. t_client_charloginreq      client_charloginreq;
  213. t_server_charloginreply    server_charloginreply;
  214. t_client_deletecharreq     client_deletecharreq;
  215. t_server_deletecharreply   server_deletecharreply;
  216. t_client_motd_w3           client_motd_w3;
  217. t_server_motd_w3           server_motd_w3;
  218. t_client_logonproofreq     client_logonproofreq;
  219. t_server_logonproofreply   server_logonproofreply;
  220. t_client_createaccount_w3  client_createaccount_w3;
  221. t_server_createaccount_w3  server_createaccount_w3;
  222. t_client_findanongame      client_findanongame;
  223. t_client_findanongame_at   client_findanongame_at;
  224. t_client_findanongame_at_inv   client_findanongame_at_inv;
  225. // 5/12/02 EDITED BY THEUNDYING for WC3 1.31+
  226. t_server_findanongame_playgame_cancel server_findanongame_playgame_cancel;
  227. t_server_anongame_found server_anongame_found;
  228. //t_server_w3profile_reply      server_w3profile_reply;
  229.     t_client_ladderreq2        client_ladderreq2;
  230. t_server_ladderreply2      server_ladderreply2;
  231. t_client_authmotdreq       client_authmotdreq;
  232. t_server_authmotdreply     server_authmotdreply;
  233. t_client_charlistreq       client_charlistreq;
  234. t_server_charlistreply     server_charlistreply;
  235. t_client_convertcharreq    client_convertcharreq;
  236. t_server_convertcharreply  server_convertcharreply;
  237.         t_d2cs_bnetd_generic            d2cs_bnetd;
  238.         t_bnetd_d2cs_authreq            bnetd_d2cs_authreq;
  239.         t_d2cs_bnetd_authreply          d2cs_bnetd_authreply;
  240.         t_bnetd_d2cs_authreply          bnetd_d2cs_authreply;
  241.         t_d2cs_bnetd_accountloginreq    d2cs_bnetd_accountloginreq;
  242.         t_bnetd_d2cs_accountloginreply  bnetd_d2cs_accountloginreply;
  243.         t_d2cs_bnetd_charloginreq       d2cs_bnetd_charloginreq;
  244.         t_bnetd_d2cs_charloginreply     bnetd_d2cs_charloginreply;
  245.         t_d2cs_d2gs_generic             d2cs_d2gs;
  246.         t_d2cs_d2gs_authreq             d2cs_d2gs_authreq;
  247.         t_d2gs_d2cs_authreply           d2gs_d2cs_authreply;
  248.         t_d2cs_d2gs_authreply           d2cs_d2gs_authreply;
  249. t_d2cs_d2gs_setinitinfo         d2cs_d2gs_setinitinfo;
  250. t_d2cs_d2gs_setgsinfo           d2cs_d2gs_setgsinfo;
  251.         t_d2gs_d2cs_setgsinfo           d2gs_d2cs_setgsinfo;
  252.         t_d2cs_d2gs_creategamereq       d2cs_d2gs_creategamereq;
  253.         t_d2gs_d2cs_creategamereply     d2gs_d2cs_creategamereply;
  254.         t_d2cs_d2gs_joingamereq         d2cs_d2gs_joingamereq;
  255.         t_d2gs_d2cs_joingamereply       d2gs_d2cs_joingamereply;
  256.         t_d2gs_d2cs_updategameinfo      d2gs_d2cs_updategameinfo;
  257.         t_d2gs_d2cs_closegame           d2gs_d2cs_closegame;
  258.         t_d2cs_d2gs_echoreq             d2cs_d2gs_echoreq;
  259.         t_d2gs_d2cs_echoreply           d2gs_d2cs_echoreply;
  260. t_d2cs_d2gs_control             d2cs_d2gs_control;
  261. t_d2cs_d2gs_setconffile d2cs_d2gs_setconffile;
  262.         t_d2cs_client_generic           d2cs_client;
  263.         t_client_d2cs_loginreq          client_d2cs_loginreq;
  264.         t_d2cs_client_loginreply        d2cs_client_loginreply;
  265.         t_client_d2cs_createcharreq     client_d2cs_createcharreq;
  266.         t_d2cs_client_createcharreply   d2cs_client_createcharreply;
  267.         t_client_d2cs_creategamereq     client_d2cs_creategamereq;
  268.         t_d2cs_client_creategamereply   d2cs_client_creategamereply;
  269.         t_client_d2cs_joingamereq       client_d2cs_joingamereq;
  270.         t_d2cs_client_joingamereply     d2cs_client_joingamereply;
  271.         t_client_d2cs_gamelistreq       client_d2cs_gamelistreq;
  272.         t_d2cs_client_gamelistreply     d2cs_client_gamelistreply;
  273.         t_client_d2cs_gameinforeq       client_d2cs_gameinforeq;
  274.         t_d2cs_client_gameinforeply     d2cs_client_gameinforeply;
  275.         t_client_d2cs_charloginreq      client_d2cs_charloginreq;
  276.         t_d2cs_client_charloginreply    d2cs_client_charloginreply;
  277.         t_client_d2cs_deletecharreq     client_d2cs_deletecharreq;
  278.         t_d2cs_client_deletecharreply   d2cs_client_deletecharreply;
  279.         t_client_d2cs_ladderreq         client_d2cs_ladderreq;
  280.         t_d2cs_client_ladderreply       d2cs_client_ladderreply;
  281.         t_client_d2cs_motdreq           client_d2cs_motdreq;
  282.         t_d2cs_client_motdreply         d2cs_client_motdreply;
  283.         t_client_d2cs_cancelcreategame  client_d2cs_cancelcreategame;
  284.         t_d2cs_client_creategamewait    d2cs_client_creategamewait;
  285.         t_client_d2cs_charladderreq     client_d2cs_charladderreq;
  286.         t_client_d2cs_charlistreq       client_d2cs_charlistreq;
  287.         t_d2cs_client_charlistreply     d2cs_client_charlistreply;
  288.         t_client_d2cs_charlistreq_110   client_d2cs_charlistreq_110;
  289.         t_d2cs_client_charlistreply_110 d2cs_client_charlistreply_110;
  290.         t_client_d2cs_convertcharreq    client_d2cs_convertcharreq;
  291.         t_d2cs_client_convertcharreply  d2cs_client_convertcharreply;
  292. // 5/14/02 - THEUNDYING - USED FOR THE FRIENDS LIST
  293. // [zap-zero] 20020516
  294. t_client_friendslistreq client_friendslistreq;
  295. t_server_friendslistreply server_friendslistreply;
  296. t_client_friendinforeq client_friendinforeq;
  297. t_server_friendinforeply server_friendinforeply;
  298. t_server_friendadd_ack server_friendadd_ack;
  299. t_server_frienddel_ack server_frienddel_ack;
  300. t_server_friendmove_ack server_friendmove_ack;
  301. // 5/19/02 - THEUNDYING - used for arranged teams
  302. t_client_arrangedteam_friendscreen client_arrangedteam_friendscreen;
  303. t_server_arrangedteam_friendscreen server_arrangedteam_friendscreen;
  304. t_client_arrangedteam_invite_friend client_arrangedteam_invite_friend;
  305. t_server_arrangedteam_invite_friend_ack server_arrangedteam_invite_friend_ack;
  306. t_server_arrangedteam_send_invite server_arrangedteam_send_invite;
  307. t_client_arrangedteam_accept_invite    client_arrangedteam_accept_invite;
  308. t_client_arrangedteam_accept_decline_invite    client_arrangedteam_accept_decline_invite;
  309. t_server_arrangedteam_member_decline    server_arrangedteam_member_decline;
  310. // 5/24/02 - THEUNDYING - updates for ANONGAME PROFILE PACKET
  311. t_client_findanongame_profile client_findanongame_profile;
  312. /* dizzy : war3 1.03 has changed format */
  313. t_server_findanongame_profile2 server_findanongame_profile2;
  314. // [zap-zero] 20020529
  315. t_client_w3route_req client_w3route_req;
  316. t_server_w3route_ack server_w3route_ack;
  317. t_server_w3route_playerinfo server_w3route_playerinfo;
  318. t_server_w3route_levelinfo server_w3route_levelinfo;
  319. t_server_w3route_startgame1 server_w3route_startgame1;
  320. t_server_w3route_startgame2 server_w3route_startgame2;
  321. t_client_w3route_loadingdone client_w3route_loadingdone;
  322. t_server_w3route_loadingack server_w3route_loadingack;
  323. t_client_w3route_connected client_w3route_connected;
  324. t_server_w3route_echoreq server_w3route_echoreq;
  325. t_client_w3route_abort client_w3route_abort;
  326. t_server_w3route_ready server_w3route_host;
  327. t_client_w3route_gameresult client_w3route_gameresult;
  328. t_client_findanongame_inforeq client_findanongame_inforeq;
  329. t_server_findanongame_inforeply server_findanongame_inforeply;
  330. t_client_w3xp_clan_invitereq        client_w3xp_clan_invitereq;
  331.     t_server_w3xp_clan_invitereply      server_w3xp_clan_invitereply;
  332. t_server_w3xp_clan_invitereq        server_w3xp_clan_invitereq;
  333. t_client_w3xp_clan_invitereply      client_w3xp_clan_invitereply;
  334. t_client_w3xp_clan_disbandreq       client_w3xp_clan_disbandreq;
  335. t_server_w3xp_clan_disbandreply     server_w3xp_clan_disbandreply;
  336. t_client_w3xp_clan_motdchg          client_w3xp_clan_motdchg;
  337. t_client_w3xp_clan_motdreq          client_w3xp_clan_motdreq;
  338. t_server_w3xp_clan_motdreply        server_w3xp_clan_motdreply;
  339. t_client_w3xp_clan_memberreq        client_w3xp_clan_memberreq;
  340. t_server_w3xp_clan_memberreply      server_w3xp_clan_memberreply;
  341.     t_client_w3xp_clan_createreq        client_w3xp_clan_createreq;
  342. t_server_w3xp_clan_createreply      server_w3xp_clan_createreply;
  343. t_client_w3xp_clan_createinvitereq  client_w3xp_clan_createinvitereq;
  344.     t_server_w3xp_clan_createinvitereply    server_w3xp_clan_createinvitereply;
  345. t_server_w3xp_clan_createinvitereq  server_w3xp_clan_createinvitereq;
  346.     t_client_w3xp_clan_createinvitereply    client_w3xp_clan_createinvitereply;
  347.     t_server_w3xp_clan_clanack     server_w3xp_clan_clanack;
  348.     t_server_w3xp_clan_memberchangeack      server_w3xp_clan_memberchangeack;
  349.     t_client_w3xp_clan_memberchangereq      client_w3xp_clan_memberchangereq;
  350.     t_server_w3xp_clan_memberchangereply    server_w3xp_clan_memberchangereply;
  351.     t_client_w3xp_clan_memberdelreq         client_w3xp_clan_memberdelreq;
  352.     t_server_w3xp_clan_memberdelreply       server_w3xp_clan_memberdelreply;
  353.     t_client_w3xp_clan_membernewchiefreq    client_w3xp_clan_membernewchiefreq;
  354.     t_server_w3xp_clan_membernewchiefreply  server_w3xp_clan_membernewchiefreply;
  355.     t_server_w3xp_clan_clanleaveack         server_w3xp_clan_clanleaveack;
  356.     t_server_w3xp_clan_memberleaveack       server_w3xp_clan_memberleaveack;
  357. t_server_findanongame_iconreply server_findanongame_iconreply;
  358. t_client_changeclient client_changeclient;
  359. /* restructure anongame [Omega] */
  360. t_client_anongame client_anongame;
  361. t_server_anongame_search_reply server_anongame_search_reply;
  362. t_client_anongame_tournament_request client_anongame_tournament_request;
  363. t_server_anongame_tournament_reply server_anongame_tournament_reply;
  364.     /* new packets supporting D2 1.10 & War3 1.13 */
  365.     t_client_setemailreply    client_setemailreq;
  366. t_server_setemailreq    server_setemailreply;
  367. t_client_getpasswordreq    client_getpasswordreq;
  368. t_client_changeemailreq    client_changeemailreq;
  369. t_client_crashdump    client_crashdump;
  370. } u;
  371. } t_packet;
  372. #endif
  373. /*****/
  374. #ifndef JUST_NEED_TYPES
  375. #ifndef INCLUDED_PACKET_PROTOS
  376. #define INCLUDED_PACKET_PROTOS
  377. #ifdef USE_CHECK_ALLOC
  378. extern t_packet * packet_create_real(t_packet_class class, char const * fn, unsigned int ln) ;
  379. # define packet_create(C) packet_create_real(C,__FILE__"{packet_create}",__LINE__)
  380. #else
  381. extern t_packet * packet_create(t_packet_class class) ;
  382. #endif
  383. extern void packet_destroy(t_packet const * packet);
  384. extern t_packet * packet_add_ref(t_packet * packet);
  385. extern void packet_del_ref(t_packet * packet);
  386. extern t_packet_class packet_get_class(t_packet const * packet);
  387. extern char const * packet_get_class_str(t_packet const * packet);
  388. extern int packet_set_class(t_packet * packet, t_packet_class class);
  389. extern unsigned int packet_get_type(t_packet const * packet);
  390. extern char const * packet_get_type_str(t_packet const * packet, t_packet_dir dir);
  391. extern int packet_set_type(t_packet * packet, unsigned int type);
  392. extern unsigned int packet_get_size(t_packet const * packet);
  393. extern int packet_set_size(t_packet * packet, unsigned int size);
  394. extern unsigned int packet_get_header_size(t_packet const * packet);
  395. extern unsigned int packet_get_flags(t_packet const * packet);
  396. extern int packet_set_flags(t_packet * packet, unsigned int flags);
  397. extern int packet_append_string(t_packet * packet, char const * str);
  398. extern int packet_append_ntstring(t_packet * packet, char const * str);
  399. extern int packet_append_data(t_packet * packet, void const * data, unsigned int len);
  400. extern void const * packet_get_raw_data_const(t_packet const * packet, unsigned int offset);
  401. extern void * packet_get_raw_data(t_packet * packet, unsigned int offset);
  402. extern void * packet_get_raw_data_build(t_packet * packet, unsigned int offset);
  403. extern char const * packet_get_str_const(t_packet const * packet, unsigned int offset, unsigned int maxlen);
  404. extern void const * packet_get_data_const(t_packet const * packet, unsigned int offset, unsigned int len);
  405. extern t_packet * packet_duplicate(t_packet const * src);
  406. #endif
  407. #endif