* @param p HTML to parse
* @param n size of p
* @param content_len pointer to store content length to
- * @param content_len pointer to store header length to
+ * @param header_len pointer to store header length to
*/
static void
get_content_and_header_len (const char *p, int n,
* @param available number of bytes in buf
* @param addr address of the sender
* @param addrlen size of addr
- * @errCode value of errno
+ * @param errCode value of errno
*/
static void
UPNP_command_receiver (void *data,
if (!p2 || (p2 > p3))
{
- strncpy (hostname, p1, MIN (MAX_HOSTNAME_LEN, (int) (p3 - p1)));
+ strncpy (hostname, p1, GNUNET_MIN (MAX_HOSTNAME_LEN, (int) (p3 - p1)));
*port = 80;
}
else
{
- strncpy (hostname, p1, MIN (MAX_HOSTNAME_LEN, (int) (p2 - p1)));
+ strncpy (hostname, p1, GNUNET_MIN (MAX_HOSTNAME_LEN, (int) (p2 - p1)));
*port = 0;
p2++;
/**
* Send UPnP command to the device identified by url and service.
*
- * @param sched scheduler to use for network tasks
* @param url control URL of the device
* @param service type of the service corresponding to the command
* @param action action to send
* @param args arguments for action
+ * @param buffer buffer
+ * @param buf_size buffer size
* @param caller_cb user callback to trigger when done
* @param caller_cls closure to pass to caller_cb
*/
void
-UPNP_command_ (struct GNUNET_SCHEDULER_Handle *sched,
- const char *url, const char *service,
+UPNP_command_ (const char *url, const char *service,
const char *action, struct UPNP_Arg_ *args,
char *buffer, size_t buf_size,
UPNP_command_cb_ caller_cb, void *caller_cls)
dest.sin_len = sizeof (dest);
#endif
- s = GNUNET_CONNECTION_create_from_sockaddr (sched, PF_INET,
+ s = GNUNET_CONNECTION_create_from_sockaddr (PF_INET,
(struct sockaddr *) &dest,
sizeof (dest));
}
dest6.sin6_len = sizeof (dest6);
#endif
- s = GNUNET_CONNECTION_create_from_sockaddr (sched, PF_INET6,
+ s = GNUNET_CONNECTION_create_from_sockaddr (PF_INET6,
(struct sockaddr *) &dest6,
sizeof (dest6));
}
* 501 Action Failed - See UPnP Device Architecture section on Control.
*/
void
-UPNP_get_external_ip_address_ (struct GNUNET_SCHEDULER_Handle *sched,
- const char *control_url,
+UPNP_get_external_ip_address_ (const char *control_url,
const char *service_type,
UPNP_get_external_ip_address_cb_ caller_cb,
void *caller_cls)
buffer = GNUNET_malloc (UPNP_COMMAND_BUFSIZE);
- UPNP_command_ (sched, control_url, service_type, "GetExternalIPAddress",
+ UPNP_command_ (control_url, service_type, "GetExternalIPAddress",
NULL, buffer, UPNP_COMMAND_BUFSIZE,
(UPNP_command_cb_) get_external_ip_address_receiver, cls);
}
}
void
-UPNP_add_port_mapping_ (struct GNUNET_SCHEDULER_Handle *sched,
- const char *control_url, const char *service_type,
+UPNP_add_port_mapping_ (const char *control_url, const char *service_type,
const char *ext_port,
const char *in_port,
const char *inClient,
buffer = GNUNET_malloc (UPNP_COMMAND_BUFSIZE);
- UPNP_command_ (sched, control_url, service_type, "AddPortMapping",
+ UPNP_command_ (control_url, service_type, "AddPortMapping",
args, buffer, UPNP_COMMAND_BUFSIZE,
add_delete_port_mapping_receiver, cls);
}
void
-UPNP_delete_port_mapping_ (struct GNUNET_SCHEDULER_Handle *sched,
- const char *control_url, const char *service_type,
+UPNP_delete_port_mapping_ (const char *control_url, const char *service_type,
const char *ext_port, const char *proto,
const char *remoteHost,
UPNP_port_mapping_cb_ caller_cb, void *caller_cls)
buffer = GNUNET_malloc (UPNP_COMMAND_BUFSIZE);
- UPNP_command_ (sched, control_url, service_type,
+ UPNP_command_ (control_url, service_type,
"DeletePortMapping",
args, buffer, UPNP_COMMAND_BUFSIZE,
add_delete_port_mapping_receiver, cls);
* the result is returned in the in_client and in_port strings
* please provide 128 and 6 bytes of data */
void
-UPNP_get_specific_port_mapping_entry_ (struct GNUNET_SCHEDULER_Handle *sched,
- const char *control_url,
+UPNP_get_specific_port_mapping_entry_ (const char *control_url,
const char *service_type,
const char *ext_port,
const char *proto,
buffer = GNUNET_malloc (UPNP_COMMAND_BUFSIZE);
- UPNP_command_ (sched, control_url, service_type,
+ UPNP_command_ (control_url, service_type,
"GetSpecificPortMappingEntry",
args, buffer, UPNP_COMMAND_BUFSIZE,
get_specific_port_mapping_entry_receiver, cls);