+/* Keys for csp->content_type */
+#define CT_TEXT 0x01U
+#define CT_GIF 0x02U
+
+#define ACTION_MASK_ALL (~0U)
+
+#define ACTION_MOST_COMPATIBLE 0x0000U
+
+#define ACTION_BLOCK 0x0001U
+#define ACTION_DEANIMATE 0x2000U
+#define ACTION_FAST_REDIRECTS 0x0002U
+#define ACTION_FILTER 0x0004U
+#define ACTION_HIDE_FORWARDED 0x0008U
+#define ACTION_HIDE_FROM 0x0010U
+#define ACTION_HIDE_REFERER 0x0020U /* sic - follow HTTP, not English */
+#define ACTION_HIDE_USER_AGENT 0x0040U
+#define ACTION_IMAGE 0x0080U
+#define ACTION_IMAGE_BLOCKER 0x0100U
+#define ACTION_NO_COOKIE_READ 0x0200U
+#define ACTION_NO_COOKIE_SET 0x0400U
+#define ACTION_NO_POPUPS 0x0800U
+#define ACTION_VANILLA_WAFER 0x1000U
+
+#define ACTION_STRING_DEANIMATE 0
+#define ACTION_STRING_FROM 1
+#define ACTION_STRING_IMAGE_BLOCKER 2
+#define ACTION_STRING_REFERER 3
+#define ACTION_STRING_USER_AGENT 4
+#define ACTION_STRING_COUNT 5
+
+
+#define ACTION_MULTI_ADD_HEADER 0
+#define ACTION_MULTI_WAFER 1
+#define ACTION_MULTI_COUNT 2
+
+/*
+ * This structure contains a list of actions to apply to a URL.
+ * It only contains positive instructions - no "-" options.
+ * It is not used to store the actions list itself, only for
+ * url_actions() to return the current values.
+ */
+struct current_action_spec
+{
+ unsigned flags; /* a bit set to "1" = add action */
+
+ /* For those actions that require parameters: */
+
+ /* each entry is valid if & only if corresponding entry in "add" set. */
+ char * string[ACTION_STRING_COUNT];
+
+ /* Strings to add */
+ struct list multi[ACTION_MULTI_COUNT][1];
+};
+
+
+/*
+ * This structure contains a set of changes to actions.
+ * It can contain both positive and negative instructions.
+ * It is used to store an entry in the actions list.
+ */
+struct action_spec
+{
+ unsigned mask; /* a bit set to "0" = remove action */
+ unsigned add; /* a bit set to "1" = add action */
+
+ /* For those actions that require parameters: */
+
+ /* each entry is valid if & only if corresponding entry in "add" set. */
+ char * string[ACTION_STRING_COUNT];
+
+ /* Strings to remove. */
+ struct list multi_remove[ACTION_MULTI_COUNT][1];
+
+ /* If nonzero, remove *all* strings. */
+ int multi_remove_all[ACTION_MULTI_COUNT];
+
+ /* Strings to add */
+ struct list multi_add[ACTION_MULTI_COUNT][1];
+};
+
+/*
+ * This structure is used to store the actions list.
+ *
+ * It contains a URL pattern, and the chages to the actions.
+ * It is a linked list.
+ */
+struct url_actions
+{
+ struct url_spec url[1];
+
+ struct action_spec action[1];
+
+ struct url_actions * next;
+};
+