Skip to content

Conversation

@AGLExport
Copy link

Existing libsocketcan has can interface configuration feature. I propose to extend CAN_GW support into lisocketcan.

A gcov and addresssanitizer are generic source code quality
improvement tools.  It's a good tool for testing.

This patch add enale/disable support for gcov and address-sanitizer.
libsocketcan.c has some common function between libcangw.c.  But
that common function is implemented with static.

This patch split out common static function to libsocketcan-utils.c.
Each function remove static from function.  In addition, it's
added __attribute__((__visibility__("hidden"))) to avoid symbol export.
This patch create cangw_add_rule and cangw_delete_rule
functions.  These support to modify CAN gateway configuration
one by one.
This patch add test code to test to cangw_add_rule and
cangw_delete_rule.
An cangw_clean_rule function is clean up for CAN gateway
configuration of all.

This patch implement to that clean function.
cangw_get_rules use to getting a all routing rule of the CAN
gateway infrastructure.  That function allocates memory to
save runting informations.
cangw_release_rules use to free memory that is allocated by
cangw_get_rules.

This patch impliment to both function.
This patch add some unit test. It uses CMOCKA library that is
unit test framework for C language.  In addtion, this patch
add some shell scripts that enables interface creation and
clean up, clean up in case of test is failed, and create
coveradge report.
@AGLExport AGLExport closed this May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants