]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/yggdrasil/tcpip.go
Ability to use newer gvisor's API
[nncp.git] / src / yggdrasil / tcpip.go
index a1a71acd3eab4fae041ad22e5a16d9c764bd4b4c..e7c4944d290ce0cd3d9a0c951717ef5b8cab57fb 100644 (file)
@@ -68,7 +68,7 @@ func (*TCPIPEndpoint) LinkAddress() tcpip.LinkAddress { return "" }
 
 func (*TCPIPEndpoint) Wait() {}
 
-func (e *TCPIPEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error {
+func (e *TCPIPEndpoint) WritePacket(pkt stack.PacketBufferPtr) tcpip.Error {
        v := pkt.ToView()
        n, err := v.Read(e.writeBuf)
        if err != nil {
@@ -99,13 +99,9 @@ func (e *TCPIPEndpoint) WritePackets(pbs stack.PacketBufferList) (int, tcpip.Err
        return len(pbs.AsSlice()), nil
 }
 
-func (e *TCPIPEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error {
-       panic("not implemented")
-}
-
 func (*TCPIPEndpoint) ARPHardwareType() header.ARPHardwareType { return header.ARPHardwareNone }
 
-func (e *TCPIPEndpoint) AddHeader(*stack.PacketBuffer) {}
+func (e *TCPIPEndpoint) AddHeader(stack.PacketBufferPtr) {}
 
 func convertToFullAddr(ip net.IP, port int) (tcpip.FullAddress, tcpip.NetworkProtocolNumber) {
        return tcpip.FullAddress{