mirror of
				https://git.proxmox.com/git/mirror_iproute2
				synced 2025-10-31 19:18:00 +00:00 
			
		
		
		
	 24bee3bf97
			
		
	
	
		24bee3bf97
		
	
	
	
	
		
			
			Two new commands are added as part of 'tipc node' command: $tipc node set key KEY [algname ALGNAME] [nodeid NODEID] $tipc node flush key which enable user to set and remove AEAD keys in kernel TIPC (requires the kernel option - 'TIPC_CRYPTO'). For the 'set key' command, the given 'nodeid' parameter decides the mode to be applied to the key, particularly: - If NODEID is empty, the key is a 'cluster' key which will be used for all message encryption/decryption from/to the node (i.e. both TX & RX). The same key will be set in the other nodes. - If NODEID is own node, the key is used for message encryption (TX) from the node. Whereas, if NODEID is a peer node, the key is for message decryption (RX) from that peer node. This is the 'per-node-key' mode that each nodes in the cluster has its specific (TX) key. Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: David Ahern <dsahern@gmail.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			649 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			649 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * misc.h	Miscellaneous TIPC helper functions.
 | |
|  *
 | |
|  *		This program is free software; you can redistribute it and/or
 | |
|  *		modify it under the terms of the GNU General Public License
 | |
|  *		as published by the Free Software Foundation; either version
 | |
|  *		2 of the License, or (at your option) any later version.
 | |
|  *
 | |
|  * Authors:	Richard Alpe <richard.alpe@ericsson.com>
 | |
|  */
 | |
| 
 | |
| #ifndef _TIPC_MISC_H
 | |
| #define _TIPC_MISC_H
 | |
| 
 | |
| #include <stdint.h>
 | |
| 
 | |
| uint32_t str2addr(char *str);
 | |
| int str2nodeid(char *str, uint8_t *id);
 | |
| void nodeid2str(uint8_t *id, char *str);
 | |
| void hash2nodestr(uint32_t hash, char *str);
 | |
| int str2key(char *str, struct tipc_aead_key *key);
 | |
| 
 | |
| #endif
 |