Hi everybody...
If you want to see UI frames in irdadump, you'd better apply
the following patch :
-------------------------------------
diff -u -p irdadump.dag.h irdadump.h
--- irdadump.dag.h Tue Dec 7 10:54:41 1999
+++ irdadump.h Tue Dec 7 10:49:23 1999
@@ -194,6 +194,7 @@ struct lsap_state {
inline void parse_obex(struct lsap_state *conn, GNetBuf *buf, GString *str);
inline void parse_irlmp(GNetBuf *buf, GString *str, int type);
+inline void parse_ui_irlmp(GNetBuf *buf, GString *str, int type);
#endif /* IRDADUMP_H */
diff -u -p irdadump.dag.c irdadump.c
--- irdadump.dag.c Tue Dec 7 10:54:41 1999
+++ irdadump.c Tue Dec 7 10:49:56 1999
@@ -318,6 +318,27 @@ inline void parse_i_frame(guint8 caddr,
}
/*
+ * Function parse_ui_frame (buf, len, u_char)
+ *
+ * Information frames
+ *
+ */
+inline void parse_ui_frame(guint8 caddr, guint8 cmd, guint8 pf, int type,
+ GNetBuf *buf, GString *str)
+{
+ /* Remove IrLAP header */
+ g_netbuf_pull(buf, 2);
+
+ g_string_sprintfa(str, "ui:%s %s ca=%02x pf=%d ",
+ cmd ? "cmd" : "rsp",
+ type ? ">" : "<", caddr, pf);
+
+ /* Check if we should print IrLMP information */
+ if (config_print_irlmp)
+ parse_ui_irlmp(buf, str, type);
+}
+
+/*
* Function parse_frmr_frame (caddr, cmd, pf, type, frame, len)
*
* Frame reject frame
@@ -636,7 +657,7 @@ inline void parse_irda_frame(int type, G
parse_frmr_frame(caddr, cmd, pf, type, buf, str);
break;
case UI_FRAME:
- /* parse_ui_frame( self, skb, &info); */
+ parse_ui_frame(caddr, cmd, pf, type, buf, str);
break;
default:
g_string_sprintfa(str, "Unknown frame %02x received!\n",
diff -u -p irlmp.dag.c irlmp.c
--- irlmp.dag.c Tue Dec 7 10:54:41 1999
+++ irlmp.c Tue Dec 7 10:48:38 1999
@@ -333,3 +333,26 @@ inline void parse_irlmp(GNetBuf *buf, GS
}
}
}
+
+/*
+ * Function parse_ui_irlmp (buf)
+ *
+ * Parse IrLMP frame in UI frame
+ *
+ */
+inline void parse_ui_irlmp(GNetBuf *buf, GString *str, int type)
+{
+ guint8 slsap_sel, dlsap_sel;
+ int ctrl;
+ int i;
+
+ ctrl = buf->data[0] & CONTROL_BIT;
+ dlsap_sel = buf->data[0] & LSAP_MASK;
+ slsap_sel = buf->data[1];
+
+ /* Remove IrLMP header */
+ g_netbuf_pull(buf, 2);
+
+ g_string_sprintfa(str, "LM slsap=%02x dlsap=%02x ", slsap_sel,
+ dlsap_sel);
+}
-------------------------------------
Have fun...
Jean
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda