Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Add prototypes for functions that convert media to/f...



details:   https://anonhg.NetBSD.org/src/rev/c89444a1aadd
branches:  trunk
changeset: 571150:c89444a1aadd
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Nov 11 20:34:30 2004 +0000

description:
Add prototypes for functions that convert media to/from strings.
In libutil/if_media.c (moved from ifconfig.c so that they can be shared
in crunched binaries)

diffstat:

 sys/net/if_media.h |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 23a6003672eb -r c89444a1aadd sys/net/if_media.h
--- a/sys/net/if_media.h        Thu Nov 11 20:17:48 2004 +0000
+++ b/sys/net/if_media.h        Thu Nov 11 20:34:30 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_media.h,v 1.41 2004/10/16 11:11:04 dsl Exp $        */
+/*     $NetBSD: if_media.h,v 1.42 2004/11/11 20:34:30 dsl Exp $        */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -142,6 +142,7 @@
 
 /* Compute baudrate for a given media. */
 u_quad_t       ifmedia_baudrate(int);
+
 #endif /*_KERNEL */
 
 /*
@@ -578,4 +579,16 @@
          { NULL, NULL } },                                             \
 }
 
+#ifndef _KERNEL
+/* Functions for converting media to/from strings, in libutil/if_media.c */
+const char *get_media_type_string(int);
+const char *get_media_subtype_string(int);
+const char *get_media_mode_string(int);
+const char *get_media_option_string(int *);
+int get_media_mode(int, const char *);
+int get_media_subtype(int, const char *);
+int get_media_options(int, const char *, char **);
+int lookup_media_word(struct ifmedia_description *, int, const char *);
+#endif /* _KERNEL */
+
 #endif /* _NET_IF_MEDIA_H_ */



Home | Main Index | Thread Index | Old Index