[svn-commits] mattf: trunk r144 - in /trunk: isup.c isup.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 7 17:34:36 CST 2008


Author: mattf
Date: Fri Mar  7 17:34:35 2008
New Revision: 144

URL: http://svn.digium.com/view/libss7?view=rev&rev=144
Log:
Add support for dumping generic name

Modified:
    trunk/isup.c
    trunk/isup.h

Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Fri Mar  7 17:34:35 2008
@@ -1364,6 +1364,23 @@
 	return 2;
 }
 
+static FUNC_DUMP(generic_name_dump)
+{
+	unsigned int typeofname = (parm[0] >> 5) & 0x7;
+	unsigned int avail = (parm[0] >> 4) & 0x1;
+	unsigned int presentation = parm[0] & 0x3;
+	char name[ISUP_MAX_NAME + 1];
+
+	memcpy(name, &parm[1], len - 1);
+
+	ss7_message(ss7, "\t\t\tType of Name: %s (%d)\n", (typeofname == 1) ? "Calling Name" : "Unknown", typeofname);
+	ss7_message(ss7, "\t\t\tAvail: %s (%d)\n", (avail == 1) ? "Name not available" : "Name available, or availability unknown", avail);
+	ss7_message(ss7, "\t\t\tPresentation: %d\n",  presentation);
+	ss7_message(ss7, "\t\t\tName: %s\n", name);
+
+	return len;
+}
+
 static FUNC_DUMP(generic_address_dump)
 {
 	int oddeven = (parm[1] >> 7) & 0x1;
@@ -1834,7 +1851,7 @@
 	{ISUP_PARM_EGRESS_SERV, "Egress Service"},
 	{ISUP_PARM_GENERIC_ADDR, "Generic Address", generic_address_dump, generic_address_receive, generic_address_transmit},
 	{ISUP_PARM_GENERIC_DIGITS, "Generic Digits", generic_digits_dump, generic_digits_receive, generic_digits_transmit},
-	{ISUP_PARM_GENERIC_NAME, "Generic Name"},
+	{ISUP_PARM_GENERIC_NAME, "Generic Name", generic_name_dump},
 	{ISUP_PARM_TRANSIT_NETWORK_SELECTION, "Transit Network Selection", tns_dump, tns_receive, tns_transmit},
 	{ISUP_PARM_GENERIC_NOTIFICATION_IND, "Generic Notification Indication"},
 	{ISUP_PARM_PROPAGATION_DELAY, "Propagation Delay Counter", propagation_delay_cntr_dump},

Modified: trunk/isup.h
URL: http://svn.digium.com/view/libss7/trunk/isup.h?view=diff&rev=144&r1=143&r2=144
==============================================================================
--- trunk/isup.h (original)
+++ trunk/isup.h Fri Mar  7 17:34:35 2008
@@ -130,6 +130,8 @@
 
 #define CIC_SIZE 2
 #define ISUP_MAX_NUM 64
+/* From GR-317 for the generic name filed */
+#define ISUP_MAX_NAME 15
 
 struct mtp2;
 




More information about the svn-commits mailing list