s_bot_command Struct Reference

Collaboration diagram for s_bot_command:

Collaboration graph
[legend]
List of all members.

Detailed Description

Stores command packet.

Author:
VooDooMan
Version:
1
Date:
2004

Definition at line 346 of file botnet.cpp.

Public Member Functions

void flip ()
void hard_clear ()

Public Attributes

uint32 command
 ID of command.
MSVC_ALIGN1 union s_bot_command::u_commnd_data command_data
 Data of command.
uint32 packet_type
 Must be PACKET_TYPE_COMMAND.
uint32 size
 Used for decompressing.
uint32 version
 Version of protocol.

Classes

union  u_commnd_data
 Data of command. More...


Member Function Documentation

void s_bot_command::flip  )  [inline]
 

Definition at line 1110 of file botnet.cpp.

References byteReverse(), s_bot_command::u_commnd_data::check_time_1, CMD_AUTH_1, CMD_CHECK_TIME_1, CMD_NO_REPL_1, s_bot_command::u_commnd_data::cmd_partyline_1, CMD_PARTYLINE_1, s_bot_command::u_commnd_data::cmd_partyline_user_1, CMD_PARTYLINE_USER_1, s_bot_command::u_commnd_data::cmd_proc_1, CMD_PROC_1, CMD_PROC_END_1, s_bot_command::u_commnd_data::cmd_push_1, CMD_PUSH_1, s_bot_command::u_commnd_data::cmd_remote_procedure_call_3, CMD_REMOTE_PROCEDURE_CALL_3, s_bot_command::u_commnd_data::cmd_repl_chdef_01_1, CMD_REPL_CHDEF_01_1, CMD_REPL_CHDEF_02_1, CMD_REPL_CHDEF_03_1, CMD_REPL_CHDEF_04_1, CMD_REPL_CHDEF_05_1, CMD_REPL_CHDEF_06_8, CMD_REPL_CHDEF_99_1, s_bot_command::u_commnd_data::cmd_repl_prv_01_1, CMD_REPL_PRV_01_1, CMD_REPL_PRV_02_1, CMD_REPL_PRV_03_1, CMD_REPL_PRV_04_7, CMD_REPL_PRV_05_8, CMD_REPL_PRV_06_11, CMD_REPL_PRV_99_1, s_bot_command::u_commnd_data::cmd_repl_user_01_1, CMD_REPL_USER_01_1, CMD_REPL_USER_02_1, CMD_REPL_USER_03_1, CMD_REPL_USER_04_1, CMD_REPL_USER_05_1, CMD_REPL_USER_06_1, CMD_REPL_USER_07_1, CMD_REPL_USER_08_1, CMD_REPL_USER_09_1, CMD_REPL_USER_10_1, s_bot_command::u_commnd_data::cmd_repl_user_11_1, CMD_REPL_USER_11_1, s_bot_command::u_commnd_data::cmd_repl_user_12_1, CMD_REPL_USER_12_1, CMD_REPL_USER_13_1, CMD_REPL_USER_14_1, CMD_REPL_USER_15_1, CMD_REPL_USER_16_5, CMD_REPL_USER_17_9, CMD_REPL_USER_99_1, command, command_data, s_bot_command::u_commnd_data::s_cmd_repl_user_11_1::dcc_group, s_bot_command::u_commnd_data::s_cmd_partyline_user_1::id, s_bot_command::u_commnd_data::s_cmd_partyline_1::id, s_bot_command::u_commnd_data::s_cmd_repl_prv_01_1::last_changed, s_bot_command::u_commnd_data::s_cmd_repl_chdef_01_1::last_changed, s_bot_command::u_commnd_data::s_cmd_proc_1::last_changed, s_bot_command::u_commnd_data::s_cmd_repl_user_01_1::last_changed, s_flood::lines, log_debug(), s_bot_command::u_commnd_data::s_cmd_repl_user_12_1::msg_flood_l, s_bot_command::u_commnd_data::no_repl_1, s_bot_command::u_commnd_data::s_cmd_push_1::now, s_bot_command::u_commnd_data::s_check_time_1::now, s_bot_command::u_commnd_data::s_cmd_remote_procedure_call_3::num_args, s_bot_command::u_commnd_data::s_cmd_push_1::original_time, s_bot_command::u_commnd_data::s_check_time_1::original_time, packet_type, PACKET_TYPE_COMMAND, s_bot_command::u_commnd_data::s_cmd_repl_user_01_1::partyline_msg_flood, s_bot_command::u_commnd_data::s_no_repl_1::reason, and s_flood::seconds.

Referenced by botnet_receive(), and botnet_send_command().

01111     {
01112         // we don't want to flip first 4 uint32's because this is done by flip_header(), like it were CONTROL packet
01113         if(packet_type!=PACKET_TYPE_COMMAND)
01114             return;
01115         switch(command) {
01116             case CMD_AUTH_1:
01117                 break;
01118             case CMD_CHECK_TIME_1:
01119                 byteReverse((unsigned char*)&command_data.check_time_1.now,1);
01120                 byteReverse((unsigned char*)&command_data.check_time_1.original_time,1);
01121                 break;
01122             case CMD_NO_REPL_1:
01123                 byteReverse((unsigned char*)&command_data.no_repl_1.reason,1);
01124                 break;
01125             case CMD_REPL_USER_01_1:
01126                 byteReverse((unsigned char*)&command_data.cmd_repl_user_01_1.partyline_msg_flood.lines,1);
01127                 byteReverse((unsigned char*)&command_data.cmd_repl_user_01_1.partyline_msg_flood.seconds,1);
01128                 byteReverse((unsigned char*)&command_data.cmd_repl_user_01_1.last_changed,1);
01129                 break;
01130             case CMD_REPL_USER_02_1:
01131                 break;
01132             case CMD_REPL_USER_03_1:
01133                 break;
01134             case CMD_REPL_USER_04_1:
01135                 break;
01136             case CMD_REPL_USER_05_1:
01137                 break;
01138             case CMD_REPL_USER_06_1:
01139                 break;
01140             case CMD_REPL_USER_07_1:
01141                 break;
01142             case CMD_REPL_USER_08_1:
01143                 break;
01144             case CMD_REPL_USER_09_1:
01145                 break;
01146             case CMD_REPL_USER_10_1:
01147                 break;
01148             case CMD_REPL_USER_11_1:
01149                 byteReverse((unsigned char*)&command_data.cmd_repl_user_11_1.dcc_group,1);
01150                 break;
01151             case CMD_REPL_USER_12_1:
01152                 byteReverse((unsigned char*)&command_data.cmd_repl_user_12_1.msg_flood_l,14);
01153                 break;
01154             case CMD_REPL_USER_13_1:
01155                 break;
01156             case CMD_REPL_USER_14_1:
01157                 break;
01158             case CMD_REPL_USER_15_1:
01159                 break;
01160             case CMD_REPL_USER_16_5:
01161                 break;
01162             case CMD_REPL_USER_17_9:
01163                 break;
01164             case CMD_REPL_USER_99_1:
01165                 break;
01166             case CMD_PUSH_1:
01167                 byteReverse((unsigned char*)&command_data.cmd_push_1.now,1);
01168                 byteReverse((unsigned char*)&command_data.cmd_push_1.original_time,1);
01169                 break;
01170             case CMD_PROC_1:
01171                 byteReverse((unsigned char*)&command_data.cmd_proc_1.last_changed,1);
01172                 break;
01173             case CMD_PROC_END_1:
01174                 break;
01175             case CMD_PARTYLINE_1:
01176                 byteReverse((unsigned char*)&command_data.cmd_partyline_1.id,1);
01177                 break;
01178             case CMD_PARTYLINE_USER_1:
01179                 byteReverse((unsigned char*)&command_data.cmd_partyline_user_1.id,1);
01180                 break;
01181             case CMD_REPL_CHDEF_01_1:
01182                 byteReverse((unsigned char*)&command_data.cmd_repl_chdef_01_1.last_changed,1);
01183                 break;
01184             case CMD_REPL_CHDEF_02_1:
01185                 break;
01186             case CMD_REPL_CHDEF_03_1:
01187                 break;
01188             case CMD_REPL_CHDEF_04_1:
01189                 break;
01190             case CMD_REPL_CHDEF_05_1:
01191                 break;
01192             case CMD_REPL_CHDEF_06_8:
01193                 break;
01194             case CMD_REPL_CHDEF_99_1:
01195                 break;
01196             case CMD_REPL_PRV_01_1:
01197                 byteReverse((unsigned char*)&command_data.cmd_repl_prv_01_1.last_changed,1);
01198                 break;
01199             case CMD_REPL_PRV_02_1:
01200                 break;
01201             case CMD_REPL_PRV_03_1:
01202                 break;
01203             case CMD_REPL_PRV_04_7:
01204                 break;
01205             case CMD_REPL_PRV_05_8:
01206                 break;
01207             case CMD_REPL_PRV_06_11:
01208                 break;
01209             case CMD_REPL_PRV_99_1:
01210                 break;
01211             case CMD_REMOTE_PROCEDURE_CALL_3:
01212                 byteReverse((unsigned char*)&command_data.cmd_remote_procedure_call_3.num_args,1);
01213                 break;
01214             default:
01215                 {
01216                     char tmp[1024];
01217                     sprintf(tmp,"%s%x","in file " __FILE__ " in function " __FUNC__ " occurred error: The code shouldn't go here! It means that you should add 'case' for this packet: COMMAND 0x",command);
01218                     log_debug(tmp);
01219                 }
01220                 break;
01221         }
01222     }

Here is the call graph for this function:

void s_bot_command::hard_clear  )  [inline]
 

Definition at line 1224 of file botnet.cpp.

Referenced by botnet_link(), botnet_loop(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_receive(), and botnet_remote_procedure_call().

01225     {
01226         memset(this,0,sizeof(*this));
01227     }


Member Data Documentation

uint32 s_bot_command::command
 

ID of command.

Definition at line 355 of file botnet.cpp.

Referenced by botnet_check_for_buffer_overflow(), botnet_loop(), botnet_partyline_event(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_remote_procedure_call(), and flip().

MSVC_ALIGN1 union s_bot_command::u_commnd_data s_bot_command::command_data
 

Data of command.

Author:
VooDooMan
Version:
1
Date:
2004

Referenced by botnet_check_for_buffer_overflow(), botnet_loop(), botnet_partyline_event(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_receive(), botnet_remote_procedure_call(), botnet_send_command(), and flip().

uint32 s_bot_command::packet_type
 

Must be PACKET_TYPE_COMMAND.

Definition at line 352 of file botnet.cpp.

Referenced by botnet_check_for_buffer_overflow(), botnet_loop(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_remote_procedure_call(), and flip().

uint32 s_bot_command::size
 

Used for decompressing.

Definition at line 353 of file botnet.cpp.

Referenced by botnet_loop(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), botnet_receive(), botnet_remote_procedure_call(), and botnet_send_command().

uint32 s_bot_command::version
 

Version of protocol.

Definition at line 354 of file botnet.cpp.

Referenced by botnet_check_for_buffer_overflow(), botnet_loop(), botnet_partyline_join_channel(), botnet_partyline_leave_channel(), botnet_partyline_message(), botnet_push_chan(), botnet_push_proc(), botnet_push_prv(), botnet_push_user(), and botnet_remote_procedure_call().


The documentation for this struct was generated from the following file:
Generated on Sun Jul 10 05:45:43 2005 for VooDoo cIRCle by doxygen 1.4.3

Hosted by SourceForge.net Logo