| 275 | ) |
| 276 | |
| 277 | func (a activateError) Error() string { |
| 278 | switch a { |
| 279 | case aeNoError: |
| 280 | return "No Error" |
| 281 | case aeActivated: |
| 282 | return "Already Activated" |
| 283 | case aePromisc: |
| 284 | return "Cannot set as promisc" |
| 285 | case aeNoSuchDevice: |
| 286 | return "No Such Device" |
| 287 | case aeDenied: |
| 288 | return "Permission Denied" |
| 289 | case aeNotUp: |
| 290 | return "Interface Not Up" |
| 291 | case aeWarning: |
| 292 | return fmt.Sprintf("Warning: %v", activateErrMsg.Error()) |
| 293 | case aeError: |
| 294 | return fmt.Sprintf("Error: %v", activateErrMsg.Error()) |
| 295 | default: |
| 296 | return fmt.Sprintf("unknown activated error: %d", a) |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | // getNextBufPtrLocked is shared code for ReadPacketData and |
| 301 | // ZeroCopyReadPacketData. |