ReadPacketWithRXTimestamp returns byte packet and HW RX timestamp
(connFd int)
| 138 | intfd = int(fd) |
| 139 | }) |
| 140 | if err != nil { |
| 141 | return -1, err |
| 142 | } |
| 143 | return intfd, nil |
| 144 | } |
| 145 | |
| 146 | // ReadPacketWithRXTimestamp returns byte packet and HW RX timestamp |
| 147 | func ReadPacketWithRXTimestamp(connFd int) ([]byte, unix.Sockaddr, time.Time, error) { |
| 148 | // Accessing hw timestamp |
| 149 | buf := make([]byte, PayloadSizeBytes) |
| 150 | oob := make([]byte, ControlSizeBytes) |
| 151 | |
| 152 | bbuf, sa, t, err := ReadPacketWithRXTimestampBuf(connFd, buf, oob) |
| 153 | if err != nil { |
searching dependent graphs…