ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] enum or #define?

From: Kaul <mykaul@xxxxxxxxx>
Date: Sun, 14 Feb 2010 23:21:13 +0200
Which one is better?
option 1:
#define SSL_HND_HELLO_REQUEST          0
#define SSL_HND_CLIENT_HELLO           1
...

or perhaps, option 2:
enum {
SSL_HND_HELLO_REQUEST,
SSL_HND_CLIENT_HELLO,
};
...

and then (in both cases):

const value_string ssl_31_handshake_type[] = {
    { SSL_HND_HELLO_REQUEST,     "Hello Request" },
    { SSL_HND_CLIENT_HELLO,      "Client Hello" },


?

TIA,
Y.