PageRenderTime 166ms CodeModel.GetById 100ms app.highlight 5ms RepoModel.GetById 56ms app.codeStats 0ms

/thirdparty/libportfwd/third-party/miniupnpc-1.6/upnperrors.c

http://github.com/tomahawk-player/tomahawk
C | 103 lines | 94 code | 1 blank | 8 comment | 0 complexity | 5cab4201cffddd4a343eb5c6cde39d11 MD5 | raw file
  1/* $Id: upnperrors.c,v 1.5 2011/04/10 11:19:36 nanard Exp $ */
  2/* Project : miniupnp
  3 * Author : Thomas BERNARD
  4 * copyright (c) 2007 Thomas Bernard
  5 * All Right reserved.
  6 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
  7 * This software is subjet to the conditions detailed in the
  8 * provided LICENCE file. */
  9#include <string.h>
 10#include "upnperrors.h"
 11#include "upnpcommands.h"
 12#include "miniupnpc.h"
 13
 14const char * strupnperror(int err)
 15{
 16	const char * s = NULL;
 17	switch(err) {
 18	case UPNPCOMMAND_SUCCESS:
 19		s = "Success";
 20		break;
 21	case UPNPCOMMAND_UNKNOWN_ERROR:
 22		s = "Miniupnpc Unknown Error";
 23		break;
 24	case UPNPCOMMAND_INVALID_ARGS:
 25		s = "Miniupnpc Invalid Arguments";
 26		break;
 27	case UPNPDISCOVER_SOCKET_ERROR:
 28		s = "Miniupnpc Socket error";
 29		break;
 30	case UPNPDISCOVER_MEMORY_ERROR:
 31		s = "Miniupnpc Memory allocation error";
 32		break;
 33	case 401:
 34		s = "Invalid Action";
 35		break;
 36	case 402:
 37		s = "Invalid Args";
 38		break;
 39	case 501:
 40		s = "Action Failed";
 41		break;
 42	case 606:
 43		s = "Action not authorized";
 44		break;
 45	case 701:
 46		s = "PinholeSpaceExhausted";
 47		break;
 48	case 702:
 49		s = "FirewallDisabled";
 50		break;
 51	case 703:
 52		s = "InboundPinholeNotAllowed";
 53		break;
 54	case 704:
 55		s = "NoSuchEntry";
 56		break;
 57	case 705:
 58		s = "ProtocolNotSupported";
 59		break;
 60	case 706:
 61		s = "InternalPortWildcardingNotAllowed";
 62		break;
 63	case 707:
 64		s = "ProtocolWildcardingNotAllowed";
 65		break;
 66	case 708:
 67		s = "WildcardNotPermittedInSrcIP";
 68		break;
 69	case 709:
 70		s = "NoPacketSent";
 71		break;
 72	case 713:
 73		s = "SpecifiedArrayIndexInvalid";
 74		break;
 75	case 714:
 76		s = "NoSuchEntryInArray";
 77		break;
 78	case 715:
 79		s = "WildCardNotPermittedInSrcIP";
 80		break;
 81	case 716:
 82		s = "WildCardNotPermittedInExtPort";
 83		break;
 84	case 718:
 85		s = "ConflictInMappingEntry";
 86		break;
 87	case 724:
 88		s = "SamePortValuesRequired";
 89		break;
 90	case 725:
 91		s = "OnlyPermanentLeasesSupported";
 92		break;
 93	case 726:
 94		s = "RemoteHostOnlySupportsWildcard";
 95		break;
 96	case 727:
 97		s = "ExternalPortOnlySupportsWildcard";
 98		break;
 99	default:
100		s = NULL;
101	}
102	return s;
103}