From: Bernd Eckenfels Date: Tue, 5 Mar 2002 00:47:36 +0000 (+0000) Subject: export procnetdev_version, get_dev_fields, get_name from X-Git-Tag: upstream/1.99_20121209git~203 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=add5d92ac1654d937651884430e5c15c16e3479c;p=platform%2Fupstream%2Fnet-tools.git export procnetdev_version, get_dev_fields, get_name from lib/interface.c for general usage (e.g. in my next patch to iptunnel) --- diff --git a/include/interface.h b/include/interface.h index 0685cfc..afc1297 100644 --- a/include/interface.h +++ b/include/interface.h @@ -71,6 +71,10 @@ extern int if_readlist(void); extern int do_if_fetch(struct interface *ife); extern int do_if_print(struct interface *ife, void *cookie); +extern int procnetdev_version(char *buf); +extern int get_dev_fields(char *bp, struct interface *ife); +extern char * get_name(char *name, char *p); + extern void ife_print(struct interface *ptr); extern int ife_short; diff --git a/lib/interface.c b/lib/interface.c index c5f09de..ad268ae 100644 --- a/lib/interface.c +++ b/lib/interface.c @@ -7,7 +7,7 @@ 8/2000 Andi Kleen make the list operations a bit more efficient. People are crazy enough to use thousands of aliases now. - $Id: interface.c,v 1.22 2002/02/23 21:27:30 ecki Exp $ + $Id: interface.c,v 1.23 2002/03/05 00:47:36 ecki Exp $ */ #include "config.h" @@ -202,7 +202,7 @@ out: return err; } -static char *get_name(char *name, char *p) +char *get_name(char *name, char *p) { while (isspace(*p)) p++; @@ -229,7 +229,7 @@ static char *get_name(char *name, char *p) return p; } -static int procnetdev_version(char *buf) +int procnetdev_version(char *buf) { if (strstr(buf, "compressed")) return 3; @@ -238,7 +238,7 @@ static int procnetdev_version(char *buf) return 1; } -static int get_dev_fields(char *bp, struct interface *ife) +int get_dev_fields(char *bp, struct interface *ife) { switch (procnetdev_vsn) { case 3: