mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Remove unneeded AWDL context functions
This commit is contained in:
		
							parent
							
								
									4622a85c34
								
							
						
					
					
						commit
						c8db66b17d
					
				
					 1 changed files with 0 additions and 16 deletions
				
			
		| 
						 | 
					@ -64,15 +64,6 @@ func (c *Core) AWDLCreateInterface(boxPubKey string, sigPubKey string, name stri
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Core) AWDLCreateInterfaceFromContext(context []byte, name string) error {
 | 
					 | 
				
			||||||
	if len(context) < crypto.BoxPubKeyLen+crypto.SigPubKeyLen {
 | 
					 | 
				
			||||||
		return errors.New("Not enough bytes in context")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	boxPubKey := hex.EncodeToString(context[:crypto.BoxPubKeyLen])
 | 
					 | 
				
			||||||
	sigPubKey := hex.EncodeToString(context[crypto.BoxPubKeyLen:])
 | 
					 | 
				
			||||||
	return c.AWDLCreateInterface(boxPubKey, sigPubKey, name)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (c *Core) AWDLShutdownInterface(name string) error {
 | 
					func (c *Core) AWDLShutdownInterface(name string) error {
 | 
				
			||||||
	return c.awdl.shutdown(name)
 | 
						return c.awdl.shutdown(name)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -92,10 +83,3 @@ func (c *Core) AWDLSendPacket(identity string, buf []byte) error {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return errors.New("AWDLSendPacket identity not known: " + identity)
 | 
						return errors.New("AWDLSendPacket identity not known: " + identity)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
func (c *Core) AWDLConnectionContext() []byte {
 | 
					 | 
				
			||||||
	var context []byte
 | 
					 | 
				
			||||||
	context = append(context, c.boxPub[:]...)
 | 
					 | 
				
			||||||
	context = append(context, c.sigPub[:]...)
 | 
					 | 
				
			||||||
	return context
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue