]> git.pld-linux.org Git - packages/dsniff.git/blame - dsniff-slist.patch
- spec adapterized.
[packages/dsniff.git] / dsniff-slist.patch
CommitLineData
48d53eea
AM
1diff -urN dsniff-2.3.org/dnsspoof.c dsniff-2.3/dnsspoof.c
2--- dsniff-2.3.org/dnsspoof.c Wed Dec 20 23:59:36 2000
3+++ dsniff-2.3/dnsspoof.c Thu Dec 21 00:11:04 2000
4@@ -23,6 +23,7 @@
5 #include <err.h>
6 #include <libnet.h>
7 #include <pcap.h>
8+#include "slist.h"
9 #include "pcaputil.h"
10 #include "version.h"
11
12diff -urN dsniff-2.3.org/msgsnarf.c dsniff-2.3/msgsnarf.c
13--- dsniff-2.3.org/msgsnarf.c Wed Dec 20 23:59:36 2000
14+++ dsniff-2.3/msgsnarf.c Thu Dec 21 00:11:19 2000
15@@ -21,6 +21,7 @@
16 #include <nids.h>
17 #include <pcap.h>
18 #include <pcaputil.h>
19+#include "slist.h"
20 #include "buf.h"
21 #include "decode.h"
22 #include "version.h"
23diff -urN dsniff-2.3.org/record.c dsniff-2.3/record.c
24--- dsniff-2.3.org/record.c Wed Dec 20 23:59:36 2000
25+++ dsniff-2.3/record.c Thu Dec 21 00:13:29 2000
26@@ -12,6 +12,7 @@
27 #include <rpc/rpc.h>
28 #include <stdio.h>
29 #include <time.h>
30+#include <md5global.h>
31 #include <md5.h>
32 #ifdef HAVE_DB_185_H
33 #define DB_LIBRARY_COMPATIBILITY_API
34diff -urN dsniff-2.3.org/slist.h dsniff-2.3/slist.h
35--- dsniff-2.3.org/slist.h Thu Jan 1 01:00:00 1970
36+++ dsniff-2.3/slist.h Thu Dec 21 00:07:48 2000
37@@ -0,0 +1,55 @@
38+#ifndef SLIST_HEAD
39+
40+/*
41+ * Singly-linked List definitions.
42+ */
43+#define SLIST_HEAD(name, type) \
44+struct name { \
45+ struct type *slh_first; /* first element */ \
46+}
47+
48+#define SLIST_HEAD_INITIALIZER(head) \
49+ { NULL }
50+
51+#define SLIST_ENTRY(type) \
52+struct { \
53+ struct type *sle_next; /* next element */ \
54+}
55+
56+/*
57+ * Singly-linked List access methods.
58+ */
59+#define SLIST_FIRST(head) ((head)->slh_first)
60+#define SLIST_END(head) NULL
61+#define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head))
62+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
63+
64+#define SLIST_FOREACH(var, head, field) \
65+ for((var) = SLIST_FIRST(head); \
66+ (var) != SLIST_END(head); \
67+ (var) = SLIST_NEXT(var, field))
68+
69+/*
70+ * Singly-linked List functions.
71+ */
72+#define SLIST_INIT(head) { \
73+ SLIST_FIRST(head) = SLIST_END(head); \
74+}
75+
76+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
77+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
78+ (slistelm)->field.sle_next = (elm); \
79+} while (0)
80+
81+#define SLIST_INSERT_HEAD(head, elm, field) do { \
82+ (elm)->field.sle_next = (head)->slh_first; \
83+ (head)->slh_first = (elm); \
84+} while (0)
85+
86+#define SLIST_REMOVE_HEAD(head, field) do { \
87+ (head)->slh_first = (head)->slh_first->field.sle_next; \
88+} while (0)
89+
90+#endif
91+
92+
This page took 0.030159 seconds and 4 git commands to generate.