aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vnet.h
AgeCommit message (Expand)AuthorFilesLines
2022-01-17vnet: introduce vnet_error()Damjan Marion1-0/+1
2021-04-22misc: add filter for specific error for pcap traceBenoƮt Ganne1-0/+1
2021-03-07dispatch-trace: move dispatch trace pcap code to pluginDamjan Marion1-0/+1
2021-03-05interface: move vnet_pcap_t to vnetDamjan Marion1-6/+24
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns1-1/+7
2020-08-25flow: add vnet/flow formal APIChenmin Sun1-0/+2
2020-08-14ip: add VNET_IP_TABLE_ADD_DEL_FUNCTIONSteven Luong1-0/+4
2019-09-26misc: add vnet classify filter set supportDave Barach1-3/+0
2019-09-20misc: classifier-based packet trace filterDave Barach1-0/+3
2019-05-17Add a debug-CLI leak-checkerDave Barach1-1/+0
2018-11-17pcap-based dispatch tracerDave Barach1-1/+1
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-0/+2
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace1-2/+2
2017-03-27Mcast rewrite no memcpyNeale Ranns1-1/+0
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+96
/span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Copyright (c) 2012 Eliot Dresselhaus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef included_clib_elf_self_h #define included_clib_elf_self_h #include <vppinfra/elf.h> #include <vppinfra/hash.h> #define CLIB_ELF_SECTION_DATA_ALIGN 32 #define CLIB_ELF_SECTION_ADD_PREFIX(n) "clib_elf_section_" n /* Attribute used is so that static registrations work even if variable is not referenced. */ #define CLIB_ELF_SECTION(SECTION) \ __attribute__ ((used, \ aligned (CLIB_ELF_SECTION_DATA_ALIGN), \ section (CLIB_ELF_SECTION_ADD_PREFIX (SECTION)))) /* Given pointer to previous data A get next pointer. EXTRA gives extra space beyond A + 1 used in object. */ #define clib_elf_section_data_next(a,extra) \ uword_to_pointer (round_pow2 (pointer_to_uword (a + 1) + (extra), \ CLIB_ELF_SECTION_DATA_ALIGN), \ void *) typedef struct { void *lo, *hi; } clib_elf_section_bounds_t; typedef struct { /* Vector of bounds for this section. Multiple shared objects may have instances of the same sections. */ clib_elf_section_bounds_t *bounds; /* Name of ELF section (e.g. .text). */ u8 *name; } clib_elf_section_t; typedef struct { /* Vector of sections. */ clib_elf_section_t *sections; /* Hash map of name to section index. */ uword *section_by_name; /* Unix path that we were exec()ed with. */ char *exec_path; elf_main_t *elf_mains; } clib_elf_main_t; always_inline void clib_elf_main_free (clib_elf_main_t * m) { clib_elf_section_t *s; vec_foreach (s, m->sections) { vec_free (s->bounds); vec_free (s->name); } vec_free (m->sections); hash_free (m->section_by_name); { elf_main_t *em; vec_foreach (em, m->elf_mains) { elf_main_free (em); } vec_free (m->elf_mains); } } /* Call with exec_path equal to argv[0] from C main. */ void clib_elf_main_init (char *exec_path); clib_elf_section_bounds_t *clib_elf_get_section_bounds (char *name); typedef struct { /* The symbol. */ elf64_symbol_t symbol; /* elf_main_t where symbol came from. */ u32 elf_main_index; /* Symbol table in elf_main_t where this symbol came from. */ u32 symbol_table_index; } clib_elf_symbol_t; /* Returns 1 if found; otherwise zero. */ uword clib_elf_symbol_by_name (char *name, clib_elf_symbol_t * result); uword clib_elf_symbol_by_address (uword address, clib_elf_symbol_t * result); format_function_t format_clib_elf_symbol, format_clib_elf_symbol_with_address; #endif /* included_clib_elf_self_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */