FC-over-IP is now covered by RFCs; update the specification references.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 31 Dec 2004 21:20:46 +0000 (21:20 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 31 Dec 2004 21:20:46 +0000 (21:20 +0000)
Make the protcol/version information an array of 8 bytes, not 2 guints;
not all the world's a (little-endian) PC!

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

epan/dissectors/packet-fcip.c

index 5e7e17471a4fbfd31d20e74ccf25201a61042241..8e7cd893e71108107ebc9e98d605a18cc626ef6a 100644 (file)
@@ -1,5 +1,6 @@
 /* packet-fcip.c
  * Routines for FCIP dissection
+ * RFC 3821, RFC 3643
  * Copyright 2001, Dinesh G Dutt (ddutt@cisco.com)
  *
  * $Id$
 #include <epan/packet.h>
 #include <epan/prefs.h>
 
-/*
- * See:
- *
- *     draft-ietf-ips-fcovertcpip-12
- *
- *     draft-ietf-ips-fcencapsulation-08
- */
-
 #define FCIP_ENCAP_HEADER_LEN                    28
 #define FCIP_MIN_HEADER_LEN                      16 /* upto frame len field */ 
-#define FCIP_ENCAP_PROTO_VER                     0xFEFE0101
 #define FCIP_IS_SF(pflags)                       ((pflags & 0x1) == 0x1)
 #define FCIP_IS_CH(pflags)                       ((pflags & 0x80) == 0x80)
 
@@ -107,8 +99,10 @@ static const value_string fcencap_proto_vals[] = {
     {0, NULL},
 };
 
-static const guint fcip_header_2_bytes[2] = {FCIP_ENCAP_PROTO_VER,
-                                             FCIP_ENCAP_PROTO_VER};
+static const guint8 fcip_header_8_bytes[8] = {
+    0x01, 0x01, 0xFE, 0xFE,
+    0x01, 0x01, 0xFE, 0xFE
+};
 
 static int proto_fcip          = -1;
 
@@ -216,8 +210,7 @@ NXT_BYTE: while (bytes_remaining) {
         /*
          * Tests a, b and c
          */
-        if (tvb_memeql(tvb, offset, (const guint8 *)fcip_header_2_bytes,
-                       8) != 0) {
+        if (tvb_memeql(tvb, offset, fcip_header_8_bytes, 8) != 0) {
             offset++;
             bytes_remaining--;
             goto NXT_BYTE;
@@ -287,8 +280,8 @@ NXT_BYTE: while (bytes_remaining) {
         if (bytes_remaining >= (frame_len)) {
             if (tvb_bytes_exist (tvb, offset+frame_len, 8)) {
                 /* The start of the next header matches what we wish to see */ 
-                if (tvb_memeql (tvb, offset+frame_len,
-                                (const guint8 *)fcip_header_2_bytes, 8) == 0) {
+                if (tvb_memeql (tvb, offset+frame_len, fcip_header_8_bytes,
+                                8) == 0) {
                     return (offset);
                 }
                 else {