various string related changes, mainly replace sprintf/snprintf by g_snprintf
[obnox/wireshark/wip.git] / packet-fcels.c
index 7ae038d93198379155f01c56535d60e4945b09f5..2e98967ac3ddd0a99d4269eea174396603fb4836 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for FC Extended Link Services
  * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com>
  *
- * $Id: packet-fcels.c,v 1.5 2003/10/30 02:06:11 guy Exp $
+ * $Id: packet-fcels.c,v 1.6 2003/11/07 08:50:43 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -244,17 +244,15 @@ construct_cmnsvc_string (guint16 flag, gchar *flagstr, guint8 opcode)
 
     punc[0] = '\0';
     
-    if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
-        if (flag & 0x8000) {
-            strcpy (flagstr, "Cont. Incr. Offset Supported");
-            stroff += 28;
-            strcpy (punc, ", ");
-        }
-        if (flag & 0x4000) {
-            sprintf (&flagstr[stroff], "%sRRO Supported", punc);
-            stroff += 15;
-            strcpy (punc, ", ");
-        }
+    if (flag & 0x8000) {
+        strcpy (flagstr, "Cont. Incr. Offset Supported");
+        stroff += 28;
+        strcpy (punc, ", ");
+    }
+    if (flag & 0x4000) {
+        sprintf (&flagstr[stroff], "%sRRO Supported", punc);
+        stroff += 15;
+        strcpy (punc, ", ");
     }
     
     if (flag & 0x2000) {
@@ -271,7 +269,7 @@ construct_cmnsvc_string (guint16 flag, gchar *flagstr, guint8 opcode)
     else {
         sprintf (&flagstr[stroff], "%sNormal B2B Credit Mgmt", punc);
         strcpy (punc, ", ");
-        stroff += 21;
+        stroff += 22;
     }
 
     if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
@@ -288,6 +286,21 @@ construct_cmnsvc_string (guint16 flag, gchar *flagstr, guint8 opcode)
             stroff += 34;
         }
     }
+
+    if (flag & 0x0200) {
+        strcpy (&flagstr[stroff], ", Multicast Supported");
+        stroff += 21;
+    }
+    
+    if (flag & 0x0100) {
+        strcpy (&flagstr[stroff], ", Broadcast Supported");
+        stroff += 21;
+    }
+
+    if (flag & 0x0020) {
+        strcpy (&flagstr[stroff], ", Security Bit");
+        stroff += 14;
+    }
     
     if (flag & 0x0010) {
         strcpy (&flagstr[stroff], ", Clk Sync Prim Capable");