aboutsummaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted
AgeCommit message (Expand)AuthorFilesLines
2019-03-22DOC-ONLY: improve multi-arch documentationDave Barach2-0/+88
2019-03-15DOC ONLY: fix g2 build documentationDave Barach2-49/+44
2019-03-12DOC ONLY: add packet handoff docDave Barach1-11/+117
2019-02-27Fix centos build and build documentationjdenisco2-2/+2
2019-02-23Add support for 19.01jdenisco2-72/+13
2019-02-19VPP-1504: Remove JVPPMichal Cmarada6-13/+6
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion1-3/+0
2019-01-17DOC ONLY: wireshark dissector upstreamedDave Barach2-58/+48
2019-01-07Update tcpdump / wireshark packet format writeupDave Barach1-6/+14
2018-12-17docs: clarify vector element alignment description.Dave Wallace1-5/+8
2018-12-06DOC-ONLY: MFIB documentationNeale Ranns3-3/+94
2018-12-05DOC ONLY: describe dispatch pcap tracingDave Barach3-2/+263
2018-11-23doc: delete wrong description since VPP support 1G hugepageYulong Pei1-3/+3
2018-11-13docs and Config utility, package cloud supportjdenisco1-0/+4
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
2018-11-12docs: add 1810, including package cloudjdenisco2-119/+115
2018-11-06docs: Small changes to plugin, updated the requirementsjdenisco2-8/+17
2018-10-30DOC-ONLY: document packet intialization from scratchDave Barach1-0/+121
2018-10-24DOC ONLY: fix doc bugsDave Barach2-40/+44
2018-10-05DOC ONLY: clean up plugin documentationDave Barach4-175/+277
2018-09-24Add the sphinx docs build optionsjdenisco1-8/+12
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion3-4/+4
2018-09-06DOC ONLY: cmake / ninja build system docDave Barach2-1/+188
2018-08-31Docs: update MPLS FIB section with text from the wikiNeale Ranns1-49/+152
2018-08-30docs: FIB 2.0 startjdenisco15-1/+745
2018-08-27docs: Finish event logger, viewer and cleanup.John DeNisco8-142/+346
2018-08-17docs: Moved installing up a level, removed guides.John DeNisco7-18/+21
2018-08-17docs: Rework the VPP progressive Tutorial.John DeNisco14-16/+1314
2018-08-14DOCS: Moved multiarch and build system, Incorprated Scott's changesJohn DeNisco21-90/+661
2018-08-14DOCS: Updated startup.conf parametersandrew1-69/+174
2018-08-13DOCS: Cleanup Getting StartedJohn DeNisco8-612/+53
2018-08-10docs: A little cleanup and added some gdb examples.andrew4-18/+210
2018-08-09DOCS: General cleanup (did not move any sections)andrew4-16/+21
2018-08-09DOCS: modified writing docs sectionjavierfernandezvalles1-1/+1
2018-08-08DOC ONLY: Add a new doc for integrating a plugin with VPPandrew4-0/+710
2018-08-07docs: Cleaned up a little removed instructions for mac.andrew1-22/+89
2018-08-07DOC ONLY: document bihash table walker rulesDave Barach1-0/+35
2018-08-03Added missing fileJohn DeNisco3-8/+6
2018-08-03docs: Incororate Scott's overall reviewJohn DeNisco17-73/+129
2018-07-27Fix .gitignore so docs/Makefile is not ignored. Add README and Makefile. Fis ...John DeNisco1-11/+11
2018-07-26Initial commit of Sphinx docsJohn DeNisco49-0/+5756
(macro_main_t * mm, char *name) { uword *p; p = hash_get_mem (mm->the_value_table_hash, name); if (p) return (i8 *) (p[0]); else return 0; } /* * eval: takes a string, returns a vector. * looks up $foobar in the variable table. */ i8 * clib_macro_eval (macro_main_t * mm, i8 * s, i32 complain) { i8 *rv = 0; i8 *varname, *varvalue; i8 *ts; while (*s) { switch (*s) { case '\\': s++; /* fallthrough */ default: vec_add1 (rv, *s); s++; break; case '$': s++; varname = 0; /* * Make vector with variable name in it. */ while (*s && (macro_isalnum (*s) || (*s == '_') || (*s == '('))) { /* handle $(foo) */ if (*s == '(') { s++; /* skip '(' */ while (*s && *s != ')') { vec_add1 (varname, *s); s++; } if (*s) s++; /* skip ')' */ break; } vec_add1 (varname, *s); s++; } /* null terminate */ vec_add1 (varname, 0); /* Look for a builtin, e.g. $my_hostname */ if (!(varvalue = builtin_eval (mm, varname, complain))) { /* Look in value table */ if (!varvalue) { i8 *tmp = clib_macro_get_value (mm, (char *) varname); if (tmp) varvalue = (i8 *) format (0, "%s%c", tmp, 0); } #ifdef CLIB_UNIX /* Look in environment. */ if (!varvalue) { char *tmp = getenv ((char *) varname); if (tmp) varvalue = (i8 *) format (0, "%s%c", tmp, 0); } #endif /* CLIB_UNIX */ } if (varvalue) { /* recursively evaluate */ ts = clib_macro_eval (mm, varvalue, complain); vec_free (varvalue); /* add results to answer */ vec_append (rv, ts); /* Remove NULL termination or the results are sad */ _vec_len (rv) = vec_len (rv) - 1; vec_free (ts); } else { if (complain) clib_warning ("Undefined Variable Reference: %s\n", varname); vec_append (rv, format (0, "UNSET ")); _vec_len (rv) = vec_len (rv) - 1; } vec_free (varname); } } vec_add1 (rv, 0); return (rv); } /* * eval: takes a string, returns a vector. * looks up $foobar in the variable table. */ i8 * clib_macro_eval_dollar (macro_main_t * mm, i8 * s, i32 complain) { i8 *s2; i8 *rv; s2 = (i8 *) format (0, "$(%s)%c", s, 0); rv = clib_macro_eval (mm, s2, complain); vec_free (s2); return (rv); } void clib_macro_add_builtin (macro_main_t * mm, char *name, void *eval_fn) { hash_set_mem (mm->the_builtin_eval_hash, name, (uword) eval_fn); } #ifdef CLIB_UNIX static i8 * eval_hostname (macro_main_t * mm, i32 complain) { char tmp[128]; if (gethostname (tmp, sizeof (tmp))) return ((i8 *) format (0, "gethostname-error%c", 0)); return ((i8 *) format (0, "%s%c", tmp, 0)); } #endif void clib_macro_init (macro_main_t * mm) { if (mm->the_builtin_eval_hash != 0) { clib_warning ("mm %p already initialized", mm); return; } mm->the_builtin_eval_hash = hash_create_string (0, sizeof (uword)); mm->the_value_table_hash = hash_create_string (0, sizeof (uword)); #ifdef CLIB_UNIX hash_set_mem (mm->the_builtin_eval_hash, "hostname", (uword) eval_hostname); #endif } void clib_macro_free (macro_main_t * mm) { hash_pair_t *p; u8 **strings_to_free = 0; int i; hash_free (mm->the_builtin_eval_hash); /* *INDENT-OFF* */ hash_foreach_pair (p, mm->the_value_table_hash, ({ vec_add1 (strings_to_free, (u8 *) (p->key)); vec_add1 (strings_to_free, (u8 *) (p->value[0])); })); /* *INDENT-ON* */ for (i = 0; i < vec_len (strings_to_free); i++) vec_free (strings_to_free[i]); vec_free (strings_to_free); hash_free (mm->the_value_table_hash); } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */