mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	(broken state) WIP address migration
This commit is contained in:
		
							parent
							
								
									ae96148008
								
							
						
					
					
						commit
						ace7b43b6d
					
				
					 9 changed files with 73 additions and 120 deletions
				
			
		| 
						 | 
				
			
			@ -230,14 +230,16 @@ func main() {
 | 
			
		|||
	switch {
 | 
			
		||||
	case *getaddr:
 | 
			
		||||
		if nodeid := getNodeID(); nodeid != nil {
 | 
			
		||||
			addr := *address.AddrForNodeID(nodeid)
 | 
			
		||||
			panic("TODO")
 | 
			
		||||
			addr := new(address.Address) //*address.AddrForNodeID(nodeid)
 | 
			
		||||
			ip := net.IP(addr[:])
 | 
			
		||||
			fmt.Println(ip.String())
 | 
			
		||||
		}
 | 
			
		||||
		return
 | 
			
		||||
	case *getsnet:
 | 
			
		||||
		if nodeid := getNodeID(); nodeid != nil {
 | 
			
		||||
			snet := *address.SubnetForNodeID(nodeid)
 | 
			
		||||
			panic("TODO")
 | 
			
		||||
			snet := new(address.Address) //*address.SubnetForNodeID(nodeid)
 | 
			
		||||
			ipnet := net.IPNet{
 | 
			
		||||
				IP:   append(snet[:], 0, 0, 0, 0, 0, 0, 0, 0),
 | 
			
		||||
				Mask: net.CIDRMask(len(snet)*8, 128),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue