#define CODE_WRITE_REQ 3
#define CODE_WRITE_REP 4
+#define ERROR_NONE 0
#define ERROR_READONLY 3
+#define ERROR_WRITEONLY 4
#define ERROR_INVALID_VALUE 5
#define ERROR_DENIED 7
#define ATTR_IGMP_BLOCK_UNK 0x6C00
#define ATTR_IGMP_VALID_V3 0x7000
#define ATTR_TLV_BITMAP 0x7400
+#define ATTR_LOOP_DETECT 0x9000
#define ATTR_END 0xFFFF
} __attribute__((packed));
-/**
- * Note: this structure is not sent "as-is" on the wire.
+/* Note: this structure is not sent "as-is" on the wire.
* A translation is done between the wire format (which uses somewhat not
- * trivial bitmap) and this simpler format. See encoding_attr.c for more details.
+ * trivial bitmap) and this simpler format. See attr.c for more details.
*/
struct attr_vlan_conf {
- unsigned short vlan; /* port number */
- unsigned char ports[0]; /* array, maps each port to a VLAN */
+ unsigned short vlan; /* VLAN number */
+ unsigned char ports[0]; /* array, maps each port association with the VLAN */
+};
+
+
+/* Note: this structure is not sent "as-is" on the wire.
+ * A translation is done between the wire format (which uses somewhat not
+ * trivial bitmap) and this simpler format. See attr.c for more details.
+ */
+struct attr_mirror {
+ unsigned char outport; /* port number on which traffic is sent */
+ unsigned char ports[0]; /* array, maps each port source mirror traffic */
};