summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2012-12-17 14:02:39 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-11-30 12:44:38 +0100
commitceb6eba584e813be045b8eb854969b32de11c5b7 (patch)
treeba984d4884785cdc6cb05c161443519ddb0d293e
parente71d344d392432ca2a3a0a8a3ff3977a92643bc1 (diff)
downloadwireshark-ceb6eba584e813be045b8eb854969b32de11c5b7.tar.gz
Insert auto-generated type definitions
-rw-r--r--plugins/alot/packet-alot.c114
1 files changed, 114 insertions, 0 deletions
diff --git a/plugins/alot/packet-alot.c b/plugins/alot/packet-alot.c
index e2713d2db2..299aa6bcf2 100644
--- a/plugins/alot/packet-alot.c
+++ b/plugins/alot/packet-alot.c
@@ -106,6 +106,120 @@ f=packet-alot.c;s=SWITCH_TYPES;b="BEGIN $s";e="END $s"
sed "/$b/,/$e/{/$b/p;/$e/p;d}" -i $f;sed "/$b/r /tmp/cases.txt" -i $f
*/
switch (msgtype) { /* BEGIN SWITCH_TYPES */
+ case T_ROOM_BROADCAST:
+ // - (header) src IP is the room owner
+ M_B16("room ID");
+ pos += 2;
+ M_B8("number of players");
+ pos += 1;
+ M_STRZ("owner");
+ pos += strzsize;
+ M_STRZ("name of room");
+ pos += strzsize;
+ break;
+ case T_ROOM_JOIN_REQUEST:
+ // - (header) room ID = room ID to join, dst_ip = src IP of UDP broadcast
+ M_STRZ("player name");
+ pos += strzsize;
+ break;
+ case T_ROOM_JOIN_CONFIRM:
+ M_STRZ("confirmed player name");
+ pos += strzsize;
+ break;
+ case T_ROOM_MEMBERS_UPDATE:
+ M_B8("number of players that are being updated");
+ pos += 1;
+ // - (one or more:)
+ M_B8("type");
+ pos += 1;
+ M_STRZ("name");
+ pos += strzsize;
+ break;
+ case T_ROOM_LEAVE:
+ // - (C->S = user leaves, S->C = user kicked)
+ // - (no data)
+ break;
+ case T_ROOM_CLOSED:
+ M_B16("room ID");
+ pos += 2;
+ M_B8("reason number");
+ pos += 1;
+ break;
+ case T_GAME_JOIN_REQUEST:
+ // - (no data)
+ break;
+ case T_GAME_JOIN_DECLINE:
+ M_STRZ("Reason");
+ pos += strzsize;
+ break;
+ case T_GAME_JOIN_ACCEPT:
+ M_B8("player number");
+ pos += 1;
+ break;
+ case T_GAME_SET_CREATURE:
+ M_B8("creature type");
+ pos += 1;
+ break;
+ case T_GAME_INIT:
+ M_B8("number of players");
+ pos += 1;
+ M_B16("number of creatures a player is allowed to use");
+ pos += 2;
+ //M_ADD(13, "reserved 13 bytes");
+ pos += 13;
+ M_IPADDR("IP addresses");
+ pos += 16;
+ M_B8("creature type");
+ pos += 1;
+ M_B8("map index");
+ pos += 1;
+ // - (in the future a fixed map can be added here for)
+ break;
+ case T_GAME_LEAVE:
+ // - (this message needs to be sent such that the token cannot get lost. It can
+ // - (no data)
+ break;
+ case T_GAME_SPAWN_CREATURE:
+ M_FLOAT("X position");
+ pos += 4;
+ M_FLOAT("Y position");
+ pos += 4;
+ break;
+ case T_GAME_MOVE:
+ M_B32("movement sequence number");
+ pos += 4;
+ M_FLOAT("X position");
+ pos += 4;
+ M_FLOAT("Y position");
+ pos += 4;
+ M_FLOAT("angle");
+ pos += 4;
+ M_FLOAT("linear velocity");
+ pos += 4;
+ M_FLOAT("angular velocity");
+ pos += 4;
+ M_B8("level");
+ pos += 1;
+ break;
+ case T_GAME_ATTACK:
+ // - (no data, defender determines whether hit was successful or not)
+ break;
+ case T_GAME_ATTACK_HIT:
+ M_B8("attacker");
+ pos += 1;
+ M_B8("damage");
+ pos += 1;
+ break;
+ case T_GAME_PICKUP:
+ M_B32("X position");
+ pos += 4;
+ M_B32("Y position");
+ pos += 4;
+ break;
+ case T_TOKEN_OFFER:
+ M_B8("next available sequence number");
+ pos += 1;
+ break;
} /* END SWITCH_TYPES */
if (msglen - pos > 0)