Add debug output messages

This commit is contained in:
vemax78 2014-12-28 15:48:52 +01:00
parent b64d563e33
commit 7c9ecebe7d
3 changed files with 11 additions and 3 deletions

View File

@ -342,7 +342,7 @@ int capwap_recvfrom(int sock, void* buffer, int* size, union sockaddr_capwap* fr
{
char strfromaddr[INET6_ADDRSTRLEN];
char strtoaddr[INET6_ADDRSTRLEN];
capwap_logging_debug("Receive packet from %s to %s with size %d", capwap_address_to_string(fromaddr, strfromaddr, INET6_ADDRSTRLEN), capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN), result);
capwap_logging_debug("Receive packet from %s:%d to %s with size %d", capwap_address_to_string(fromaddr, strfromaddr, INET6_ADDRSTRLEN), (int)CAPWAP_GET_NETWORK_PORT(fromaddr), capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN), result);
}
#endif
@ -403,7 +403,7 @@ int capwap_sendto(int sock, void* buffer, int size, union sockaddr_capwap* toadd
#ifdef DEBUG
{
char strtoaddr[INET6_ADDRSTRLEN];
capwap_logging_debug("Sent packet to %s with result %d", capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN), result);
capwap_logging_debug("Sent packet to %s:%d with result %d", capwap_address_to_string(toaddr, strtoaddr, INET6_ADDRSTRLEN), (int)CAPWAP_GET_NETWORK_PORT(toaddr), result);
}
#endif

View File

@ -239,7 +239,6 @@ static void sc_netlink_unregister_alldevice(void) {
}
}
/* */
static int sc_netlink_link(struct sk_buff* skb, struct genl_info* info) {
int ret;
@ -267,6 +266,8 @@ static int sc_netlink_link(struct sk_buff* skb, struct genl_info* info) {
/* */
static int sc_netlink_reset(struct sk_buff* skb, struct genl_info* info) {
TRACEKMOD("### sc_netlink_reset\n");
/* Check Link */
if (sc_netlink_usermodeid != genl_info_snd_portid(info)) {
return -ENOLINK;

View File

@ -32,6 +32,13 @@ void wtp_start_datachannel(void) {
memcpy(&dataaddr, &g_wtp.dtls.peeraddr, sizeof(union sockaddr_capwap));
CAPWAP_SET_NETWORK_PORT(&dataaddr, (CAPWAP_GET_NETWORK_PORT(&g_wtp.dtls.peeraddr) + 1));
#ifdef DEBUG
{
char addr[INET6_ADDRSTRLEN];
capwap_logging_debug("Create data channel with peer %s:%d", capwap_address_to_string(&dataaddr, addr, INET6_ADDRSTRLEN), (int)CAPWAP_GET_NETWORK_PORT(&dataaddr));
}
#endif
/* Connect to AC data channel */
if (!wtp_kmod_connect(&dataaddr.ss, &g_wtp.sessionid, g_wtp.mtu)) {
/* Reset AC Prefered List Position */