bblog: show textual errno values

This commit is contained in:
Michael Tuexen 2023-02-19 16:37:21 +01:00
parent cd6fe39455
commit ece039ca0c
2 changed files with 210 additions and 1 deletions

View File

@ -263,7 +263,7 @@ proto_register_bblog(void)
{ &hf_event_flags_hdr, { "TCP header", "bblog.event_flags_hdr", FT_BOOLEAN, 16, TFS(&tfs_available_not_available), BBLOG_EVENT_FLAG_HDR, NULL, HFILL} },
{ &hf_event_flags_verbose, { "Additional information", "bblog.event_flags_verbose", FT_BOOLEAN, 16, TFS(&tfs_available_not_available), BBLOG_EVENT_FLAG_VERBOSE, NULL, HFILL} },
{ &hf_event_flags_stack, { "Stack specific information", "bblog.event_flags_stack", FT_BOOLEAN, 16, TFS(&tfs_available_not_available), BBLOG_EVENT_FLAG_STACKINFO, NULL, HFILL} },
{ &hf_errno, { "Error Number", "bblog.errno", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL} },
{ &hf_errno, { "Error Number", "bblog.errno", FT_INT32, BASE_DEC, VALS(errno_values), 0x0, NULL, HFILL} },
{ &hf_rxb_acc, { "Receive Buffer ACC", "bblog.rxb_acc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} },
{ &hf_rxb_ccc, { "Receive Buffer CCC", "bblog.rxb_ccc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} },
{ &hf_rxb_spare, { "Receive Buffer Spare", "bblog.rxb_spare", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} },

View File

@ -242,4 +242,213 @@ static const value_string event_identifier_values[] = {
#define BBLOG_SND_SCALE_MASK 0x0f
#define BBLOG_RCV_SCALE_MASK 0xf0
/*
* The errno values used here are defined in
* https://cgit.freebsd.org/src/tree/sys/sys/errno.h
*/
#define BBLOG_ERRNO_UNKNOWN -1
#define BBLOG_ERRNO_NOERROR 0
#define BBLOG_ERRNO_EPERM 1
#define BBLOG_ERRNO_ENOENT 2
#define BBLOG_ERRNO_ESRCH 3
#define BBLOG_ERRNO_EINTR 4
#define BBLOG_ERRNO_EIO 5
#define BBLOG_ERRNO_ENXIO 6
#define BBLOG_ERRNO_E2BIG 7
#define BBLOG_ERRNO_ENOEXEC 8
#define BBLOG_ERRNO_EBADF 9
#define BBLOG_ERRNO_ECHILD 10
#define BBLOG_ERRNO_EDEADLK 11
#define BBLOG_ERRNO_ENOMEM 12
#define BBLOG_ERRNO_EACCES 13
#define BBLOG_ERRNO_EFAULT 14
#define BBLOG_ERRNO_ENOTBLK 15
#define BBLOG_ERRNO_EBUSY 16
#define BBLOG_ERRNO_EEXIST 17
#define BBLOG_ERRNO_EXDEV 18
#define BBLOG_ERRNO_ENODEV 19
#define BBLOG_ERRNO_ENOTDIR 20
#define BBLOG_ERRNO_EISDIR 21
#define BBLOG_ERRNO_EINVAL 22
#define BBLOG_ERRNO_ENFILE 23
#define BBLOG_ERRNO_EMFILE 24
#define BBLOG_ERRNO_ENOTTY 25
#define BBLOG_ERRNO_ETXTBSY 26
#define BBLOG_ERRNO_EFBIG 27
#define BBLOG_ERRNO_ENOSPC 28
#define BBLOG_ERRNO_ESPIPE 29
#define BBLOG_ERRNO_EROFS 30
#define BBLOG_ERRNO_EMLINK 31
#define BBLOG_ERRNO_EPIPE 32
#define BBLOG_ERRNO_EDOM 33
#define BBLOG_ERRNO_ERANGE 34
#define BBLOG_ERRNO_EAGAIN 35
#define BBLOG_ERRNO_EWOULDBLOCK 35
#define BBLOG_ERRNO_EAGAIN 35
#define BBLOG_ERRNO_EINPROGRESS 36
#define BBLOG_ERRNO_EALREADY 37
#define BBLOG_ERRNO_ENOTSOCK 38
#define BBLOG_ERRNO_EDESTADDRREQ 39
#define BBLOG_ERRNO_EMSGSIZE 40
#define BBLOG_ERRNO_EPROTOTYPE 41
#define BBLOG_ERRNO_ENOPROTOOPT 42
#define BBLOG_ERRNO_EPROTONOSUPPORT 43
#define BBLOG_ERRNO_ESOCKTNOSUPPORT 44
#define BBLOG_ERRNO_EOPNOTSUPP 45
#define BBLOG_ERRNO_EPFNOSUPPORT 46
#define BBLOG_ERRNO_EAFNOSUPPORT 47
#define BBLOG_ERRNO_EADDRINUSE 48
#define BBLOG_ERRNO_EADDRNOTAVAIL 49
#define BBLOG_ERRNO_ENETDOWN 50
#define BBLOG_ERRNO_ENETUNREACH 51
#define BBLOG_ERRNO_ENETRESET 52
#define BBLOG_ERRNO_ECONNABORTED 53
#define BBLOG_ERRNO_ECONNRESET 54
#define BBLOG_ERRNO_ENOBUFS 55
#define BBLOG_ERRNO_EISCONN 56
#define BBLOG_ERRNO_ENOTCONN 57
#define BBLOG_ERRNO_ESHUTDOWN 58
#define BBLOG_ERRNO_ETOOMANYREFS 59
#define BBLOG_ERRNO_ETIMEDOUT 60
#define BBLOG_ERRNO_ECONNREFUSED 61
#define BBLOG_ERRNO_ELOOP 62
#define BBLOG_ERRNO_ENAMETOOLONG 63
#define BBLOG_ERRNO_EHOSTDOWN 64
#define BBLOG_ERRNO_EHOSTUNREACH 65
#define BBLOG_ERRNO_ENOTEMPTY 66
#define BBLOG_ERRNO_EPROCLIM 67
#define BBLOG_ERRNO_EUSERS 68
#define BBLOG_ERRNO_EDQUOT 69
#define BBLOG_ERRNO_ESTALE 70
#define BBLOG_ERRNO_EREMOTE 71
#define BBLOG_ERRNO_EBADRPC 72
#define BBLOG_ERRNO_ERPCMISMATCH 73
#define BBLOG_ERRNO_EPROGUNAVAIL 74
#define BBLOG_ERRNO_EPROGMISMATCH 75
#define BBLOG_ERRNO_EPROCUNAVAIL 76
#define BBLOG_ERRNO_ENOLCK 77
#define BBLOG_ERRNO_ENOSYS 78
#define BBLOG_ERRNO_EFTYPE 79
#define BBLOG_ERRNO_EAUTH 80
#define BBLOG_ERRNO_ENEEDAUTH 81
#define BBLOG_ERRNO_EIDRM 82
#define BBLOG_ERRNO_ENOMSG 83
#define BBLOG_ERRNO_EOVERFLOW 84
#define BBLOG_ERRNO_ECANCELED 85
#define BBLOG_ERRNO_EILSEQ 86
#define BBLOG_ERRNO_ENOATTR 87
#define BBLOG_ERRNO_EDOOFUS 88
#define BBLOG_ERRNO_EBADMSG 89
#define BBLOG_ERRNO_EMULTIHOP 90
#define BBLOG_ERRNO_ENOLINK 91
#define BBLOG_ERRNO_EPROTO 92
#define BBLOG_ERRNO_ENOTCAPABLE 93
#define BBLOG_ERRNO_ECAPMODE 94
#define BBLOG_ERRNO_ENOTRECOVERABLE 95
#define BBLOG_ERRNO_EOWNERDEAD 96
#define BBLOG_ERRNO_EINTEGRITY 97
static const value_string errno_values[] = {
{ BBLOG_ERRNO_UNKNOWN, "Not known" },
{ BBLOG_ERRNO_NOERROR, "No error" },
{ BBLOG_ERRNO_EPERM, "EPERM (Operation not permitted)" },
{ BBLOG_ERRNO_ENOENT, "ENOENT (No such file or directory)" },
{ BBLOG_ERRNO_ESRCH, "ESRCH (No such process)" },
{ BBLOG_ERRNO_EINTR, "EINTR (Interrupted system call)" },
{ BBLOG_ERRNO_EIO, "EIO (Input/output error)" },
{ BBLOG_ERRNO_ENXIO, "ENXIO (Device not configured)" },
{ BBLOG_ERRNO_E2BIG, "E2BIG (Argument list too long)" },
{ BBLOG_ERRNO_ENOEXEC, "ENOEXEC (Exec format error)" },
{ BBLOG_ERRNO_EBADF, "EBADF (Bad file descriptor)" },
{ BBLOG_ERRNO_ECHILD, "ECHILD (No child processes)" },
{ BBLOG_ERRNO_EDEADLK, "EDEADLK (Resource deadlock avoided)" },
{ BBLOG_ERRNO_ENOMEM, "ENOMEM (Cannot allocate memory)" },
{ BBLOG_ERRNO_EACCES, "EACCES (Permission denied)" },
{ BBLOG_ERRNO_EFAULT, "EFAULT (Bad address)" },
{ BBLOG_ERRNO_ENOTBLK, "ENOTBLK (Block device required)" },
{ BBLOG_ERRNO_EBUSY, "EBUSY (Device busy)" },
{ BBLOG_ERRNO_EEXIST, "EEXIST (File exists)" },
{ BBLOG_ERRNO_EXDEV, "EXDEV (Cross-device link)" },
{ BBLOG_ERRNO_ENODEV, "ENODEV (Operation not supported by device)" },
{ BBLOG_ERRNO_ENOTDIR, "ENOTDIR (Not a directory)" },
{ BBLOG_ERRNO_EISDIR, "EISDIR (Is a directory)" },
{ BBLOG_ERRNO_EINVAL, "EINVAL (Invalid argument)" },
{ BBLOG_ERRNO_ENFILE, "ENFILE (Too many open files in system)" },
{ BBLOG_ERRNO_EMFILE, "EMFILE (Too many open files)" },
{ BBLOG_ERRNO_ENOTTY, "ENOTTY (Inappropriate ioctl for device)" },
{ BBLOG_ERRNO_ETXTBSY, "ETXTBSY (Text file busy)" },
{ BBLOG_ERRNO_EFBIG, "EFBIG (File too large)" },
{ BBLOG_ERRNO_ENOSPC, "ENOSPC (No space left on device)" },
{ BBLOG_ERRNO_ESPIPE, "ESPIPE (Illegal seek)" },
{ BBLOG_ERRNO_EROFS, "EROFS (Read-only filesystem)" },
{ BBLOG_ERRNO_EMLINK, "EMLINK (Too many links)" },
{ BBLOG_ERRNO_EPIPE, "EPIPE (Broken pipe)" },
{ BBLOG_ERRNO_EDOM, "EDOM (Numerical argument out of domain)" },
{ BBLOG_ERRNO_ERANGE, "ERANGE (Result too large)" },
{ BBLOG_ERRNO_EWOULDBLOCK, "EWOULDBLOCK (Operation would block)" },
{ BBLOG_ERRNO_EINPROGRESS, "EINPROGRESS (Operation now in progress)" },
{ BBLOG_ERRNO_EALREADY, "EALREADY (Operation already in progress)" },
{ BBLOG_ERRNO_ENOTSOCK, "ENOTSOCK (Socket operation on non-socket)" },
{ BBLOG_ERRNO_EDESTADDRREQ, "EDESTADDRREQ (Destination address required)" },
{ BBLOG_ERRNO_EMSGSIZE, "EMSGSIZE (Message too long)" },
{ BBLOG_ERRNO_EPROTOTYPE, "EPROTOTYPE (Protocol wrong type for sockets)" },
{ BBLOG_ERRNO_ENOPROTOOPT, "ENOPROTOOPT (Protocol not available)" },
{ BBLOG_ERRNO_EPROTONOSUPPORT, "EPROTONOSUPPORT (Protocol not supported)" },
{ BBLOG_ERRNO_ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT (Socket type not supported)" },
{ BBLOG_ERRNO_EOPNOTSUPP, "EOPNOTSUPP (Operation not supported)" },
{ BBLOG_ERRNO_EPFNOSUPPORT, "EPFNOSUPPORT (Protocol family not supported)" },
{ BBLOG_ERRNO_EAFNOSUPPORT, "EAFNOSUPPORT (Address family not supported by protocol family)" },
{ BBLOG_ERRNO_EADDRINUSE, "EADDRINUSE (Address already in use)" },
{ BBLOG_ERRNO_EADDRNOTAVAIL, "EADDRNOTAVAIL (Can't assign requested address)" },
{ BBLOG_ERRNO_ENETDOWN, "ENETDOWN (Network is down)" },
{ BBLOG_ERRNO_ENETUNREACH, "ENETUNREACH (Network is unreachable)" },
{ BBLOG_ERRNO_ENETRESET, "ENETRESET (Network dropped connection on reset)" },
{ BBLOG_ERRNO_ECONNABORTED, "ECONNABORTED (Software caused connection abort)" },
{ BBLOG_ERRNO_ECONNRESET, "ECONNRESET (Connection reset by peer)" },
{ BBLOG_ERRNO_ENOBUFS, "ENOBUFS (No buffer space available)" },
{ BBLOG_ERRNO_EISCONN, "EISCONN (Socket is already connected)" },
{ BBLOG_ERRNO_ENOTCONN, "ENOTCONN (Socket is not connected)" },
{ BBLOG_ERRNO_ESHUTDOWN, "ESHUTDOWN (Can't send after socket shutdown)" },
{ BBLOG_ERRNO_ETOOMANYREFS, "ETOOMANYREFS (Too many references: can't splice)" },
{ BBLOG_ERRNO_ETIMEDOUT, "ETIMEDOUT (Operation timed out)" },
{ BBLOG_ERRNO_ECONNREFUSED, "ECONNREFUSED (Connection refused)" },
{ BBLOG_ERRNO_ELOOP, "ELOOP (Too many levels of symbolic links)" },
{ BBLOG_ERRNO_ENAMETOOLONG, "ENAMETOOLONG (File name too long)" },
{ BBLOG_ERRNO_EHOSTDOWN, "EHOSTDOWN (Host is down)" },
{ BBLOG_ERRNO_EHOSTUNREACH, "EHOSTUNREACH (No route to host)" },
{ BBLOG_ERRNO_ENOTEMPTY, "ENOTEMPTY (Directory not empty)" },
{ BBLOG_ERRNO_EPROCLIM, "EPROCLIM (Too many processes)" },
{ BBLOG_ERRNO_EUSERS, "EUSERS (Too many users)" },
{ BBLOG_ERRNO_EDQUOT, "EDQUOT (Disc quota exceeded)" },
{ BBLOG_ERRNO_ESTALE, "ESTALE (Stale NFS file handle)" },
{ BBLOG_ERRNO_EREMOTE, "EREMOTE (Too many levels of remote in path)" },
{ BBLOG_ERRNO_EBADRPC, "EBADRPC (RPC struct is bad)" },
{ BBLOG_ERRNO_ERPCMISMATCH, "ERPCMISMATCH (RPC version wrong)" },
{ BBLOG_ERRNO_EPROGUNAVAIL, "EPROGUNAVAIL (RPC prog. not avail)" },
{ BBLOG_ERRNO_EPROGMISMATCH, "EPROGMISMATCH (Program version wrong)" },
{ BBLOG_ERRNO_EPROCUNAVAIL, "EPROCUNAVAIL (Bad procedure for program)" },
{ BBLOG_ERRNO_ENOLCK, "ENOLCK (No locks available)" },
{ BBLOG_ERRNO_ENOSYS, "ENOSYS (Function not implemented)" },
{ BBLOG_ERRNO_EFTYPE, "EFTYPE (Inappropriate file type or format)" },
{ BBLOG_ERRNO_EAUTH, "EAUTH (Authentication error)" },
{ BBLOG_ERRNO_ENEEDAUTH, "ENEEDAUTH (Need authenticator)" },
{ BBLOG_ERRNO_EIDRM, "EIDRM (Identifier removed)" },
{ BBLOG_ERRNO_ENOMSG, "ENOMSG (No message of desired type)" },
{ BBLOG_ERRNO_EOVERFLOW, "EOVERFLOW (Value too large to be stored in data type)" },
{ BBLOG_ERRNO_ECANCELED, "ECANCELED (Operation canceled)" },
{ BBLOG_ERRNO_EILSEQ, "EILSEQ (Illegal byte sequence)" },
{ BBLOG_ERRNO_ENOATTR, "ENOATTR (Attribute not found)" },
{ BBLOG_ERRNO_EDOOFUS, "EDOOFUS (Programming error)" },
{ BBLOG_ERRNO_EBADMSG, "EBADMSG (Bad message)" },
{ BBLOG_ERRNO_EMULTIHOP, "EMULTIHOP (Multihop attempted)" },
{ BBLOG_ERRNO_ENOLINK, "ENOLINK (Link has been severed)" },
{ BBLOG_ERRNO_EPROTO, "EPROTO (Protocol error)" },
{ BBLOG_ERRNO_ENOTCAPABLE, "ENOTCAPABLE (Capabilities insufficient)" },
{ BBLOG_ERRNO_ECAPMODE, "ECAPMODE (Not permitted in capability mode)" },
{ BBLOG_ERRNO_ENOTRECOVERABLE, "ENOTRECOVERABLE (State not recoverable)" },
{ BBLOG_ERRNO_EOWNERDEAD, "EOWNERDEAD (Previous owner died)" },
{ BBLOG_ERRNO_EINTEGRITY, "EINTEGRITY (Integrity check failed)" },
{ 0, NULL } };
#endif