aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mactime/mactime.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-20/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-09-26api: replace print functions wth formatDamjan Marion1-1/+0
Type: improvement Change-Id: I7f7050c19453a69a7fb6c5e62f8f57db847d9144 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-01-15mactime: fix memory leakDave Barach1-1/+2
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I1ef5cb250ac1e35b9a5003597eda3d54d2e5ca73
2021-04-19interface: interface-output end node reworkDamjan Marion1-3/+2
- rename node to more meaningful name - introduce lookup tables - enable multiarch - quad-loop node - enqqueue to next instead of enqueueing to node Type: improvement Change-Id: Ibb208047ae04bb6cfe56db558d3b8938bc14b4fe Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-6/+6
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-20ip-neighbor: Use ip_address_t rather than ip46_address_tNeale Ranns1-1/+1
Type: improvement Change-Id: Ica5f395075677bda5f38d28e704f65350af88610 Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-06-07mactime: print error if feature not enabledDave Barach1-1/+8
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I8fbc4baefecf512573126c5085ed7a6e2e360fbe
2020-05-06docs: clean up make docs jobPaul Vinciguerra1-1/+2
Type: docs Change-Id: I9b5e5137eb4c1e89f6e8d7a278cd11a0fd496471 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-03-12vppinfra: refactor clib_timebase_tDave Barach1-1/+2
Add a clib_time_t * argument to clib_timebase_init(...), to encourage client code to share the vlib_main_t's clib_time_t object. Display the current day / date in GMT via the "show time" debug CLI. Fix the test framework so it processes the new "show time" output format. Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I5e52d57eb164b7cdb6355362d520df6928491711
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns1-14/+26
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-10api: multiple connections per processDave Barach1-1/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-12-06mactime: update api to use explicit typesOle Troan1-0/+1
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Id347e77d0230bf1b22df75bf1ae63a50eaf4d564
2019-10-14mactime: add the "mactime.json" builtin URLDave Barach1-0/+7
If the http static server plugin is enabled, register the name "mactime.json" with the server. Visiting <web-root>/mactime.json produces a json brain-dump of the mactime table. Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ie39b0c776675864a85251b8c07fbf719d399f6de
2019-10-13mactime: pass context in reply to mactime_dumpKeith Burns1-0/+1
Type: fix mactime_dump API didn't copy context to _details reply, causing subscription issues. Change-Id: Ida9f28b437847fba67a7e0832baa2b25a46882a9 Signed-off-by: Keith Burns <alagalah@gmail.com>
2019-10-07mactime: add a "top" command to watch device statsDave Barach1-0/+79
Include a binary API change NOT suitable for cherry-picking into 19.08 Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id369514a3085f5e4bcee34819c55c4636df9b518
2019-09-30mactime: remove api boilerplateOle Troan1-71/+5
Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I034cc6fb2a12d1b43b3470a1ba39cc1fe020386a
2019-06-08mactime: add per-mac allow-with-quota featureDave Barach1-6/+28
Specify a data limit during specified time ranges. Outside of the specified time ranges, data will be allowed. Clean up "show mactime" output. Type: feature Change-Id: Iddd6678e7ded1d0f9cb88d69c656de8d87d5694c Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-04mactime: upstream new featuresDave Barach1-4/+71
Add per mac address data quotas (simple version) Add mini-ACLs to turf "call home" traffic from a certain species of security DVR. Add FEATURE.yaml Update the API version number Type: feature Feature-name: mactime Change-Id: Ida6945f7791ab43909afa68dcf2f652b20c53afd Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-09add mactime plugin unit / code coverage testsDave Barach1-5/+2
The unit and code coverage tests are boring. The rest of the patch involves test and packet-generator infra cleanups. Teach the "make test-xxx" family of targets to set the api test plugin path correctly, to make "binary-api <api-message-name> <args>" debug CLI commands work correctly in the "make test" environment. Unfortunately involves both the top-level and test Makefiles. Add a minor pg cli feature, a CLI to manually set s->sw_if_index[VLIB_TX]. Consider the case where one configures an interface with both a device-input and an output feature. To test the output feature using the pg, it's necessary to inject packets into the interface output node with both b->sw_if_index[VLIB_TX] and b->sw_if_index[VLIB_RX] set correctly. For example: packet-generator new { name tx limit 15 size 128-128 interface local0 # rx: device input feature not configured on local0 tx-interface loop0 # tx: output node requires b->sw_if_index[VLIB_TX] node loop0-output data { hex 0x01005e7ffffa000dead0000008000102030405060708090a0b0c0d0e0f0102030405 } } Fix a longstanding bug in the packet generator stream setup. Remove kludges which set b->sw_if_index[VLIB_TX] to ~0 [in multiple places] instead of using the stream value s->sw_if_index[VLIB_TX], and setting THAT datum correctly. Change-Id: I1097a18e8db73661ded6b822c1d718f7e5cf36ed Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- Make plugin descriptions more consistent so the output of "show plugin" can be used in the wiki. Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-01-30Use IP and MAC API types for neighborsNeale Ranns1-2/+1
use address_t and mac_address_t for IPv6 and ARP entries and all other API calls in ip.api aprat from the route ones, that will follow in a separate commit Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-01Fix API name_crc format stored in msg_api_tableIgor Mikhailov (imichail)1-1/+1
Change-Id: I716d025beb8f649060238c2bd388357943643621 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-3/+3
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-11VPP-1338: fix coverity warning in mactime pluginDave Barach1-1/+3
Add missing VALIDATE_SW_IF_INDEX macro / check. Net of this fix, a spurious warning will probably recur. Coverity will complain that sw_if_index is tainted. Please dismiss the warning. Change-Id: Iec31ce1d86f742e197e63b0c5d474cd5e496ee5f Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-23Tx feature node, for accounting purposesDave Barach1-22/+98
Switch to combined allow/drop counters Show matching ip4 neighbor address if known Add static-allow mactime entries for unknown mac addresses Add the "clear mactime" command Change-Id: Ib963981438dfb8a123df1b3c023bd5fcc27f888f Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-06-21Null terminate name stringDave Barach1-1/+1
Change-Id: If7bcc6ae3358b5e39bf76481ee58f4dbaa53d895 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-20Nested-loop index typo. Oops.Dave Barach1-6/+6
Change-Id: I73b5a4adcfce0d7cd1dd4cf6d9d6a5fb25256bcf Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-19Driver level time-based src mac filterDave Barach1-0/+533
Change-Id: I062d7653e00d77e73a61d8841e01ab4a159b6404 Signed-off-by: Dave Barach <dbarach@cisco.com>