Lines Matching refs:data
93 trans2_findfirst(const u_char *param, const u_char *data, int pcnt, int dcnt)
104 printf("data:\n");
105 print_data(data, dcnt);
110 trans2_qfsinfo(const u_char *param, const u_char *data, int pcnt, int dcnt)
135 smb_fdata(data, fmt, data + dcnt, unicodestr);
138 printf("data:\n");
139 print_data(data, dcnt);
177 const u_char *data, *param;
188 data = buf + EXTRACT_LE_16BITS(w + 12 * 2);
200 data = buf + EXTRACT_LE_16BITS(w + 7 * 2);
230 (*fn->descript.fn)(param, data, pcnt, dcnt);
233 smb_fdata(data, f2 ? f2 : "Data=\n", data + dcnt, unicodestr);
243 print_browse(const u_char *param, int paramlen, const u_char *data, int datalen)
245 const u_char *maxbuf = data + datalen;
248 TCHECK(data[0]);
249 command = data[0];
255 data = smb_fdata(data,
261 data = smb_fdata(data,
267 data = smb_fdata(data,
273 data = smb_fdata(data,
279 data = smb_fdata(data,
285 data = smb_fdata(data,
291 data = smb_fdata(data,
297 data = smb_fdata(data,
303 data = smb_fdata(data,
309 data = smb_fdata(data,
314 data = smb_fdata(data, "Unknown Browser Frame ", maxbuf, unicodestr);
325 print_ipc(const u_char *param, int paramlen, const u_char *data, int datalen)
331 smb_fdata(data, "IPC ", data + datalen, unicodestr);
340 const u_char *data, *param;
349 data = buf + EXTRACT_LE_16BITS(w + 12 * 2);
359 data = buf + EXTRACT_LE_16BITS(w + 7 * 2);
376 print_browse(param, paramlen, data, datalen);
381 print_ipc(param, paramlen, data, datalen);
388 smb_fdata(data, f4, SMBMIN(data + datalen, maxbuf), unicodestr);
398 print_negprot(const u_char *words, const u_char *data, const u_char *buf _U_, const u_char *maxbuf)
422 TCHECK2(*data, 2);
423 bcc = EXTRACT_LE_16BITS(data);
427 smb_fdata(data + 2, f2, SMBMIN(data + 2 + EXTRACT_LE_16BITS(data),
430 print_data(data + 2, SMBMIN(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
439 print_sesssetup(const u_char *words, const u_char *data, const u_char *buf _U_, const u_char *maxbuf)
466 TCHECK2(*data, 2);
467 bcc = EXTRACT_LE_16BITS(data);
471 smb_fdata(data + 2, f2, SMBMIN(data + 2 + EXTRACT_LE_16BITS(data),
474 print_data(data + 2, SMBMIN(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
483 print_lockingandx(const u_char *words, const u_char *data, const u_char *buf _U_, const u_char *maxbuf)
506 TCHECK2(*data, 2);
507 bcc = EXTRACT_LE_16BITS(data);
511 smb_fdata(data + 2, f2, SMBMIN(data + 2 + EXTRACT_LE_16BITS(data),
514 print_data(data + 2, SMBMIN(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
801 const u_char *words, *maxwords, *data;
849 data = words + 1 + wct * 2;
850 maxwords = SMBMIN(data, maxbuf);
861 (*fn->descript.fn)(words, data, buf, maxbuf);
878 TCHECK2(*data, 2);
879 bcc = EXTRACT_LE_16BITS(data);
883 smb_fdata(data + 2, f2, data + 2 + bcc, unicodestr);
887 print_data(data + 2, SMBMIN(bcc, PTR_DIFF(maxbuf, data + 2)));
926 nbt_tcp_print(const u_char *data, int length)
935 if (snapend < data)
937 caplen = snapend - data;
940 maxbuf = data + caplen;
941 type = data[0];
942 nbt_len = EXTRACT_16BITS(data + 2);
946 startbuf = data;
973 ecode = data[4];
1001 data = smb_fdata(data, "Unknown packet type [rB]", maxbuf, 0);
1008 data = smb_fdata(data, "[P1]NBT Session Message\nFlags=[B]\nLength=[rd]\n",
1009 data + 4, 0);
1010 if (data == NULL)
1012 if (nbt_len >= 4 && caplen >= 4 && memcmp(data,"\377SMB",4) == 0) {
1020 print_smb(data, maxbuf > data + nbt_len ? data + nbt_len : maxbuf);
1022 printf("Session packet:(raw data or continuation?)\n");
1026 data = smb_fdata(data,
1032 data = smb_fdata(data, "[P1]NBT Session Granted\nFlags=[B]\nLength=[rd]\n", maxbuf, 0);
1040 origdata = data;
1041 data = smb_fdata(data, "[P1]NBT SessionReject\nFlags=[B]\nLength=[rd]\nReason=[B]\n",
1043 if (data == NULL)
1069 data = smb_fdata(data, "[P1]NBT Session Keepalive\nFlags=[B]\nLength=[rd]\n", maxbuf, 0);
1073 data = smb_fdata(data, "NBT - Unknown packet type\nType=[B]\n", maxbuf, 0);
1090 nbt_udp137_print(const u_char *data, int length)
1092 const u_char *maxbuf = data + length;
1099 TCHECK2(data[10], 2);
1100 name_trn_id = EXTRACT_16BITS(data);
1101 response = (data[2] >> 7);
1102 opcode = (data[2] >> 3) & 0xF;
1103 nm_flags = ((data[2] & 0x7) << 4) + (data[3] >> 4);
1104 rcode = data[3] & 0xF;
1105 qdcount = EXTRACT_16BITS(data + 4);
1106 ancount = EXTRACT_16BITS(data + 6);
1107 nscount = EXTRACT_16BITS(data + 8);
1108 arcount = EXTRACT_16BITS(data + 10);
1109 startbuf = data;
1111 if (maxbuf <= data)
1154 p = data + 12;
1228 print_data(p, min(rdlen, length - (p - data)));
1251 smb_tcp_print (const u_char * data, int length)
1259 if (snapend < data)
1261 caplen = snapend - data;
1264 maxbuf = data + caplen;
1265 smb_len = EXTRACT_24BITS(data + 1);
1269 startbuf = data;
1270 data += 4;
1272 if (smb_len >= 4 && caplen >= 4 && memcmp(data,"\377SMB",4) == 0) {
1280 print_smb(data, maxbuf > data + smb_len ? data + smb_len : maxbuf);
1282 printf("SMB-over-TCP packet:(raw data or continuation?)\n");
1293 nbt_udp138_print(const u_char *data, int length)
1295 const u_char *maxbuf = data + length;
1299 if (maxbuf <= data)
1301 startbuf = data;
1308 data = smb_fdata(data,
1312 if (data != NULL) {
1313 /* If there isn't enough data for "\377SMB", don't check for it. */
1314 if (&data[3] >= maxbuf)
1317 if (memcmp(data, "\377SMB",4) == 0)
1318 print_smb(data, maxbuf);
1385 netbeui_print(u_short control, const u_char *data, int length)
1387 const u_char *maxbuf = data + length;
1395 TCHECK(data[4]);
1396 len = EXTRACT_LE_16BITS(data);
1397 command = data[4];
1398 data2 = data + len;
1404 startbuf = data;
1408 data = smb_fdata(data, "[P5]#", maxbuf, 0);
1411 data = smb_fdata(data, "Length=[d] Signature=[w] Command=[B]\n#", maxbuf, 0);
1413 if (data == NULL)
1418 data = smb_fdata(data, "Unknown NBF Command#", data2, 0);
1420 data = smb_fdata(data, "Unknown NBF Command\n", data2, 0);
1425 data = smb_fdata(data, nbf_strings[command].nonverbose, data2, 0);
1429 data = smb_fdata(data, nbf_strings[command].verbose, data2, 0);
1438 if (data == NULL)
1451 /* If there isn't enough data for "\377SMB", don't look for it. */
1483 ipx_netbios_print(const u_char *data, u_int length)
1492 maxbuf = data + length;
1493 /* Don't go past the end of the captured data in the packet. */
1496 startbuf = data;
1498 if (&data[i + 4] > maxbuf)
1500 if (memcmp(&data[i], "\377SMB", 4) == 0) {
1501 smb_fdata(data, "\n>>> IPX transport ", &data[i], 0);
1502 print_smb(&data[i], maxbuf);
1509 smb_fdata(data, "\n>>> Unknown IPX ", maxbuf, 0);