/* ********************************************************************************************************* * uC/TCP-IP * The Embedded TCP/IP Suite * * Copyright 2004-2020 Silicon Laboratories Inc. www.silabs.com * * SPDX-License-Identifier: APACHE-2.0 * * This software is subject to an open source license and is distributed by * Silicon Laboratories Inc. pursuant to the terms of the Apache License, * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. * ********************************************************************************************************* */ /* ********************************************************************************************************* * * NETWORK DICTIONARY * * Filename : net_dict.h * Version : V3.06.00 ********************************************************************************************************* */ /* ********************************************************************************************************* ********************************************************************************************************* * MODULE ********************************************************************************************************* ********************************************************************************************************* */ #ifndef NET_DICT_MODULE #define NET_DICT_MODULE /* ********************************************************************************************************* ********************************************************************************************************* * INCLUDE FILES ********************************************************************************************************* ********************************************************************************************************* */ #include "lib_def.h" #include /* ********************************************************************************************************* ********************************************************************************************************* * DATA TYPES ********************************************************************************************************* ********************************************************************************************************* */ typedef CPU_INT32U DICT_KEY; #define DICT_KEY_INVALID DEF_INT_32U_MAX_VAL typedef struct dict { const DICT_KEY Key; const CPU_CHAR *StrPtr; const CPU_INT32U StrLen; } NET_DICT; /* ********************************************************************************************************* ********************************************************************************************************* * FUNCTION PROTOTYPES ********************************************************************************************************* ********************************************************************************************************* */ CPU_INT32U NetDict_KeyGet(const NET_DICT *p_dict_tbl, CPU_INT32U dict_size, const CPU_CHAR *p_str_cmp, CPU_BOOLEAN case_sensitive, CPU_INT32U str_len); NET_DICT *NetDict_EntryGet(const NET_DICT *p_dict_tbl, CPU_INT32U dict_size, CPU_INT32U key); CPU_CHAR *NetDict_ValCopy(const NET_DICT *p_dict_tbl, CPU_INT32U dict_size, CPU_INT32U key, CPU_CHAR *p_buf, CPU_SIZE_T buf_len); CPU_CHAR *NetDict_StrKeySrch(const NET_DICT *p_dict_tbl, CPU_INT32U dict_size, CPU_INT32U key, const CPU_CHAR *p_str, CPU_SIZE_T str_len); /* ********************************************************************************************************* ********************************************************************************************************* * MODULE END ********************************************************************************************************* ********************************************************************************************************* */ #endif