• Mikio Hara's avatar
    ipv6: add {Read,Write}Batch methods to PacketConn · 48359f4f
    Mikio Hara authored
    This change provides message IO functionality that may support the
    construction of modern datagram transport protocols.
    
    The modern datagram transport protocols on a multihomed node basically
    need to control each packet path for traffic engineering by using
    information belongs to network- or link-layer implementation. In
    addtion, it's desirable to be able to do simultaneous transmission
    across multiple network- or link-layer adjacencies wihtout any
    additional cost.
    
    The ReadBatch and WriteBatch methods of PacketConn can be used to read
    and write an IO message that contains the information of network- or
    link-layer implementation, and read and write a batch of IO messages
    on Linux. The Marshal and Parse methods of ControlMessage can help to
    marshal and parse information contained in IO messages.
    
    Updates golang/go#3661.
    
    Change-Id: I94484e2e135f4969ddf5c2548bf6be0cc16888bf
    Reviewed-on: https://go-review.googlesource.com/38276
    Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    48359f4f
payload_cmsg.go 1.15 KB