summaryrefslogtreecommitdiff
path: root/sal/osl/unx/util.c
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-07-30 10:52:48 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-07-30 10:52:48 +0000
commit854b9eeffec7681a78b7c6467c02ab5a44a14435 (patch)
tree6d1ea9a3e8bc5d82dcacd76fb77c2ffaa6963d87 /sal/osl/unx/util.c
parent80ce7e5e97f52b5a900b8a09d232656fa75f3cb0 (diff)
CWS-TOOLING: integrate CWS fwk114
2009-07-08 Mikhail Voytenko #i102448# fix typo 2009-07-08 Mikhail Voytenko #i102448# detect the document of new format correctly 2009-07-03 Mikhail Voytenko #i101418# adjust header 2009-07-02 Mikhail Voytenko #i103001# Integrate the patch 2009-07-01 Mikhail Voytenko rebase to DEV300_m51 2009-06-25 Mikhail Voytenko #i71512# integrate the patch 2009-06-19 Mikhail Voytenko #i102931# check whether the file was changed even in case of system file locking 2009-06-10 Mikhail Voytenko #i102448# allow to turn the office update dialog off 2009-06-10 Mikhail Voytenko #i102448# allow to turn the office update dialog off 2009-06-09 Mikhail Voytenko #i96091# the disposed frame should throw DisposedException 2009-06-09 Mikhail Voytenko #i100835# commit the patch 2009-05-26 Mikhail Voytenko #i89514# integrate the patch 2009-05-26 Mikhail Voytenko #i30373# integrate the patch 2009-05-26 Mikhail Voytenko #i101418# fix the error handling
Diffstat (limited to 'sal/osl/unx/util.c')
-rw-r--r--sal/osl/unx/util.c77
1 files changed, 1 insertions, 76 deletions
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index c0b9e3c5aa09..66746fd3ff44 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -51,11 +51,10 @@
static int osl_getHWAddr(const char *ifname, char* hard_addr);
static int osl_checkAddr(const char* addr);
-static char* osl_decodeEtherAddr(const char *ptr, char* buff);
/*****************************************************************************/
-/* osl_getEtherAddr */
+/* osl_getEthernetAddress */
/*****************************************************************************/
sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
@@ -124,68 +123,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
}
-extern sal_Bool osl_getEtherAddr(sal_Char* pszAddr, sal_uInt16 BufferSize)
-{
- char buff[1024];
- char hard_addr[64];
- struct ifconf ifc;
- struct ifreq *ifr;
- int i;
- int so;
-
- (void) BufferSize; /* unused */
-
- if ( pszAddr == 0 )
- {
- return sal_False;
- }
-
-
- /*
- * All we need is ... a network file descriptor.
- * Normally, this is a very socket.
- */
-
- so = socket(AF_INET, SOCK_DGRAM, 0);
-
-
- /*
- * The first thing we have to do, get the interface configuration.
- * It is a list of attached/configured interfaces
- */
-
- ifc.ifc_len = sizeof(buff);
- ifc.ifc_buf = buff;
- if ( ioctl(so, SIOCGIFCONF, &ifc) < 0 )
- {
-/* fprintf(stderr, "SIOCGIFCONF: %s\n", strerror(errno));*/
- close(so);
- return sal_False;
- }
-
- close(so);
-
- /*
- * For each of the interfaces in the interface list,
- * try to get the hardware address
- */
-
- ifr = ifc.ifc_req;
- for ( i = ifc.ifc_len / sizeof(struct ifreq) ; --i >= 0 ; ifr++ )
- {
- int nRet=0;
- nRet = osl_getHWAddr(ifr->ifr_name,hard_addr);
- if ( nRet > 0 )
- {
- osl_decodeEtherAddr(hard_addr,pszAddr);
- return sal_True;
- }
- }
-
- return sal_False;
-}
-
-
/*****************************************************************************/
/* osl_getHWAddr */
/*****************************************************************************/
@@ -285,18 +222,6 @@ static int osl_checkAddr(const char* addr)
}
-/*****************************************************************************/
-/* osl_decodeEtherAddr */
-/*****************************************************************************/
-
-static char* osl_decodeEtherAddr(const char *ptr, char* buff)
-{
- sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X",
- (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
- (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377));
- return(buff);
-}
-
#if defined (SPARC)
#if defined (SOLARIS) && !defined(__sparcv8plus) && !defined(__sparcv9)