From Gennady Feldman:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Oct 2006 18:25:44 +0000 (18:25 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Oct 2006 18:25:44 +0000 (18:25 +0000)
Here is an updated patch. Should be pretty safe. Just added a couple of constants and changed some strings to be cleaner and easier to read.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19743 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ymsg.c

index fdebb3549c71c7c513dfa5507d2bdc1bfa82937f..c1398b94466636e026200510813260a54da84894 100644 (file)
@@ -21,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -197,10 +197,12 @@ enum ypacket_status {
        YPACKET_STATUS_DEFAULT = 0,
        YPACKET_STATUS_SERVERACK = 1,
        YPACKET_STATUS_GAME     = 0x2,
+       YPACKET_STATUS_AWAY     = 0x4,
        YPACKET_STATUS_CONTINUED = 0x5,
        YPACKET_STATUS_INVISIBLE = 12,
        YPACKET_STATUS_NOTIFY = 0x16, /* TYPING */
-       YPACKET_STATUS_WEBLOGIN = 0x5a55aa55
+       YPACKET_STATUS_WEBLOGIN = 0x5a55aa55,
+       YPACKET_STATUS_OFFLINE = 0x5a55aa56
 };
 
 struct yahoo_rawpacket
@@ -233,9 +235,9 @@ static const value_string ymsg_service_vals[] = {
        {YAHOO_SERVICE_ADDIDENT, "Add Identity"},
        {YAHOO_SERVICE_ADDIGNORE, "Add Ignore"},
        {YAHOO_SERVICE_PING, "Ping"},
-       {YAHOO_SERVICE_GOTGROUPRENAME, "YAHOO_SERVICE_GOTGROUPRENAME"},
+       {YAHOO_SERVICE_GOTGROUPRENAME, "Got Group Rename"},
        {YAHOO_SERVICE_SYSMESSAGE, "System Message"},
-       {YAHOO_SERVICE_SKINNAME, "YAHOO_SERVICE_SKINNAME"},
+       {YAHOO_SERVICE_SKINNAME, "Skinname"},
        {YAHOO_SERVICE_PASSTHROUGH2, "Passthrough 2"},
        {YAHOO_SERVICE_CONFINVITE, "Conference Invitation"},
        {YAHOO_SERVICE_CONFLOGON, "Conference Logon"},
@@ -251,51 +253,51 @@ static const value_string ymsg_service_vals[] = {
        {YAHOO_SERVICE_GAMEMSG, "Game Message"},
        {YAHOO_SERVICE_FILETRANSFER, "File Transfer"},
        {YAHOO_SERVICE_VOICECHAT, "Voice Chat"},
-       {YAHOO_SERVICE_NOTIFY, "YAHOO_SERVICE_NOTIFY"},
-       {YAHOO_SERVICE_VERIFY, "YAHOO_SERVICE_VERIFY"},
-       {YAHOO_SERVICE_P2PFILEXFER, "YAHOO_SERVICE_P2PFILEXFER"}, 
-       {YAHOO_SERVICE_PEERTOPEER, "YAHOO_SERVICE_PEERTOPEER"},
-       {YAHOO_SERVICE_WEBCAM, "YAHOO_SERVICE_WEBCAM"},
-       {YAHOO_SERVICE_AUTHRESP, "YAHOO_SERVICE_AUTHRESP"},
-       {YAHOO_SERVICE_LIST, "YAHOO_SERVICE_LIST"},
-       {YAHOO_SERVICE_AUTH, "YAHOO_SERVICE_AUTH"},
-       {YAHOO_SERVICE_ADDBUDDY, "YAHOO_SERVICE_ADDBUDDY"},
-       {YAHOO_SERVICE_REMBUDDY, "YAHOO_SERVICE_REMBUDDY"},
-       {YAHOO_SERVICE_IGNORECONTACT, "YAHOO_SERVICE_IGNORECONTACT"},
-       {YAHOO_SERVICE_REJECTCONTACT, "YAHOO_SERVICE_REJECTCONTACT"},
-       {YAHOO_SERVICE_GROUPRENAME, "Group Renamed"},
-       {YAHOO_SERVICE_CHATONLINE, "YAHOO_SERVICE_CHATONLINE"},
-       {YAHOO_SERVICE_CHATGOTO, "YAHOO_SERVICE_CHATGOTO"},
-       {YAHOO_SERVICE_CHATJOIN, "YAHOO_SERVICE_CHATJOIN"},
-       {YAHOO_SERVICE_CHATLEAVE, "YAHOO_SERVICE_CHATLEAVE"},
-       {YAHOO_SERVICE_CHATEXIT, "YAHOO_SERVICE_CHATEXIT"},
-       {YAHOO_SERVICE_CHATADDINVITE, "YAHOO_SERVICE_CHATADDINVITE"},
-       {YAHOO_SERVICE_CHATLOGOUT, "YAHOO_SERVICE_CHATLOGOUT"},
-       {YAHOO_SERVICE_CHATPING, "YAHOO_SERVICE_CHATPING"},
-       {YAHOO_SERVICE_COMMENT, "YAHOO_SERVICE_COMMENT"},
-       {YAHOO_SERVICE_GAME_INVITE,"YAHOO_SERVICE_GAME_INVITE "},
-       {YAHOO_SERVICE_STEALTH_PERM, "YAHOO_SERVICE_STEALTH_PERM"},
-       {YAHOO_SERVICE_STEALTH_SESSION, "YAHOO_SERVICE_STEALTH_SESSION"},
-       {YAHOO_SERVICE_AVATAR, "YAHOO_SERVICE_AVATAR"},
-       {YAHOO_SERVICE_PICTURE_CHECKSUM, "YAHOO_SERVICE_PICTURE_CHECKSUM"},
-       {YAHOO_SERVICE_PICTURE, "YAHOO_SERVICE_PICTURE"},
-       {YAHOO_SERVICE_PICTURE_UPDATE, "YAHOO_SERVICE_PICTURE_UPDATE"},
-       {YAHOO_SERVICE_PICTURE_UPLOAD, "YAHOO_SERVICE_PICTURE_UPLOAD"},
-       {YAHOO_SERVICE_YAB_UPDATE,"YAHOO_SERVICE_YAB_UPDATE"},
-       {YAHOO_SERVICE_Y6_VISIBLE_TOGGLE, "YAHOO_SERVICE_Y6_VISIBLE_TOGGLE"},
-       {YAHOO_SERVICE_Y6_STATUS_UPDATE, "YAHOO_SERVICE_Y6_STATUS_UPDATE"},
-       {YAHOO_SERVICE_PICTURE_STATUS, "YAHOO_SERVICE_PICTURE_STATUS"},
-       {YAHOO_SERVICE_VERIFY_ID_EXISTS, "YAHOO_SERVICE_VERIFY_ID_EXISTS"},
-       {YAHOO_SERVICE_AUDIBLE, "YAHOO_SERVICE_AUDIBLE"},
-       {YAHOO_SERVICE_Y7_CONTACT_DETAILS,"YAHOO_SERVICE_Y7_CONTACT_DETAILS"},
-       {YAHOO_SERVICE_Y7_CHAT_SESSION, "YAHOO_SERVICE_Y7_CHAT_SESSION"},
-       {YAHOO_SERVICE_Y7_AUTHORIZATION,"YAHOO_SERVICE_Y7_AUTHORIZATION"},
-       {YAHOO_SERVICE_Y7_FILETRANSFER,"YAHOO_SERVICE_Y7_FILETRANSFER"},
-       {YAHOO_SERVICE_Y7_FILETRANSFERINFO,"YAHOO_SERVICE_Y7_FILETRANSFERINFO"},
-       {YAHOO_SERVICE_Y7_FILETRANSFERACCEPT,"YAHOO_SERVICE_Y7_FILETRANSFERACCEPT"},
-       {YAHOO_SERVICE_Y7_CHANGE_GROUP, "YAHOO_SERVICE_Y7_CHANGE_GROUP"},
-       {YAHOO_SERVICE_WEBLOGIN, "YAHOO_SERVICE_WEBLOGIN"},
-       {YAHOO_SERVICE_SMS_MSG, "YAHOO_SERVICE_SMS_MSG"},
+       {YAHOO_SERVICE_NOTIFY, "Notify"},
+       {YAHOO_SERVICE_VERIFY, "Verify"},
+       {YAHOO_SERVICE_P2PFILEXFER, "P2P File Transfer"}, 
+       {YAHOO_SERVICE_PEERTOPEER, "Peer To Peer"},
+       {YAHOO_SERVICE_WEBCAM, "WebCam"},
+       {YAHOO_SERVICE_AUTHRESP, "Authentication Response"},
+       {YAHOO_SERVICE_LIST, "List"},
+       {YAHOO_SERVICE_AUTH, "Authentication"},
+       {YAHOO_SERVICE_ADDBUDDY, "Add Buddy"},
+       {YAHOO_SERVICE_REMBUDDY, "Remove Buddy"},
+       {YAHOO_SERVICE_IGNORECONTACT, "Ignore Contact"},
+       {YAHOO_SERVICE_REJECTCONTACT, "Reject Contact"},
+       {YAHOO_SERVICE_GROUPRENAME, "Group Rename"},
+       {YAHOO_SERVICE_CHATONLINE, "Chat Online"},
+       {YAHOO_SERVICE_CHATGOTO, "Chat Goto"},
+       {YAHOO_SERVICE_CHATJOIN, "Chat Join"},
+       {YAHOO_SERVICE_CHATLEAVE, "Chat Leave"},
+       {YAHOO_SERVICE_CHATEXIT, "Chat Exit"},
+       {YAHOO_SERVICE_CHATADDINVITE, "Chat Invite"},
+       {YAHOO_SERVICE_CHATLOGOUT, "Chat Logout"},
+       {YAHOO_SERVICE_CHATPING, "Chat Ping"},
+       {YAHOO_SERVICE_COMMENT, "Comment"},
+       {YAHOO_SERVICE_GAME_INVITE,"Game Invite"},
+       {YAHOO_SERVICE_STEALTH_PERM, "Stealth Permanent"},
+       {YAHOO_SERVICE_STEALTH_SESSION, "Stealth Session"},
+       {YAHOO_SERVICE_AVATAR,"Avatar"},
+       {YAHOO_SERVICE_PICTURE_CHECKSUM,"Picture Checksum"},
+       {YAHOO_SERVICE_PICTURE,"Picture"},
+       {YAHOO_SERVICE_PICTURE_UPDATE,"Picture Update"},
+       {YAHOO_SERVICE_PICTURE_UPLOAD,"Picture Upload"},
+       {YAHOO_SERVICE_YAB_UPDATE,"Yahoo Address Book Update"},
+       {YAHOO_SERVICE_Y6_VISIBLE_TOGGLE, "Y6 Visibility Toggle"},
+       {YAHOO_SERVICE_Y6_STATUS_UPDATE, "Y6 Status Update"},
+       {YAHOO_SERVICE_PICTURE_STATUS, "Picture Sharing Status"},
+       {YAHOO_SERVICE_VERIFY_ID_EXISTS, "Verify ID Exists"},
+       {YAHOO_SERVICE_AUDIBLE, "Audible"},
+       {YAHOO_SERVICE_Y7_CONTACT_DETAILS,"Y7 Contact Details"},
+       {YAHOO_SERVICE_Y7_CHAT_SESSION, "Y7 Chat Session"},
+       {YAHOO_SERVICE_Y7_AUTHORIZATION,"Y7 Buddy Authorization"},
+       {YAHOO_SERVICE_Y7_FILETRANSFER,"Y7 File Transfer"},
+       {YAHOO_SERVICE_Y7_FILETRANSFERINFO,"Y7 File Transfer Information"},
+       {YAHOO_SERVICE_Y7_FILETRANSFERACCEPT,"Y7 File Transfer Accept"},
+       {YAHOO_SERVICE_Y7_CHANGE_GROUP, "Y7 Change Group"},
+       {YAHOO_SERVICE_WEBLOGIN,"WebLogin"},
+       {YAHOO_SERVICE_SMS_MSG,"SMS Message"},
        {0, NULL}
 };
 
@@ -304,9 +306,11 @@ static const value_string ymsg_status_vals[] = {
        {YPACKET_STATUS_DEFAULT,""},
        {YPACKET_STATUS_SERVERACK,"Server Ack"},
        {YPACKET_STATUS_GAME,"Playing Game"},
+       {YPACKET_STATUS_AWAY, "Away"},
        {YPACKET_STATUS_CONTINUED,"More Packets??"},
        {YPACKET_STATUS_NOTIFY, "Notify"},
        {YPACKET_STATUS_WEBLOGIN,"Web Login"},
+       {YPACKET_STATUS_OFFLINE,"Offline"},
        {0, NULL}
 };
 
@@ -502,7 +506,7 @@ proto_register_ymsg(void)
                                NULL, 0, "Content line key", HFILL }},
                        { &hf_ymsg_content_line_value, {
                                "Value", "ymsg.content-line.value", FT_STRING, BASE_NONE,
-                               NULL, 0, "Content line value", HFILL }},
+                               NULL, 0, "Content line value", HFILL }}
         };
        static gint *ett[] = {
                &ett_ymsg,