-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make, cmd_gen: fix make lib build, update cmd_gen (#15)
* Make, cmdgen: fix make lib build, refactor cmdgen
- Loading branch information
1 parent
8af0490
commit 1aa5ba8
Showing
9 changed files
with
75 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* SPDX-License-Identifier: AGPL-3.0-or-later */ | ||
#ifndef IPROUTE2_SYSREPO_CMDGEN_H | ||
#define IPROUTE2_SYSREPO_CMDGEN_H | ||
|
||
#include <libyang/libyang.h> | ||
|
||
#define CMDS_ARRAY_SIZE 1024 | ||
|
||
/** | ||
* @brief data struct to store the int argc,char **argv pair. | ||
* | ||
* this struct can be easily used by | ||
* iproute2::do_cmd(argc,argv) | ||
*/ | ||
struct cmd_args{ | ||
int argc; | ||
char **argv; | ||
const struct lyd_node *cmd_start_dnode; | ||
}; | ||
|
||
/** | ||
* @brief generate argc,argv commands out of the lyd_node (diff). | ||
* | ||
* | ||
* @param[in] node Data node diff to generate the argc, argv. | ||
* @return Array of cmd_args struct. | ||
*/ | ||
struct cmd_args** lyd2cmds_argv(const struct lyd_node *change_node); | ||
|
||
/** | ||
* @brief generate argc,argv rollback command out of the lyd_node (diff). | ||
* | ||
* | ||
* @param[in] node Data node diff to generate the argc, argv. | ||
* @return Array of cmd_args struct. | ||
*/ | ||
struct cmd_args* lyd2rollbackcmd_argv(const struct lyd_node *change_node); | ||
|
||
#endif// IPROUTE2_SYSREPO_CMDGEN_H |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters