diff --git a/Claunia.IO/ChangeLog b/Claunia.IO/ChangeLog index 0bbb57a..1655fa9 100644 --- a/Claunia.IO/ChangeLog +++ b/Claunia.IO/ChangeLog @@ -1,3 +1,10 @@ +2015-05-03 Natalia Portillo + + * Claunia.IO.csproj: + * Interop/FreeBSD/Interop.FreeBSD.Errors.cs: + * Interop/FreeBSD/Interop.FreeBSD.Libraries.cs: + Add FreeBSD libc and errno. + 2015-05-03 Natalia Portillo * Claunia.IO.csproj: diff --git a/Claunia.IO/Claunia.IO.csproj b/Claunia.IO/Claunia.IO.csproj index ecdf2e4..58dbbe5 100644 --- a/Claunia.IO/Claunia.IO.csproj +++ b/Claunia.IO/Claunia.IO.csproj @@ -60,6 +60,8 @@ + + @@ -73,5 +75,6 @@ + \ No newline at end of file diff --git a/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Errors.cs b/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Errors.cs new file mode 100644 index 0000000..0f0114b --- /dev/null +++ b/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Errors.cs @@ -0,0 +1,244 @@ +// +// Interop.FreeBSD.Errors.cs +// +// Author: +// Natalia Portillo +// +// Copyright (c) 2015 © Claunia.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +internal static partial class Interop +{ + internal static partial class FreeBSD + { + internal enum Errors + { + /// Operation not permitted + EPERM = 1, + /// No such file or directory + ENOENT = 2, + /// No such process + ESRCH = 3, + /// Interrupted system call + EINTR = 4, + /// Input/output error + EIO = 5, + /// Device not configured + ENXIO = 6, + /// Argument list too long + E2BIG = 7, + /// Exec format error + ENOEXEC = 8, + /// Bad file descriptor + EBADF = 9, + /// No child processes + ECHILD = 10, + /// Resource deadlock avoided + EDEADLK = 11, + /// Cannot allocate memory + ENOMEM = 12, + /// Permission denied + EACCES = 13, + /// Bad address + EFAULT = 14, + /// Block device required + ENOTBLK = 15, + /// Device / Resource busy + EBUSY = 16, + /// File exists + EEXIST = 17, + /// Cross-device link + EXDEV = 18, + /// Operation not supported by device + ENODEV = 19, + /// Not a directory + ENOTDIR = 20, + /// Is a directory + EISDIR = 21, + /// Invalid argument + EINVAL = 22, + /// Too many open files in system + ENFILE = 23, + /// Too many open files + EMFILE = 24, + /// Inappropriate ioctl for device + ENOTTY = 25, + /// Text file busy + ETXTBSY = 26, + /// File too large + EFBIG = 27, + /// No space left on device + ENOSPC = 28, + /// Illegal seek + ESPIPE = 29, + /// Read-only file system + EROFS = 30, + /// Too many links + EMLINK = 31, + /// Broken pipe + EPIPE = 32, + /// Numerical argument out of domain + EDOM = 33, + /// Result too large + ERANGE = 34, + + /// Resource temporarily unavailable + EAGAIN = 35, + /// Operation would block + EWOULDBLOCK = EAGAIN, + /// Operation now in progress + EINPROGRESS = 36, + /// Operation already in progress + EALREADY = 37, + + /// Socket operation on non-socket + ENOTSOCK = 38, + /// Destination address required + EDESTADDRREQ = 39, + /// Message too long + EMSGSIZE = 40, + /// Protocol wrong type for socket + EPROTOTYPE = 41, + /// Protocol not available + ENOPROTOOPT = 42, + /// Protocol not supported + EPROTONOSUPPORT = 43, + /// Socket type not supported + ESOCKTNOSUPPORT = 44, + /// Operation not supported + ENOTSUP = 45, + /// Operation not supported on socket + EOPNOTSUPP = ENOTSUP, + /// Protocol family not supported + EPFNOSUPPORT = 46, + /// Address family not supported by protocol family + EAFNOSUPPORT = 47, + /// Address already in use + EADDRINUSE = 48, + /// Can't assign requested address + EADDRNOTAVAIL = 49, + + /// Network is down + ENETDOWN = 50, + /// Network is unreachable + ENETUNREACH = 51, + /// Network dropped connection on reset + ENETRESET = 52, + /// Software caused connection abort + ECONNABORTED = 53, + /// Connection reset by peer + ECONNRESET = 54, + /// No buffer space available + ENOBUFS = 55, + /// Socket is already connected + EISCONN = 56, + /// Socket is not connected + ENOTCONN = 57, + /// Can't send after socket shutdown + ESHUTDOWN = 58, + /// Too many references: can't splice + ETOOMANYREFS = 59, + /// Operation timed out + ETIMEDOUT = 60, + /// Connection refused + ECONNREFUSED = 61, + + /// Too many levels of symbolic links + ELOOP = 62, + /// File name too long + ENAMETOOLONG = 63, + + /// Host is down + EHOSTDOWN = 64, + /// No route to host + EHOSTUNREACH = 65, + /// Directory not empty + ENOTEMPTY = 66, + + /// Too many processes + EPROCLIM = 67, + /// Too many users + EUSERS = 68, + /// Disc quota exceeded + EDQUOT = 69, + + /// Stale NFS file handle + ESTALE = 70, + /// Too many levels of remote in path + EREMOTE = 71, + /// RPC struct is bad + EBADRPC = 72, + /// RPC version wrong + ERPCMISMATCH = 73, + /// RPC prog. not avail + EPROGUNAVAIL = 74, + /// Program version wrong + EPROGMISMATCH = 75, + /// Bad procedure for program + EPROCUNAVAIL = 76, + + /// No locks available + ENOLCK = 77, + /// Function not implemented + ENOSYS = 78, + + /// Inappropriate file type or format + EFTYPE = 79, + /// Authentication error + EAUTH = 80, + /// Need authenticator + ENEEDAUTH = 81, + /// Identifier removed + EIDRM = 82, + /// No message of desired type + ENOMSG = 83, + /// Value too large to be stored in data type + EOVERFLOW = 84, + /// Operation canceled + ECANCELED = 85, + /// Illegal byte sequence + EILSEQ = 86, + /// Attribute not found + ENOATTR = 87, + + /// Programming error + EDOOFUS = 88, + + /// Bad message + EBADMSG = 89, + /// Multihop attempted + EMULTIHOP = 90, + /// Link has been severed + ENOLINK = 91, + /// Protocol error + EPROTO = 92, + + /// Capabilities insufficient + ENOTCAPABLE = 93, + /// Not permitted in capability mode + ECAPMODE = 94, + /// State not recoverable + ENOTRECOVERABLE = 95, + /// Previous owner died + EOWNERDEAD = 96 + } + } +} + diff --git a/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Libraries.cs b/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Libraries.cs new file mode 100644 index 0000000..6effd0a --- /dev/null +++ b/Claunia.IO/Interop/FreeBSD/Interop.FreeBSD.Libraries.cs @@ -0,0 +1,36 @@ +// +// Interop.FreeBSD.Libraries.cs +// +// Author: +// Natalia Portillo +// +// Copyright (c) 2015 © Claunia.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +internal static partial class Interop +{ + internal static partial class FreeBSD + { + static class Libraries + { + internal const string Libc = "libc"; + } + } +} \ No newline at end of file