Skip to content
Snippets Groups Projects
Commit 9189c266 authored by Jenkins2's avatar Jenkins2 Committed by Gerrit Code Review
Browse files

Merge "pbx_dundi: Added IPv6 support for dundi"

parents 1ca54b18 328f772d
No related branches found
No related tags found
No related merge requests found
...@@ -125,6 +125,10 @@ format_jpeg ...@@ -125,6 +125,10 @@ format_jpeg
------------------ ------------------
* The format_jpeg module has been removed. * The format_jpeg module has been removed.
pbx_dundi
------------------
* DUNDi now supports IPv6
Core: Core:
------------------ ------------------
* libedit is no longer available as an embedded library and must be provided * libedit is no longer available as an embedded library and must be provided
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "asterisk/dundi.h" #include "asterisk/dundi.h"
#include "dundi-parser.h" #include "dundi-parser.h"
static void internaloutput(const char *str) static void internaloutput(const char *str)
{ {
fputs(str, stdout); fputs(str, stdout);
...@@ -428,7 +429,7 @@ static void dump_ies(unsigned char *iedata, int spaces, int len) ...@@ -428,7 +429,7 @@ static void dump_ies(unsigned char *iedata, int spaces, int len)
outputf("\n"); outputf("\n");
} }
void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int datalen) void dundi_showframe(struct dundi_hdr *fhi, int rx, struct ast_sockaddr *sin, int datalen)
{ {
char *pref[] = { char *pref[] = {
"Tx", "Tx",
...@@ -469,11 +470,13 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int ...@@ -469,11 +470,13 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
pref[rx], pref[rx],
fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command"); fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
outputf(tmp); outputf(tmp);
snprintf(tmp, (int)sizeof(tmp), snprintf(tmp, (int)sizeof(tmp),
"%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s:%d]%s\n", (rx > 1) ? " " : "", "%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s]%s\n", (rx > 1) ? " " : "",
subclass, ntohs(fhi->strans) & ~DUNDI_FLAG_RESERVED, ntohs(fhi->dtrans) & ~DUNDI_FLAG_RETRANS, subclass, ntohs(fhi->strans) & ~DUNDI_FLAG_RESERVED, ntohs(fhi->dtrans) & ~DUNDI_FLAG_RETRANS,
ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port), ast_sockaddr_stringify(sin),
fhi->cmdresp & 0x80 ? " (Final)" : ""); fhi->cmdresp & 0x80 ? " (Final)" : "");
outputf(tmp); outputf(tmp);
dump_ies(fhi->ies, rx > 1, datalen); dump_ies(fhi->ies, rx > 1, datalen);
} }
......
...@@ -60,7 +60,7 @@ struct dundi_ie_data { ...@@ -60,7 +60,7 @@ struct dundi_ie_data {
extern void dundi_set_output(void (*output)(const char *data)); extern void dundi_set_output(void (*output)(const char *data));
/* Choose a different function for errors */ /* Choose a different function for errors */
extern void dundi_set_error(void (*output)(const char *data)); extern void dundi_set_error(void (*output)(const char *data));
extern void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int datalen); extern void dundi_showframe(struct dundi_hdr *fhi, int rx, struct ast_sockaddr *sin, int datalen);
extern const char *dundi_ie2str(int ie); extern const char *dundi_ie2str(int ie);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment