migrated some files from cmn to si

This commit is contained in:
2016-04-28 15:29:28 +00:00
parent 49d3dcfeda
commit 9cb6c963fa
48 changed files with 792 additions and 775 deletions

View File

@ -23,7 +23,6 @@ pkginclude_HEADERS = \
mbwc.h \
mem.h \
nwad.h \
nwif.h \
oht.h \
opt.h \
path.h \

View File

@ -124,7 +124,7 @@ am__can_run_installinfo = \
esac
am__pkginclude_HEADERS_DIST = alg.h chr.h cp949.h cp950.h dir.h dll.h \
env.h fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h \
main.h map.h mb8.h mbwc.h mem.h nwad.h nwif.h oht.h opt.h \
main.h map.h mb8.h mbwc.h mem.h nwad.h oht.h opt.h \
path.h pma.h rbt.h rex.h sck.h sll.h slmb.h str.h time.h tmr.h \
tre.h uni.h uri.h utf8.h xma.h Mmgr.hpp StdMmgr.hpp \
HeapMmgr.hpp Mmged.hpp ScopedPtr.hpp SharedPtr.hpp StrBase.hpp \
@ -358,7 +358,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkginclude_HEADERS = alg.h chr.h cp949.h cp950.h dir.h dll.h env.h \
fma.h fmt.h fs.h gdl.h glob.h htb.h hton.h ipad.h lda.h main.h \
map.h mb8.h mbwc.h mem.h nwad.h nwif.h oht.h opt.h path.h \
map.h mb8.h mbwc.h mem.h nwad.h oht.h opt.h path.h \
pma.h rbt.h rex.h sck.h sll.h slmb.h str.h time.h tmr.h tre.h \
uni.h uri.h utf8.h xma.h $(am__append_1)
all: all-am

View File

@ -1,131 +0,0 @@
/*
* $Id$
*
Copyright (c) 2006-2014 Chung, Hyung-Hwan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _QSE_CMN_NWIF_H_
#define _QSE_CMN_NWIF_H_
#include <qse/types.h>
#include <qse/macros.h>
#include <qse/cmn/nwad.h>
typedef struct qse_nwifcfg_t qse_nwifcfg_t;
enum qse_nwifcfg_flag_t
{
QSE_NWIFCFG_UP = (1 << 0),
QSE_NWIFCFG_RUNNING = (1 << 1),
QSE_NWIFCFG_BCAST = (1 << 2),
QSE_NWIFCFG_PTOP = (1 << 3),
QSE_NWIFCFG_LINKUP = (1 << 4),
QSE_NWIFCFG_LINKDOWN = (1 << 5)
};
enum qse_nwifcfg_type_t
{
QSE_NWIFCFG_IN4 = QSE_NWAD_IN4,
QSE_NWIFCFG_IN6 = QSE_NWAD_IN6
};
typedef enum qse_nwifcfg_type_t qse_nwifcfg_type_t;
struct qse_nwifcfg_t
{
qse_nwifcfg_type_t type; /* in */
qse_char_t name[64]; /* in/out */
unsigned int index; /* in/out */
/* ---------------- */
int flags; /* out */
int mtu; /* out */
qse_nwad_t addr; /* out */
qse_nwad_t mask; /* out */
qse_nwad_t ptop; /* out */
qse_nwad_t bcast; /* out */
/* ---------------- */
/* TODO: add hwaddr?? */
/* i support ethernet only currently */
qse_uint8_t ethw[6]; /* out */
};
#if defined(__cplusplus)
extern "C" {
#endif
QSE_EXPORT int qse_nwifmbstoindex (
const qse_mchar_t* ptr,
unsigned int* index
);
QSE_EXPORT int qse_nwifwcstoindex (
const qse_wchar_t* ptr,
unsigned int* index
);
QSE_EXPORT int qse_nwifmbsntoindex (
const qse_mchar_t* ptr,
qse_size_t len,
unsigned int* index
);
QSE_EXPORT int qse_nwifwcsntoindex (
const qse_wchar_t* ptr,
qse_size_t len,
unsigned int* index
);
QSE_EXPORT int qse_nwifindextombs (
unsigned int index,
qse_mchar_t* buf,
qse_size_t len
);
QSE_EXPORT int qse_nwifindextowcs (
unsigned int index,
qse_wchar_t* buf,
qse_size_t len
);
#if defined(QSE_CHAR_IS_MCHAR)
# define qse_nwifstrtoindex(ptr,index) qse_nwifmbstoindex(ptr,index)
# define qse_nwifstrntoindex(ptr,len,index) qse_nwifmbsntoindex(ptr,len,index)
# define qse_nwifindextostr(index,buf,len) qse_nwifindextombs(index,buf,len)
#else
# define qse_nwifstrtoindex(ptr,index) qse_nwifwcstoindex(ptr,index)
# define qse_nwifstrntoindex(ptr,len,index) qse_nwifwcsntoindex(ptr,len,index)
# define qse_nwifindextostr(index,buf,len) qse_nwifindextowcs(index,buf,len)
#endif
QSE_EXPORT int qse_getnwifcfg (
qse_nwifcfg_t* cfg
);
#if defined(__cplusplus)
}
#endif
#endif