UINT32 cnetcard_init(CNETCARD *cnetcard) { cstring_init(CNETCARD_NAME(cnetcard), NULL_PTR); cstring_init(CNETCARD_IPV4STR(cnetcard), NULL_PTR); cstring_init(CNETCARD_MACSTR(cnetcard), NULL_PTR); BSET(CNETCARD_MACADDR(cnetcard), 0, 6); CNETCARD_IPV4VAL(cnetcard) = 0; CNETCARD_STATE(cnetcard) = CNETCARD_ERR_STATE; return (0); }
EC_BOOL chfsnp_mgr_init(CHFSNP_MGR *chfsnp_mgr) { CHFSNP_MGR_CRWLOCK_INIT(chfsnp_mgr, LOC_CHFSNPMGR_0002); CHFSNP_MGR_CMUTEX_INIT(chfsnp_mgr, LOC_CHFSNPMGR_0003); cstring_init(CHFSNP_MGR_DB_ROOT_DIR(chfsnp_mgr), NULL_PTR); CHFSNP_MGR_NP_MODEL(chfsnp_mgr) = CHFSNP_ERR_MODEL; CHFSNP_MGR_NP_1ST_CHASH_ALGO_ID(chfsnp_mgr) = (uint8_t)CHASH_ERR_ALGO_ID; CHFSNP_MGR_NP_2ND_CHASH_ALGO_ID(chfsnp_mgr) = (uint8_t)CHASH_ERR_ALGO_ID; CHFSNP_MGR_NP_ITEM_MAX_NUM(chfsnp_mgr) = 0; CHFSNP_MGR_NP_MAX_NUM(chfsnp_mgr) = 0; cvector_init(CHFSNP_MGR_NP_HOME_DIR_VEC(chfsnp_mgr), 0, MM_CSTRING, CVECTOR_LOCK_ENABLE, LOC_CHFSNPMGR_0004); cvector_init(CHFSNP_MGR_NP_VEC(chfsnp_mgr), 0, MM_CHFSNP, CVECTOR_LOCK_ENABLE, LOC_CHFSNPMGR_0005); return (EC_TRUE); }
static int setup(void* param) { STLSOFT_SUPPRESS_UNUSED(param); return CSTRING_RC_SUCCESS != cstring_init(&string); }