diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-11-03 08:40:23 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2023-12-14 14:58:33 +0100 |
| commit | 69bff19c43c8f263aeb0fb3211ee0e3faf37ec5c (patch) | |
| tree | edf4dc0473e770e6927e27db93c1168326678caa /zebra/zebra_srv6.h | |
| parent | 8d0b4745a1acd5e363159a1b9732a0fd596413e5 (diff) | |
zebra, lib, vtysh: Add CLI cmd to set/unset SRv6 encap source address
- Add a new node `SRV6_ENCAP_NODE` to the CLI graph. This node allows
users to configure encapsulation parameters for SRv6, including the
source address of the outer encapsulating IPv6 header.
- Install a new CLI command `source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to configure the source
address of the outer encapsulating IPv6 header.
- Install a new CLI command `no source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to unset the
source address of the outer encapsulating IPv6 header and restore the
default source address.
Examples:
```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# source-address fc00:0:1::1
```
```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# no source-address
```
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'zebra/zebra_srv6.h')
| -rw-r--r-- | zebra/zebra_srv6.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zebra_srv6.h b/zebra/zebra_srv6.h index 73876741fd..21936c3323 100644 --- a/zebra/zebra_srv6.h +++ b/zebra/zebra_srv6.h @@ -19,6 +19,9 @@ /* SRv6 instance structure. */ struct zebra_srv6 { struct list *locators; + + /* Source address for SRv6 encapsulation */ + struct in6_addr encap_src_addr; }; /* declare hooks for the basic API, so that it can be specialized or served @@ -68,4 +71,7 @@ extern void srv6_manager_release_locator_chunk_call(struct zserv *client, extern int srv6_manager_client_disconnect_cb(struct zserv *client); extern int release_daemon_srv6_locator_chunks(struct zserv *client); +extern void zebra_srv6_encap_src_addr_set(struct in6_addr *src_addr); +extern void zebra_srv6_encap_src_addr_unset(void); + #endif /* _ZEBRA_SRV6_H */ |
