Merge pull request #180 from razzfazz/fix_dp_action_args
fix action arguments for DeviceProtection service (IGDv2)
This commit is contained in:
commit
128bbee806
|
@ -115,7 +115,12 @@ static const char * magicargname[] = {
|
||||||
"RemotePort",
|
"RemotePort",
|
||||||
"InternalClient",
|
"InternalClient",
|
||||||
"InternalPort",
|
"InternalPort",
|
||||||
"IsWorking"
|
"IsWorking",
|
||||||
|
"ProtocolType",
|
||||||
|
"InMessage",
|
||||||
|
"OutMessage",
|
||||||
|
"ProtocolList",
|
||||||
|
"RoleList"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char xmlver[] =
|
static const char xmlver[] =
|
||||||
|
@ -743,11 +748,32 @@ static const struct serviceDesc scpd6FC =
|
||||||
|
|
||||||
#ifdef ENABLE_DP_SERVICE
|
#ifdef ENABLE_DP_SERVICE
|
||||||
/* UPnP-gw-DeviceProtection-v1-Service.pdf */
|
/* UPnP-gw-DeviceProtection-v1-Service.pdf */
|
||||||
|
|
||||||
|
static const struct argument SendSetupMessageArgs[] =
|
||||||
|
{
|
||||||
|
{1|0x80|(8<<2), 6}, /* ProtocolType */
|
||||||
|
{1|0x80|(9<<2), 5}, /* InMessage */
|
||||||
|
{2|0x80|(10<<2), 5}, /* OutMessage */
|
||||||
|
{0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct argument GetSupportedProtocolsArgs[] =
|
||||||
|
{
|
||||||
|
{2|0x80|(11<<2), 1}, /* ProtocolList */
|
||||||
|
{0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct argument GetAssignedRolesArgs[] =
|
||||||
|
{
|
||||||
|
{2|0x80|(12<<2), 6}, /* RoleList */
|
||||||
|
{0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
static const struct action DPActions[] =
|
static const struct action DPActions[] =
|
||||||
{
|
{
|
||||||
{"SendSetupMessage", 0},
|
{"SendSetupMessage", SendSetupMessageArgs},
|
||||||
{"GetSupportedProtocols", 0},
|
{"GetSupportedProtocols", GetSupportedProtocolsArgs},
|
||||||
{"GetAssignedRoles", 0},
|
{"GetAssignedRoles", GetAssignedRolesArgs},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1989,7 +1989,7 @@ SendSetupMessage(struct upnphttp * h, const char * action, const char * ns)
|
||||||
static const char resp[] =
|
static const char resp[] =
|
||||||
"<u:%sResponse "
|
"<u:%sResponse "
|
||||||
"xmlns:u=\"%s\">"
|
"xmlns:u=\"%s\">"
|
||||||
"<NewOutMessage>%s</NewOutMessage>"
|
"<OutMessage>%s</OutMessage>"
|
||||||
"</u:%sResponse>";
|
"</u:%sResponse>";
|
||||||
char body[1024];
|
char body[1024];
|
||||||
int bodylen;
|
int bodylen;
|
||||||
|
@ -2030,7 +2030,7 @@ GetSupportedProtocols(struct upnphttp * h, const char * action, const char * ns)
|
||||||
static const char resp[] =
|
static const char resp[] =
|
||||||
"<u:%sResponse "
|
"<u:%sResponse "
|
||||||
"xmlns:u=\"%s\">"
|
"xmlns:u=\"%s\">"
|
||||||
"<NewProtocolList>%s</NewProtocolList>"
|
"<ProtocolList>%s</ProtocolList>"
|
||||||
"</u:%sResponse>";
|
"</u:%sResponse>";
|
||||||
char body[1024];
|
char body[1024];
|
||||||
int bodylen;
|
int bodylen;
|
||||||
|
@ -2056,7 +2056,7 @@ GetAssignedRoles(struct upnphttp * h, const char * action, const char * ns)
|
||||||
static const char resp[] =
|
static const char resp[] =
|
||||||
"<u:%sResponse "
|
"<u:%sResponse "
|
||||||
"xmlns:u=\"%s\">"
|
"xmlns:u=\"%s\">"
|
||||||
"<NewRoleList>%s</NewRoleList>"
|
"<RoleList>%s</RoleList>"
|
||||||
"</u:%sResponse>";
|
"</u:%sResponse>";
|
||||||
char body[1024];
|
char body[1024];
|
||||||
int bodylen;
|
int bodylen;
|
||||||
|
|
Loading…
Reference in New Issue