forked from pool/iproute2
This commit is contained in:
commit
4f6b822cbd
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
36
iproute2-2.6.14-nostrip.diff
Normal file
36
iproute2-2.6.14-nostrip.diff
Normal file
@ -0,0 +1,36 @@
|
||||
--- iproute2-051007/ip/Makefile
|
||||
+++ iproute2-051007/ip/Makefile
|
||||
@@ -16,7 +16,7 @@
|
||||
rtmon: $(RTMONOBJ) $(LIBNETLINK)
|
||||
|
||||
install: all
|
||||
- install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
|
||||
+ install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
||||
install -m 0755 $(SCRIPTS) $(DESTDIR)$(SBINDIR)
|
||||
|
||||
clean:
|
||||
--- iproute2-051007/misc/Makefile
|
||||
+++ iproute2-051007/misc/Makefile
|
||||
@@ -27,7 +27,7 @@
|
||||
lnstat: $(LNSTATOBJ)
|
||||
|
||||
install: all
|
||||
- install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
|
||||
+ install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
||||
ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat
|
||||
ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat
|
||||
|
||||
--- iproute2-051007/tc/Makefile
|
||||
+++ iproute2-051007/tc/Makefile
|
||||
@@ -70,9 +70,9 @@
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)/usr/lib/tc
|
||||
- install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
|
||||
+ install -m 0755 tc $(DESTDIR)$(SBINDIR)
|
||||
for i in $(TCSO); \
|
||||
- do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
|
||||
+ do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
|
||||
done
|
||||
|
||||
clean:
|
13
iproute2-2.6.15-060110.dif
Normal file
13
iproute2-2.6.15-060110.dif
Normal file
@ -0,0 +1,13 @@
|
||||
--- lib/utils.c
|
||||
+++ lib/utils.c 2006/07/20 12:57:52
|
||||
@@ -33,6 +33,10 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
+#ifndef HZ
|
||||
+#define HZ sysconf(_SC_CLK_TCK)
|
||||
+#endif
|
||||
+
|
||||
int get_integer(int *val, const char *arg, int base)
|
||||
{
|
||||
long res;
|
3
iproute2-2.6.15-060110.tar.bz2
Normal file
3
iproute2-2.6.15-060110.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c2e4ad5b50659598c4d292930de97647cf97b95e1942435861fa8e53aa9dbda
|
||||
size 317115
|
34
iproute2-2.6.15-flushcheckuid.diff
Normal file
34
iproute2-2.6.15-flushcheckuid.diff
Normal file
@ -0,0 +1,34 @@
|
||||
Index: ip/ipaddress.c
|
||||
===================================================================
|
||||
--- ip/ipaddress.c.orig
|
||||
+++ ip/ipaddress.c
|
||||
@@ -589,6 +589,12 @@
|
||||
if (flush) {
|
||||
int round = 0;
|
||||
char flushb[4096-512];
|
||||
+ uid_t uid = getuid();
|
||||
+
|
||||
+ if(uid) {
|
||||
+ fprintf(stderr, "Not sufficient rights to flush\n");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
|
||||
filter.flushb = flushb;
|
||||
filter.flushp = 0;
|
||||
Index: ip/iproute.c
|
||||
===================================================================
|
||||
--- ip/iproute.c.orig
|
||||
+++ ip/iproute.c
|
||||
@@ -1153,6 +1153,12 @@
|
||||
int round = 0;
|
||||
char flushb[4096-512];
|
||||
time_t start = time(0);
|
||||
+ uid_t uid = getuid();
|
||||
+
|
||||
+ if(uid) {
|
||||
+ fprintf(stderr, "Not sufficient rights to flush\n");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
|
||||
if (filter.tb == -1) {
|
||||
if (do_ipv6 != AF_INET6) {
|
113
iproute2-2.6.15-fragtimeout.diff
Normal file
113
iproute2-2.6.15-fragtimeout.diff
Normal file
@ -0,0 +1,113 @@
|
||||
Index: doc/ip-cref.tex
|
||||
===================================================================
|
||||
--- doc/ip-cref.tex.orig
|
||||
+++ doc/ip-cref.tex
|
||||
@@ -1323,6 +1323,11 @@
|
||||
variable \verb|net/ipv4/tcp_reordering|.
|
||||
|
||||
|
||||
+\item \verb|fragtimeout NUMBER|
|
||||
+
|
||||
+--- \threeonly How many seconds to wait before expiring IP fragments
|
||||
+ from the destination of this route. If not specified Linux uses
|
||||
+ the \verb|sysctl| variable \verb|net/ipv4/ip_frag_timeout|.
|
||||
|
||||
\item \verb|nexthop NEXTHOP|
|
||||
|
||||
Index: ip/iproute.c
|
||||
===================================================================
|
||||
--- ip/iproute.c.orig
|
||||
+++ ip/iproute.c
|
||||
@@ -37,7 +37,19 @@
|
||||
#ifndef RTAX_RTTVAR
|
||||
#define RTAX_RTTVAR RTAX_HOPS
|
||||
#endif
|
||||
-
|
||||
+#ifndef RTAX_ADVMSS
|
||||
+#define RTAX_ADVMSS (RTAX_CWND+1)
|
||||
+#endif
|
||||
+#ifndef RTAX_REORDERING
|
||||
+#define RTAX_REORDERING (RTAX_ADVMSS+1)
|
||||
+#endif
|
||||
+#ifndef RTAX_FRAG_TIMEOUT
|
||||
+#define RTAX_FRAG_TIMEOUT (RTAX_REORDERING+1)
|
||||
+#endif
|
||||
+#if RTAX_MAX < RTAX_FRAG_TIMEOUT
|
||||
+#undef RTAX_MAX
|
||||
+#define RTAX_MAX RTAX_FRAG_TIMEOUT
|
||||
+#endif
|
||||
|
||||
static void usage(void) __attribute__((noreturn));
|
||||
|
||||
@@ -58,9 +70,9 @@
|
||||
fprintf(stderr, "INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...\n");
|
||||
fprintf(stderr, "NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS\n");
|
||||
fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
|
||||
- fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ]\n");
|
||||
+ fprintf(stderr, " [ rtt NUMBER ] [ rttvar NUMBER ] [ fragtimeout seconds]\n");
|
||||
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ ssthresh NUMBER ]\n");
|
||||
- fprintf(stderr, " [ realms REALM ]\n");
|
||||
+ fprintf(stderr, " [ reordering NUMBER] [ realms REALM ]\n");
|
||||
fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
|
||||
fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
|
||||
fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
|
||||
@@ -497,6 +509,7 @@
|
||||
"cwnd",
|
||||
"advmss",
|
||||
"reordering",
|
||||
+ "fragtimeout",
|
||||
};
|
||||
static int hz;
|
||||
if (mxrta[i] == NULL)
|
||||
@@ -764,16 +777,26 @@
|
||||
invarg("\"reordering\" value is invalid\n", *argv);
|
||||
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
|
||||
#endif
|
||||
- } else if (strcmp(*argv, "rtt") == 0) {
|
||||
- unsigned rtt;
|
||||
+#ifdef RTAX_REORDERING
|
||||
+ } else if (matches(*argv, "reordering") == 0) {
|
||||
+ unsigned reord;
|
||||
NEXT_ARG();
|
||||
if (strcmp(*argv, "lock") == 0) {
|
||||
- mxlock |= (1<<RTAX_RTT);
|
||||
+ mxlock |= (1<<RTAX_REORDERING);
|
||||
NEXT_ARG();
|
||||
}
|
||||
- if (get_unsigned(&rtt, *argv, 0))
|
||||
- invarg("\"rtt\" value is invalid\n", *argv);
|
||||
- rta_addattr32(mxrta, sizeof(mxbuf), RTAX_RTT, rtt);
|
||||
+ if (get_unsigned(&reord, *argv, 0))
|
||||
+ invarg("\"reordering\" value is invalid\n", *argv);
|
||||
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
|
||||
+#endif
|
||||
+#ifdef RTAX_FRAG_TIMEOUT
|
||||
+ } else if (strcmp(*argv, "fragtimeout") == 0) {
|
||||
+ unsigned timeout;
|
||||
+ NEXT_ARG();
|
||||
+ if (get_unsigned(&timeout, *argv, 0))
|
||||
+ invarg("\"timeout\" value is invalid\n", *argv);
|
||||
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_FRAG_TIMEOUT, timeout);
|
||||
+#endif
|
||||
} else if (matches(*argv, "window") == 0) {
|
||||
unsigned win;
|
||||
NEXT_ARG();
|
||||
Index: man/man8/ip.8
|
||||
===================================================================
|
||||
--- man/man8/ip.8.orig
|
||||
+++ man/man8/ip.8
|
||||
@@ -1095,6 +1095,14 @@
|
||||
.BR "net/ipv4/tcp_reordering" .
|
||||
|
||||
.TP
|
||||
+.BI fragtimeout " NUMBER " "(SuSE extension currently)"
|
||||
+Fragment timeout in seconds for IP fragments arriving from this distination.
|
||||
+If it is not given, Linux uses the value selected with
|
||||
+.B sysctl
|
||||
+variable
|
||||
+.BR "net/ipv4/ipfrag_timeout" .
|
||||
+
|
||||
+.TP
|
||||
.BI nexthop " NEXTHOP"
|
||||
the nexthop of a multipath route.
|
||||
.I NEXTHOP
|
33
iproute2-2.6.15-pdfdoc.diff
Normal file
33
iproute2-2.6.15-pdfdoc.diff
Normal file
@ -0,0 +1,33 @@
|
||||
Index: doc/Makefile
|
||||
===================================================================
|
||||
--- doc/Makefile.orig
|
||||
+++ doc/Makefile
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml))
|
||||
DVIFILES=$(subst .ps,.dvi,$(PSFILES))
|
||||
+PDFFILES=$(subst .ps,.pdf,$(PSFILES))
|
||||
|
||||
|
||||
all: pstwocol
|
||||
@@ -25,6 +26,8 @@
|
||||
|
||||
dvi: $(DVIFILES)
|
||||
|
||||
+pdf: $(PDFFILES)
|
||||
+
|
||||
print: $(PSFILES)
|
||||
$(LPR) $(PSFILES)
|
||||
|
||||
@@ -41,6 +44,11 @@
|
||||
echo "Re-running LaTeX $<, $${pass}d pass"; pass=$$[$$pass + 1]; \
|
||||
done
|
||||
|
||||
+#%.pdf: %.tex
|
||||
+# pdflatex $<
|
||||
+%.pdf: %.ps
|
||||
+ ps2pdf $<
|
||||
+
|
||||
%.ps: %.dvi
|
||||
$(DVIPS) $< -o $@
|
||||
|
11
iproute2-resolve-address.diff
Normal file
11
iproute2-resolve-address.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- lib/utils.c
|
||||
+++ lib/utils.c
|
||||
@@ -439,7 +439,7 @@
|
||||
len = 4;
|
||||
}
|
||||
|
||||
- hash = addr[len-1] ^ addr[len-2] ^ addr[len-3] ^ addr[len-4];
|
||||
+ hash = (addr[len-1] ^ addr[len-2] ^ addr[len-3] ^ addr[len-4]) & 0xff;
|
||||
|
||||
for (n = nht[hash]; n; n = n->next) {
|
||||
if (n->addr.family == af &&
|
73
iproute2-tc-flex-fixes.patch
Normal file
73
iproute2-tc-flex-fixes.patch
Normal file
@ -0,0 +1,73 @@
|
||||
--- tc/emp_ematch.l
|
||||
+++ tc/emp_ematch.l
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
%}
|
||||
|
||||
-%x str
|
||||
+%x STR
|
||||
|
||||
%option 8bit stack warn noyywrap prefix="ematch_"
|
||||
%%
|
||||
@@ -78,17 +78,17 @@
|
||||
}
|
||||
strbuf_index = 0;
|
||||
|
||||
- BEGIN(str);
|
||||
+ BEGIN(STR);
|
||||
}
|
||||
|
||||
-<str>\" {
|
||||
+<STR>\" {
|
||||
BEGIN(INITIAL);
|
||||
yylval.b = bstr_new(strbuf, strbuf_index);
|
||||
yylval.b->quoted = 1;
|
||||
return ATTRIBUTE;
|
||||
}
|
||||
|
||||
-<str>\\[0-7]{1,3} { /* octal escape sequence */
|
||||
+<STR>\\[0-7]{1,3} { /* octal escape sequence */
|
||||
int res;
|
||||
|
||||
sscanf(yytext + 1, "%o", &res);
|
||||
@@ -100,12 +100,12 @@
|
||||
strbuf_append_char((unsigned char) res);
|
||||
}
|
||||
|
||||
-<str>\\[0-9]+ { /* catch wrong octal escape seq. */
|
||||
+<STR>\\[0-9]+ { /* catch wrong octal escape seq. */
|
||||
fprintf(stderr, "error: invalid octale escape sequence\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
-<str>\\x[0-9a-fA-F]{1,2} {
|
||||
+<STR>\\x[0-9a-fA-F]{1,2} {
|
||||
int res;
|
||||
|
||||
sscanf(yytext + 2, "%x", &res);
|
||||
@@ -118,16 +118,16 @@
|
||||
strbuf_append_char((unsigned char) res);
|
||||
}
|
||||
|
||||
-<str>\\n strbuf_append_char('\n');
|
||||
-<str>\\r strbuf_append_char('\r');
|
||||
-<str>\\t strbuf_append_char('\t');
|
||||
-<str>\\v strbuf_append_char('\v');
|
||||
-<str>\\b strbuf_append_char('\b');
|
||||
-<str>\\f strbuf_append_char('\f');
|
||||
-<str>\\a strbuf_append_char('\a');
|
||||
+<STR>\\n strbuf_append_char('\n');
|
||||
+<STR>\\r strbuf_append_char('\r');
|
||||
+<STR>\\t strbuf_append_char('\t');
|
||||
+<STR>\\v strbuf_append_char('\v');
|
||||
+<STR>\\b strbuf_append_char('\b');
|
||||
+<STR>\\f strbuf_append_char('\f');
|
||||
+<STR>\\a strbuf_append_char('\a');
|
||||
|
||||
-<str>\\(.|\n) strbuf_append_char(yytext[1]);
|
||||
-<str>[^\\\n\"]+ strbuf_append_charp(yytext);
|
||||
+<STR>\\(.|\n) strbuf_append_char(yytext[1]);
|
||||
+<STR>[^\\\n\"]+ strbuf_append_charp(yytext);
|
||||
|
||||
[aA][nN][dD] return AND;
|
||||
[oO][rR] return OR;
|
359
iproute2.changes
Normal file
359
iproute2.changes
Normal file
@ -0,0 +1,359 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 7 01:06:43 CET 2006 - ro@suse.de
|
||||
|
||||
- fix permissions for manpage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 20 15:15:52 CEST 2006 - ms@suse.de
|
||||
|
||||
- replaced static HZ define to dynamic:
|
||||
#ifndef HZ
|
||||
#define HZ sysconf(_SC_CLK_TCK)
|
||||
#endif
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 26 01:22:34 CEST 2006 - schwab@suse.de
|
||||
|
||||
- Fix crash while resolving addresses.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 3 18:20:29 CEST 2006 - hvogel@suse.de
|
||||
|
||||
- fix flex input file to use uppercase STR to avoid conflicts.
|
||||
This prevented tc from being build [#162931]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:36:39 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 13:02:59 CET 2006 - mrueckert@suse.de
|
||||
|
||||
- update to version 2.6.15-060110
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 8 15:37:15 CET 2005 - mmj@suse.de
|
||||
|
||||
- update to version 051107
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 24 01:27:09 CEST 2005 - ro@suse.de
|
||||
|
||||
- fix filelist for libnlink
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 20 15:33:55 CEST 2005 - mmj@suse.de
|
||||
|
||||
- update to version 051007
|
||||
- fix buffer overflow in iproute.c [#129415] (thanks Richard, Marcus)
|
||||
- don't strip stuff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 17 07:54:28 CEST 2005 - cthiel@suse.de
|
||||
|
||||
- update to version 050816 [#105087]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 6 22:11:53 CEST 2005 - dmueller@suse.de
|
||||
|
||||
- add /bin/ip symlink (#102513)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 15 15:25:24 CEST 2005 - meissner@suse.de
|
||||
|
||||
- use RPM_OPT_FLAGS
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 9 13:14:56 CEST 2005 - mmj@suse.de
|
||||
|
||||
- Update to 2.6.11-050330
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 10 02:34:48 CET 2005 - ro@suse.de
|
||||
|
||||
- remove dropped tetex subpackages from nfb
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 4 10:37:22 CET 2005 - mmj@suse.de
|
||||
|
||||
- Update to 2.6.10-ss050124
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 7 08:01:52 CET 2004 - mmj@suse.de
|
||||
|
||||
- Don't trust that the kernel and do our own family check [#48600]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 24 13:10:05 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Clean up spec file a bit
|
||||
- Update to new snapshot including even more of our patches
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 12 13:13:24 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Update to 2.6.9 including some of our patches
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 17 08:51:50 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Make ip print correct type when printing stats [#42589]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 21 11:14:33 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Fix bufferoverflow in nstat [#39179]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 16 22:03:01 CEST 2004 - kukuk@suse.de
|
||||
|
||||
- Fix compiling with 2.6.5 kernel headers
|
||||
- Remove backup files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 14 16:08:54 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Don't remove buildroot before install
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 17 23:00:40 CET 2004 - mmj@suse.de
|
||||
|
||||
- No executables below /usr/include [#36342]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 10 01:41:45 CET 2004 - mmj@suse.de
|
||||
|
||||
- Olaf Kirch fixed the kernel, so remove the fix for [#35288]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 3 12:59:14 CET 2004 - ak@suse.de
|
||||
|
||||
- Fix hang in ip addr flush (#35288)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 7 01:01:22 CET 2004 - mmj@suse.de
|
||||
|
||||
- ifstat should store it's history in /var/tmp not /tmp
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 10 14:52:43 CET 2003 - mmj@suse.de
|
||||
|
||||
- Add more man-pages [#32981]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 15 13:04:04 CEST 2003 - mmj@suse.de
|
||||
|
||||
- Don't build as root
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 11 09:44:25 CEST 2003 - mmj@suse.de
|
||||
|
||||
- Add all the pdf documentation [#28637]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 12 12:01:43 CEST 2003 - kukuk@suse.de
|
||||
|
||||
- Fix filelist
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 4 11:27:58 CEST 2003 - kukuk@suse.de
|
||||
|
||||
- Don't use include-glibc directory
|
||||
- Fix arpd to compile with db4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 13 16:20:40 CEST 2003 - mmj@suse.de
|
||||
|
||||
- Remove files we don't package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 13:34:57 CEST 2003 - mmj@suse.de
|
||||
|
||||
- Add glib-include from newer iputils, and change a kernel-include
|
||||
to make it build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 11 14:26:27 CET 2003 - ug@suse.de
|
||||
|
||||
- patch for HTB support applied since 2.4.20 supports it
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 7 09:15:24 CET 2003 - mmj@suse.de
|
||||
|
||||
- Make the man tar-ball not contain gzipped man-pages, it's already
|
||||
compressed once.
|
||||
- Apply patch from Andi Kleen for fragtimeout functionality
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 23:49:53 CET 2002 - ro@suse.de
|
||||
|
||||
- changed neededforbuild <xshared> to <x-devel-packages>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 11:26:13 CET 2002 - ro@suse.de
|
||||
|
||||
- changed neededforbuild <sp> to <opensp>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 20 15:20:35 CEST 2002 - mmj@suse.de
|
||||
|
||||
- Add manpages, thanks to ASPLinux [#21115]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 21 11:48:15 CEST 2002 - mmj@suse.de
|
||||
|
||||
- Added a patch to exit when regular user tries to flush routes or
|
||||
addresses. [#16000]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 18 02:30:58 CEST 2002 - ro@suse.de
|
||||
|
||||
- added ghostscript-x11-packages to neededforbuild (for gs)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 13:12:49 CEST 2002 - postadal@suse.cz
|
||||
|
||||
- updated to ss020116
|
||||
* added several utilities several utilities: ss, nstat, ifstat,
|
||||
rtacct, arpd and module tcp_diag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 1 00:26:05 CET 2002 - ro@suse.de
|
||||
|
||||
- changed neededforbuild <libpng> to <libpng-devel-packages>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 31 22:51:13 CET 2002 - ro@suse.de
|
||||
|
||||
- added libgimpprint to neededforbuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 29 13:53:52 CET 2002 - vinil@suse.cz
|
||||
|
||||
- /usr/lib -> %_libdir
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 20 14:20:21 CET 2002 - vinil@suse.cz
|
||||
|
||||
- new version ss010824
|
||||
- spec file cleanup
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 19 18:06:49 CET 2001 - bjacke@suse.de
|
||||
|
||||
- move ip to /sbin
|
||||
- add iproute2 config files to /etc/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 10 16:05:03 CEST 2001 - stepan@suse.de
|
||||
|
||||
- fix compilation on ia64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 18 21:38:29 CEST 2001 - pthomas@suse.de
|
||||
|
||||
- Correct spelling in libnetlink.3
|
||||
- Add both German and English descriptions for libnlink
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 11:47:23 CEST 2001 - kukuk@suse.de
|
||||
|
||||
- Fix compiling on SPARC
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 21 14:22:19 CEST 2001 - vinil@suse.cz
|
||||
|
||||
- new version ss010803
|
||||
- get rid of kernel 2.2 patches
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 26 10:34:47 CEST 2001 - kukuk@suse.de
|
||||
|
||||
- add glib to needed for build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 20 12:06:42 CEST 2001 - kukuk@suse.de
|
||||
|
||||
- changed neededforbuild <gs_fonts> to <ghostscript-fonts-std>
|
||||
- changed neededforbuild <gs_lib> to <ghostscript-library>
|
||||
- changed neededforbuild <gs_x11> to <ghostscript-x11>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 27 01:25:23 CEST 2001 - ro@suse.de
|
||||
|
||||
- ETH_P_ECHO is apparently no longer defined
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 8 14:45:40 CET 2001 - uli@suse.de
|
||||
|
||||
- added xshared to neededforbuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 5 10:57:09 CET 2001 - kukuk@suse.de
|
||||
|
||||
- Remove bogus check for kernel header
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 1 15:42:16 CET 2000 - kukuk@suse.de
|
||||
|
||||
- Update to iproute2-2.2.4-now-ss001007 to fix compile problems
|
||||
with new kernel and glibc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 28 16:32:22 CEST 2000 - ak@suse.de
|
||||
|
||||
- fix permissions
|
||||
- fix advmss/mtu confusion between 2.2 and 2.4 (advmss now works with 2.2
|
||||
kernels and is always enabled)
|
||||
- add a new subrpm for libnetlink
|
||||
- add libnetlink man page
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 4 18:06:19 MEST 2000 - mha@suse.de
|
||||
|
||||
- new version (2.2.4-now-ss000305)
|
||||
- new README.SuSE
|
||||
- use ps2pdf instead of pdflatex, because the latter produces
|
||||
unusable pdf files for some reason
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 1 11:40:40 CEST 2000 - vinil@suse.cz
|
||||
|
||||
- documentation enhancement
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 26 12:53:20 CEST 2000 - vinil@suse.cz
|
||||
|
||||
- new version (ss000225)
|
||||
- buildroot added
|
||||
- sorted in group
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 17 13:49:15 MET 2000 - mha@suse.de
|
||||
|
||||
- new version (ss991023)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
|
||||
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 22 18:21:59 MEST 1999 - mha@suse.de
|
||||
|
||||
- new version
|
||||
- renamed package iproute->iproute2, because that's how the author
|
||||
calls it
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 13 08:46:42 MEST 1999 - ro@suse.de
|
||||
|
||||
- added psutils to neededforbuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 11 13:53:40 MEST 1999 - mha@suse.de
|
||||
|
||||
- new package: iproute (tools for using the advanced routing options
|
||||
in kernel 2.2)
|
||||
|
278
iproute2.spec
Normal file
278
iproute2.spec
Normal file
@ -0,0 +1,278 @@
|
||||
#
|
||||
# spec file for package iproute2 (Version 2.6.15)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: iproute2
|
||||
BuildRequires: db-devel ghostscript-fonts-std ghostscript-x11 glib libpng-devel libtiff-devel sgmltool te_ams te_latex xorg-x11-devel
|
||||
%define dateversion 060110
|
||||
License: GNU General Public License (GPL) - all versions
|
||||
Group: Productivity/Networking/Routing
|
||||
Provides: iproute
|
||||
Autoreqprov: on
|
||||
Version: 2.6.15
|
||||
Release: 32
|
||||
Summary: Advanced Routing
|
||||
URL: http://developer.osdl.org/dev/iproute2/
|
||||
Source0: %name-%version-%dateversion.tar.bz2
|
||||
Source1: libnetlink.3
|
||||
Patch0: %name-2.6.15-pdfdoc.diff
|
||||
Patch1: %name-2.6.15-flushcheckuid.diff
|
||||
Patch2: %name-2.6.15-fragtimeout.diff
|
||||
Patch3: %name-2.6.14-nostrip.diff
|
||||
Patch4: %name-tc-flex-fixes.patch
|
||||
Patch5: %name-resolve-address.diff
|
||||
Patch6: %name-2.6.15-060110.dif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%package -n libnlink
|
||||
Summary: A Higher Level Interface to the Netlink Service
|
||||
Group: System/Libraries
|
||||
Provides: libnetlink
|
||||
|
||||
%description -n libnlink
|
||||
libnetlink provides a higher level interface to rtnetlink(7).
|
||||
|
||||
|
||||
|
||||
|
||||
%description
|
||||
This package provides the tools ip, tc, and rtmon needed to use the new
|
||||
and advanced routing options of the Linux kernel. The SUSE Linux
|
||||
distribution has used this package for network setup since SuSE Linux
|
||||
8.0.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Alexey Kuznetsov <kuznet at ms2 dot inr dot ac dot ru>
|
||||
Stephem Hemminger <shemminger at osdl dot org>
|
||||
|
||||
%prep
|
||||
%setup -q -n %name-%version-%dateversion
|
||||
%patch
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6
|
||||
find . -name *.orig -print0 | xargs -r0 rm -v
|
||||
|
||||
%build
|
||||
make CCOPTS="-D_GNU_SOURCE $RPM_OPT_FLAGS -Wstrict-prototypes"
|
||||
cd doc
|
||||
make pdf
|
||||
|
||||
%install
|
||||
install -d $RPM_BUILD_ROOT/{etc/,sbin/,usr/{sbin,share/man/man{3,8}}}
|
||||
install -d $RPM_BUILD_ROOT/{/usr/include,%_libdir}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -m644 $RPM_SOURCE_DIR/libnetlink.3 $RPM_BUILD_ROOT/usr/share/man/man3
|
||||
install lib/libnetlink.a $RPM_BUILD_ROOT/%_libdir
|
||||
install include/libnetlink.h $RPM_BUILD_ROOT/usr/include
|
||||
mv $RPM_BUILD_ROOT/usr/sbin/ip $RPM_BUILD_ROOT/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/bin
|
||||
ln -sf /sbin/ip $RPM_BUILD_ROOT/bin/ip
|
||||
rm $RPM_BUILD_ROOT/usr/sbin/ifcfg
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/iproute2
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc doc/api-ip6-flowlabels.pdf doc/arpd.pdf doc/ip-cref.pdf README.iproute2+tc
|
||||
%doc doc/ip-tunnels.pdf doc/nstat.pdf doc/rtstat.pdf doc/ss.pdf README
|
||||
%doc RELNOTES ChangeLog examples/ README.decnet ip/ifcfg ip/routef ip/routel
|
||||
/usr/sbin/*
|
||||
/sbin/*
|
||||
/bin/ip
|
||||
%_mandir/man8/*
|
||||
%dir /etc/iproute2
|
||||
%config(noreplace) /etc/iproute2/rt_dsfield
|
||||
%config(noreplace) /etc/iproute2/rt_protos
|
||||
%config(noreplace) /etc/iproute2/rt_scopes
|
||||
%config(noreplace) /etc/iproute2/rt_realms
|
||||
%config(noreplace) /etc/iproute2/rt_tables
|
||||
%config(noreplace) /etc/iproute2/ematch_map
|
||||
/usr/lib/tc
|
||||
|
||||
%files -n libnlink
|
||||
%defattr(-,root,root)
|
||||
%attr(644,root,root) /usr/include/*
|
||||
%_mandir/man3/libnetlink*
|
||||
%_libdir/lib*
|
||||
|
||||
%changelog -n iproute2
|
||||
* Tue Nov 07 2006 - ro@suse.de
|
||||
- fix permissions for manpage
|
||||
* Thu Jul 20 2006 - ms@suse.de
|
||||
- replaced static HZ define to dynamic:
|
||||
[#]ifndef HZ
|
||||
[#]define HZ sysconf(_SC_CLK_TCK)
|
||||
[#]endif
|
||||
* Fri May 26 2006 - schwab@suse.de
|
||||
- Fix crash while resolving addresses.
|
||||
* Mon Apr 03 2006 - hvogel@suse.de
|
||||
- fix flex input file to use uppercase STR to avoid conflicts.
|
||||
This prevented tc from being build [#162931]
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Tue Jan 17 2006 - mrueckert@suse.de
|
||||
- update to version 2.6.15-060110
|
||||
* Tue Nov 08 2005 - mmj@suse.de
|
||||
- update to version 051107
|
||||
* Mon Oct 24 2005 - ro@suse.de
|
||||
- fix filelist for libnlink
|
||||
* Thu Oct 20 2005 - mmj@suse.de
|
||||
- update to version 051007
|
||||
- fix buffer overflow in iproute.c [#129415] (thanks Richard, Marcus)
|
||||
- don't strip stuff
|
||||
* Wed Aug 17 2005 - cthiel@suse.de
|
||||
- update to version 050816 [#105087]
|
||||
* Sat Aug 06 2005 - dmueller@suse.de
|
||||
- add /bin/ip symlink (#102513)
|
||||
* Wed Jun 15 2005 - meissner@suse.de
|
||||
- use RPM_OPT_FLAGS
|
||||
* Mon May 09 2005 - mmj@suse.de
|
||||
- Update to 2.6.11-050330
|
||||
* Thu Feb 10 2005 - ro@suse.de
|
||||
- remove dropped tetex subpackages from nfb
|
||||
* Fri Feb 04 2005 - mmj@suse.de
|
||||
- Update to 2.6.10-ss050124
|
||||
* Tue Dec 07 2004 - mmj@suse.de
|
||||
- Don't trust that the kernel and do our own family check [#48600]
|
||||
* Sun Oct 24 2004 - mmj@suse.de
|
||||
- Clean up spec file a bit
|
||||
- Update to new snapshot including even more of our patches
|
||||
* Tue Oct 12 2004 - mmj@suse.de
|
||||
- Update to 2.6.9 including some of our patches
|
||||
* Tue Aug 17 2004 - mmj@suse.de
|
||||
- Make ip print correct type when printing stats [#42589]
|
||||
* Wed Apr 21 2004 - mmj@suse.de
|
||||
- Fix bufferoverflow in nstat [#39179]
|
||||
* Fri Apr 16 2004 - kukuk@suse.de
|
||||
- Fix compiling with 2.6.5 kernel headers
|
||||
- Remove backup files
|
||||
* Wed Apr 14 2004 - mmj@suse.de
|
||||
- Don't remove buildroot before install
|
||||
* Wed Mar 17 2004 - mmj@suse.de
|
||||
- No executables below /usr/include [#36342]
|
||||
* Wed Mar 10 2004 - mmj@suse.de
|
||||
- Olaf Kirch fixed the kernel, so remove the fix for [#35288]
|
||||
* Wed Mar 03 2004 - ak@suse.de
|
||||
- Fix hang in ip addr flush (#35288)
|
||||
* Wed Jan 07 2004 - mmj@suse.de
|
||||
- ifstat should store it's history in /var/tmp not /tmp
|
||||
* Mon Nov 10 2003 - mmj@suse.de
|
||||
- Add more man-pages [#32981]
|
||||
* Wed Oct 15 2003 - mmj@suse.de
|
||||
- Don't build as root
|
||||
* Mon Aug 11 2003 - mmj@suse.de
|
||||
- Add all the pdf documentation [#28637]
|
||||
* Thu Jun 12 2003 - kukuk@suse.de
|
||||
- Fix filelist
|
||||
* Wed Jun 04 2003 - kukuk@suse.de
|
||||
- Don't use include-glibc directory
|
||||
- Fix arpd to compile with db4
|
||||
* Tue May 13 2003 - mmj@suse.de
|
||||
- Remove files we don't package
|
||||
* Mon May 12 2003 - mmj@suse.de
|
||||
- Add glib-include from newer iputils, and change a kernel-include
|
||||
to make it build
|
||||
* Tue Feb 11 2003 - ug@suse.de
|
||||
- patch for HTB support applied since 2.4.20 supports it
|
||||
* Fri Feb 07 2003 - mmj@suse.de
|
||||
- Make the man tar-ball not contain gzipped man-pages, it's already
|
||||
compressed once.
|
||||
- Apply patch from Andi Kleen for fragtimeout functionality
|
||||
* Mon Nov 11 2002 - ro@suse.de
|
||||
- changed neededforbuild <xshared> to <x-devel-packages>
|
||||
* Mon Nov 11 2002 - ro@suse.de
|
||||
- changed neededforbuild <sp> to <opensp>
|
||||
* Sun Oct 20 2002 - mmj@suse.de
|
||||
- Add manpages, thanks to ASPLinux [#21115]
|
||||
* Wed Aug 21 2002 - mmj@suse.de
|
||||
- Added a patch to exit when regular user tries to flush routes or
|
||||
addresses. [#16000]
|
||||
* Sun Aug 18 2002 - ro@suse.de
|
||||
- added ghostscript-x11-packages to neededforbuild (for gs)
|
||||
* Mon Apr 08 2002 - postadal@suse.cz
|
||||
- updated to ss020116
|
||||
* added several utilities several utilities: ss, nstat, ifstat,
|
||||
rtacct, arpd and module tcp_diag
|
||||
* Fri Feb 01 2002 - ro@suse.de
|
||||
- changed neededforbuild <libpng> to <libpng-devel-packages>
|
||||
* Thu Jan 31 2002 - ro@suse.de
|
||||
- added libgimpprint to neededforbuild
|
||||
* Tue Jan 29 2002 - vinil@suse.cz
|
||||
- /usr/lib -> %%_libdir
|
||||
* Sun Jan 20 2002 - vinil@suse.cz
|
||||
- new version ss010824
|
||||
- spec file cleanup
|
||||
* Mon Nov 19 2001 - bjacke@suse.de
|
||||
- move ip to /sbin
|
||||
- add iproute2 config files to /etc/
|
||||
* Wed Oct 10 2001 - stepan@suse.de
|
||||
- fix compilation on ia64
|
||||
* Tue Sep 18 2001 - pthomas@suse.de
|
||||
- Correct spelling in libnetlink.3
|
||||
- Add both German and English descriptions for libnlink
|
||||
* Mon Aug 27 2001 - kukuk@suse.de
|
||||
- Fix compiling on SPARC
|
||||
* Tue Aug 21 2001 - vinil@suse.cz
|
||||
- new version ss010803
|
||||
- get rid of kernel 2.2 patches
|
||||
* Thu Jul 26 2001 - kukuk@suse.de
|
||||
- add glib to needed for build
|
||||
* Fri Jul 20 2001 - kukuk@suse.de
|
||||
- changed neededforbuild <gs_fonts> to <ghostscript-fonts-std>
|
||||
- changed neededforbuild <gs_lib> to <ghostscript-library>
|
||||
- changed neededforbuild <gs_x11> to <ghostscript-x11>
|
||||
* Wed Jun 27 2001 - ro@suse.de
|
||||
- ETH_P_ECHO is apparently no longer defined
|
||||
* Thu Mar 08 2001 - uli@suse.de
|
||||
- added xshared to neededforbuild
|
||||
* Mon Mar 05 2001 - kukuk@suse.de
|
||||
- Remove bogus check for kernel header
|
||||
* Fri Dec 01 2000 - kukuk@suse.de
|
||||
- Update to iproute2-2.2.4-now-ss001007 to fix compile problems
|
||||
with new kernel and glibc
|
||||
* Mon Aug 28 2000 - ak@suse.de
|
||||
- fix permissions
|
||||
- fix advmss/mtu confusion between 2.2 and 2.4 (advmss now works with 2.2
|
||||
kernels and is always enabled)
|
||||
- add a new subrpm for libnetlink
|
||||
- add libnetlink man page
|
||||
* Tue Jul 04 2000 - mha@suse.de
|
||||
- new version (2.2.4-now-ss000305)
|
||||
- new README.SuSE
|
||||
- use ps2pdf instead of pdflatex, because the latter produces
|
||||
unusable pdf files for some reason
|
||||
* Thu Jun 01 2000 - vinil@suse.cz
|
||||
- documentation enhancement
|
||||
* Fri May 26 2000 - vinil@suse.cz
|
||||
- new version (ss000225)
|
||||
- buildroot added
|
||||
- sorted in group
|
||||
* Thu Feb 17 2000 - mha@suse.de
|
||||
- new version (ss991023)
|
||||
* Mon Sep 13 1999 - bs@suse.de
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
* Thu Jul 22 1999 - mha@suse.de
|
||||
- new version
|
||||
- renamed package iproute->iproute2, because that's how the author
|
||||
calls it
|
||||
* Tue Jul 13 1999 - ro@suse.de
|
||||
- added psutils to neededforbuild
|
||||
* Sun Jul 11 1999 - mha@suse.de
|
||||
- new package: iproute (tools for using the advanced routing options
|
||||
in kernel 2.2)
|
197
libnetlink.3
Normal file
197
libnetlink.3
Normal file
@ -0,0 +1,197 @@
|
||||
.TH libnetlink 3
|
||||
.SH NAME
|
||||
libnetlink \- A library for accessing the netlink service
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <asm/types.h>
|
||||
.br
|
||||
#include <libnetlink.h>
|
||||
.br
|
||||
#include <linux/netlink.h>
|
||||
.br
|
||||
#include <linux/rtnetlink.h>
|
||||
.sp
|
||||
int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
|
||||
.sp
|
||||
int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)
|
||||
.sp
|
||||
int rtnl_send(struct rtnl_handle *rth, char *buf, int len)
|
||||
.sp
|
||||
int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len)
|
||||
.sp
|
||||
int rtnl_dump_filter(struct rtnl_handle *rth,
|
||||
int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
|
||||
void *arg1,
|
||||
int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
void *arg2)
|
||||
.sp
|
||||
int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
|
||||
unsigned groups, struct nlmsghdr *answer,
|
||||
.br
|
||||
int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
.br
|
||||
void *jarg)
|
||||
.sp
|
||||
int rtnl_listen(struct rtnl_handle *rtnl,
|
||||
int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
void *jarg)
|
||||
.sp
|
||||
int rtnl_from_file(FILE *rtnl,
|
||||
int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
void *jarg)
|
||||
.sp
|
||||
int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data)
|
||||
.sp
|
||||
int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
|
||||
.sp
|
||||
int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data)
|
||||
.sp
|
||||
int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen)
|
||||
.SH DESCRIPTION
|
||||
libnetlink provides a higher level interface to
|
||||
.BR rtnetlink(7).
|
||||
The read functions return 0 on success and a negative errno on failure.
|
||||
The send functions return the amount of data sent, or -1 on error.
|
||||
.TP
|
||||
rtnl_open
|
||||
Open a rtnetlink socket and save the state into the
|
||||
.B rth
|
||||
handle. This handle is passed to all subsequent calls.
|
||||
.B subscriptions
|
||||
is a bitmap of the rtnetlink multicast groups the socket will be
|
||||
a member of.
|
||||
|
||||
.TP
|
||||
rtnl_wilddump_request
|
||||
Request a full dump of the
|
||||
.B type
|
||||
database for
|
||||
.B family
|
||||
addresses.
|
||||
.B type
|
||||
is a rtnetlink message type.
|
||||
.\" XXX
|
||||
|
||||
.TP
|
||||
rtnl_dump_request
|
||||
Request a full dump of the
|
||||
.B type
|
||||
data buffer into
|
||||
.B buf
|
||||
with maximum length of
|
||||
.B len.
|
||||
.B type
|
||||
is a rtnetlink message type.
|
||||
|
||||
.TP
|
||||
rtnl_dump_filter
|
||||
Receive netlink data after a request and filter it.
|
||||
The
|
||||
.B filter
|
||||
callback checks if the received message is wanted. It gets the source
|
||||
address of the message, the message itself and
|
||||
.B arg1
|
||||
as arguments. 0 as return means that the filter passed, a negative
|
||||
value is returned
|
||||
by
|
||||
.I rtnl_dump_filter
|
||||
in case of error. NULL for
|
||||
.I filter
|
||||
means to not use a filter.
|
||||
.B junk
|
||||
is used to filter messages not destined to the local socket.
|
||||
Only one message bundle is received. Unless there is no message
|
||||
pending, this function does not block.
|
||||
|
||||
.TP
|
||||
rtnl_listen
|
||||
Receive netlink data after a request and pass it to
|
||||
.I handler.
|
||||
.B handler
|
||||
is a callback that gets the message source address, the message itself,
|
||||
and the
|
||||
.B jarg
|
||||
cookie as arguments. It will get called for all received messages.
|
||||
Only one message bundle is received. Unless there is no message
|
||||
pending this function does not block.
|
||||
|
||||
.TP
|
||||
rtnl_from_file
|
||||
Works like
|
||||
.I rtnl_listen,
|
||||
but reads a netlink message bundle from the file
|
||||
.B file
|
||||
and passes the messages to
|
||||
.B handler
|
||||
for parsing. The file contains raw data as received from a rtnetlink socket.
|
||||
.PP
|
||||
The following functions are useful to construct custom rtnetlink messages. For
|
||||
simple database dumping with filtering it is better to use the higher level
|
||||
functions above. See
|
||||
.BR rtnetlink(3)
|
||||
and
|
||||
.BR netlink(3)
|
||||
on how to generate a rtnetlink message. The following utility functions
|
||||
require a continuous buffer that already contains a netlink message header
|
||||
and a rtnetlink request.
|
||||
|
||||
.TP
|
||||
rtnl_send
|
||||
Send the rtnetlink message in
|
||||
.B buf
|
||||
of length
|
||||
.B len
|
||||
to handle
|
||||
.B rth.
|
||||
|
||||
.TP
|
||||
addattr32
|
||||
Add a __u32 attribute of type
|
||||
.B type
|
||||
and with value
|
||||
.B data
|
||||
to netlink message
|
||||
.B n,
|
||||
which is part of a buffer of length
|
||||
.B maxlen.
|
||||
|
||||
.TP
|
||||
addattr_l
|
||||
Add a variable length attribute of type
|
||||
.B type
|
||||
and with value
|
||||
.B data
|
||||
and
|
||||
.B alen
|
||||
length to netlink message
|
||||
.B n,
|
||||
which is part of a buffer of length
|
||||
.B maxlen.
|
||||
.B data
|
||||
is copied.
|
||||
|
||||
.TP
|
||||
rta_addattr32
|
||||
Initialize the rtnetlink attribute
|
||||
.B rta
|
||||
with a __u32 data value.
|
||||
|
||||
.TP
|
||||
rta_addattr32
|
||||
Initialize the rtnetlink attribute
|
||||
.B rta
|
||||
with a variable length data value.
|
||||
|
||||
.SH BUGS
|
||||
The functions sometimes use fprintf and exit when a fatal error occurs.
|
||||
This library should be named librtnetlink.
|
||||
|
||||
.SH AUTHORS
|
||||
netlink/rtnetlink was designed and writen by Alexey Kuznetsov.
|
||||
Andi Kleen wrote the man page.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR netlink(7),
|
||||
.BR rtnetlink(7)
|
||||
.br
|
||||
/usr/include/linux/rtnetlink.h
|
Loading…
Reference in New Issue
Block a user