VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / fs / cifs / cifs_debug.c
1 /*
2  *   fs/cifs_debug.c
3  *
4  *   Copyright (C) International Business Machines  Corp., 2000,2003
5  *
6  *   Modified by Steve French (sfrench@us.ibm.com)
7  *
8  *   This program is free software;  you can redistribute it and/or modify
9  *   it under the terms of the GNU General Public License as published by
10  *   the Free Software Foundation; either version 2 of the License, or 
11  *   (at your option) any later version.
12  * 
13  *   This program is distributed in the hope that it will be useful,
14  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
16  *   the GNU General Public License for more details.
17  *
18  *   You should have received a copy of the GNU General Public License
19  *   along with this program;  if not, write to the Free Software 
20  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  */
22 #include <linux/fs.h>
23 #include <linux/string.h>
24 #include <linux/ctype.h>
25 #include <linux/module.h>
26 #include <linux/proc_fs.h>
27 #include <asm/uaccess.h>
28 #include "cifspdu.h"
29 #include "cifsglob.h"
30 #include "cifsproto.h"
31 #include "cifs_debug.h"
32
33 void
34 cifs_dump_mem(char *label, void *data, int length)
35 {
36         int i, j;
37         int *intptr = data;
38         char *charptr = data;
39         char buf[10], line[80];
40
41         printk(KERN_DEBUG "%s: dump of %d bytes of data at 0x%p\n\n", 
42                 label, length, data);
43         for (i = 0; i < length; i += 16) {
44                 line[0] = 0;
45                 for (j = 0; (j < 4) && (i + j * 4 < length); j++) {
46                         sprintf(buf, " %08x", intptr[i / 4 + j]);
47                         strcat(line, buf);
48                 }
49                 buf[0] = ' ';
50                 buf[2] = 0;
51                 for (j = 0; (j < 16) && (i + j < length); j++) {
52                         buf[1] = isprint(charptr[i + j]) ? charptr[i + j] : '.';
53                         strcat(line, buf);
54                 }
55                 printk(KERN_DEBUG "%s\n", line);
56         }
57 }
58
59 #ifdef CONFIG_PROC_FS
60 int
61 cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
62                      int count, int *eof, void *data)
63 {
64         struct list_head *tmp;
65         struct list_head *tmp1;
66         struct mid_q_entry * mid_entry;
67         struct cifsSesInfo *ses;
68         struct cifsTconInfo *tcon;
69         int i;
70         int length = 0;
71         char * original_buf = buf;
72
73         *beginBuffer = buf + offset;
74
75         
76         length =
77             sprintf(buf,
78                     "Display Internal CIFS Data Structures for Debugging\n"
79                     "---------------------------------------------------\n");
80         buf += length;
81
82         length = sprintf(buf, "Servers:\n");
83         buf += length;
84
85         i = 0;
86         read_lock(&GlobalSMBSeslock);
87         list_for_each(tmp, &GlobalSMBSessionList) {
88                 i++;
89                 ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
90                 length =
91                     sprintf(buf,
92                             "\n%d) Name: %s  Domain: %s Mounts: %d ServerOS: %s  \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\tTCP status: %d",
93                                 i, ses->serverName, ses->serverDomain, atomic_read(&ses->inUse),
94                                 ses->serverOS, ses->serverNOS, ses->capabilities,ses->status,ses->server->tcpStatus);
95                 buf += length;
96                 if(ses->server) {
97                         buf += sprintf(buf, "\n\tLocal Users To Server: %d SecMode: 0x%x Req Active: %d",
98                                 atomic_read(&ses->server->socketUseCount),
99                                 ses->server->secMode,
100                                 atomic_read(&ses->server->inFlight));
101                         
102                         length = sprintf(buf, "\nMIDs: \n");
103                         buf += length;
104
105                         spin_lock(&GlobalMid_Lock);
106                         list_for_each(tmp1, &ses->server->pending_mid_q) {
107                                 mid_entry = list_entry(tmp1, struct
108                                         mid_q_entry,
109                                         qhead);
110                                 if(mid_entry) {
111                                         length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p mid %d\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk,mid_entry->mid);
112                                         buf += length;
113                                 }
114                         }
115                         spin_unlock(&GlobalMid_Lock); 
116                 }
117
118         }
119         read_unlock(&GlobalSMBSeslock);
120         sprintf(buf, "\n");
121         buf++;
122
123         length = sprintf(buf, "\nShares:\n");
124         buf += length;
125
126         i = 0;
127         read_lock(&GlobalSMBSeslock);
128         list_for_each(tmp, &GlobalTreeConnectionList) {
129                 i++;
130                 tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
131                 length =
132                     sprintf(buf,
133                             "\n%d) %s Uses: %d Type: %s Characteristics: 0x%x Attributes: 0x%x\nPathComponentMax: %d Status: %d",
134                             i, tcon->treeName,
135                             atomic_read(&tcon->useCount),
136                             tcon->nativeFileSystem,
137                             tcon->fsDevInfo.DeviceCharacteristics,
138                             tcon->fsAttrInfo.Attributes,
139                             tcon->fsAttrInfo.MaxPathNameComponentLength,tcon->tidStatus);
140                 buf += length;        
141                 if (tcon->fsDevInfo.DeviceType == FILE_DEVICE_DISK)
142                         length = sprintf(buf, " type: DISK ");
143                 else if (tcon->fsDevInfo.DeviceType == FILE_DEVICE_CD_ROM)
144                         length = sprintf(buf, " type: CDROM ");
145                 else
146                         length =
147                             sprintf(buf, " type: %d ",
148                                     tcon->fsDevInfo.DeviceType);
149                 buf += length;
150                 if(tcon->tidStatus == CifsNeedReconnect) {
151                         buf += sprintf(buf, "\tDISCONNECTED ");
152                         length += 14;
153                 }
154         }
155         read_unlock(&GlobalSMBSeslock);
156
157         length = sprintf(buf, "\n");
158         buf += length;
159
160         /* BB add code to dump additional info such as TCP session info now */
161         /* Now calculate total size of returned data */
162         length = buf - original_buf;
163
164         if(offset + count >= length)
165                 *eof = 1;
166         if(length < offset) {
167                 *eof = 1;
168                 return 0;
169         } else {
170                 length = length - offset;
171         }
172         if (length > count)
173                 length = count;
174
175         return length;
176 }
177
178 #ifdef CONFIG_CIFS_STATS
179 int
180 cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
181                   int count, int *eof, void *data)
182 {
183         int item_length,i,length;
184         struct list_head *tmp;
185         struct cifsTconInfo *tcon;
186
187         *beginBuffer = buf + offset;
188
189         length = sprintf(buf,
190                         "Resources in use\nCIFS Session: %d\n",
191                         sesInfoAllocCount.counter);
192         buf += length;
193         item_length = 
194                 sprintf(buf,"Share (unique mount targets): %d\n",
195                         tconInfoAllocCount.counter);
196         length += item_length;
197         buf += item_length;      
198         item_length = 
199                 sprintf(buf,"SMB Request/Response Buffer: %d\n",
200                         bufAllocCount.counter);
201         length += item_length;
202         buf += item_length;      
203         item_length = 
204                 sprintf(buf,"Operations (MIDs): %d\n",
205                         midCount.counter);
206         length += item_length;
207         buf += item_length;
208         item_length = sprintf(buf,
209                 "\n%d session %d share reconnects\n",
210                 tcpSesReconnectCount.counter,tconInfoReconnectCount.counter);
211         length += item_length;
212         buf += item_length;
213
214         item_length = sprintf(buf,
215                 "Total vfs operations: %d maximum at one time: %d\n",
216                 GlobalCurrentXid,GlobalMaxActiveXid);
217         length += item_length;
218         buf += item_length;
219
220         i = 0;
221         read_lock(&GlobalSMBSeslock);
222         list_for_each(tmp, &GlobalTreeConnectionList) {
223                 i++;
224                 tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
225                 item_length = sprintf(buf,"\n%d) %s",i, tcon->treeName);
226                 buf += item_length;
227                 length += item_length;
228                 if(tcon->tidStatus == CifsNeedReconnect) {
229                         buf += sprintf(buf, "\tDISCONNECTED ");
230                         length += 14;
231                 }
232                 item_length = sprintf(buf,"\nSMBs: %d Oplock Breaks: %d",
233                         atomic_read(&tcon->num_smbs_sent),
234                         atomic_read(&tcon->num_oplock_brks));
235                 buf += item_length;
236                 length += item_length;
237                 item_length = sprintf(buf,"\nReads: %d Bytes %lld",
238                         atomic_read(&tcon->num_reads),
239                         (long long)(tcon->bytes_read));
240                 buf += item_length;
241                 length += item_length;
242                 item_length = sprintf(buf,"\nWrites: %d Bytes: %lld",
243                         atomic_read(&tcon->num_writes),
244                         (long long)(tcon->bytes_written));
245                 buf += item_length;
246                 length += item_length;
247                 item_length = sprintf(buf,
248                         "\nOpens: %d Deletes: %d\nMkdirs: %d Rmdirs: %d",
249                         atomic_read(&tcon->num_opens),
250                         atomic_read(&tcon->num_deletes),
251                         atomic_read(&tcon->num_mkdirs),
252                         atomic_read(&tcon->num_rmdirs));
253                 buf += item_length;
254                 length += item_length;
255                 item_length = sprintf(buf,
256                         "\nRenames: %d T2 Renames %d",
257                         atomic_read(&tcon->num_renames),
258                         atomic_read(&tcon->num_t2renames));
259                 buf += item_length;
260                 length += item_length;
261         }
262         read_unlock(&GlobalSMBSeslock);
263
264         buf += sprintf(buf,"\n");
265         length++;
266
267         if(offset + count >= length)
268                 *eof = 1;
269         if(length < offset) {
270                 *eof = 1;
271                 return 0;
272         } else {
273                 length = length - offset;
274         }
275         if (length > count)
276                 length = count;
277                 
278         return length;
279 }
280 #endif
281
282 struct proc_dir_entry *proc_fs_cifs;
283 read_proc_t cifs_txanchor_read;
284 static read_proc_t cifsFYI_read;
285 static write_proc_t cifsFYI_write;
286 static read_proc_t oplockEnabled_read;
287 static write_proc_t oplockEnabled_write;
288 static read_proc_t lookupFlag_read;
289 static write_proc_t lookupFlag_write;
290 static read_proc_t traceSMB_read;
291 static write_proc_t traceSMB_write;
292 static read_proc_t multiuser_mount_read;
293 static write_proc_t multiuser_mount_write;
294 static read_proc_t extended_security_read;
295 static write_proc_t extended_security_write;
296 static read_proc_t ntlmv2_enabled_read;
297 static write_proc_t ntlmv2_enabled_write;
298 static read_proc_t packet_signing_enabled_read;
299 static write_proc_t packet_signing_enabled_write;
300 static read_proc_t quotaEnabled_read;
301 static write_proc_t quotaEnabled_write;
302 static read_proc_t linuxExtensionsEnabled_read;
303 static write_proc_t linuxExtensionsEnabled_write;
304
305 void
306 cifs_proc_init(void)
307 {
308         struct proc_dir_entry *pde;
309
310         proc_fs_cifs = proc_mkdir("cifs", proc_root_fs);
311         if (proc_fs_cifs == NULL)
312                 return;
313
314         proc_fs_cifs->owner = THIS_MODULE;
315         create_proc_read_entry("DebugData", 0, proc_fs_cifs,
316                                 cifs_debug_data_read, NULL);
317
318 #ifdef CONFIG_CIFS_STATS
319         create_proc_read_entry("Stats", 0, proc_fs_cifs,
320                                 cifs_stats_read, NULL);
321 #endif
322         pde = create_proc_read_entry("cifsFYI", 0, proc_fs_cifs,
323                                 cifsFYI_read, NULL);
324         if (pde)
325                 pde->write_proc = cifsFYI_write;
326
327         pde =
328             create_proc_read_entry("traceSMB", 0, proc_fs_cifs,
329                                 traceSMB_read, NULL);
330         if (pde)
331                 pde->write_proc = traceSMB_write;
332
333         pde = create_proc_read_entry("OplockEnabled", 0, proc_fs_cifs,
334                                 oplockEnabled_read, NULL);
335         if (pde)
336                 pde->write_proc = oplockEnabled_write;
337
338         pde = create_proc_read_entry("QuotaEnabled", 0, proc_fs_cifs,
339                                 quotaEnabled_read, NULL);
340         if (pde)
341                 pde->write_proc = quotaEnabled_write;
342
343         pde = create_proc_read_entry("LinuxExtensionsEnabled", 0, proc_fs_cifs,
344                                 linuxExtensionsEnabled_read, NULL);
345         if (pde)
346                 pde->write_proc = linuxExtensionsEnabled_write;
347
348         pde =
349             create_proc_read_entry("MultiuserMount", 0, proc_fs_cifs,
350                                 multiuser_mount_read, NULL);
351         if (pde)
352                 pde->write_proc = multiuser_mount_write;
353
354         pde =
355             create_proc_read_entry("ExtendedSecurity", 0, proc_fs_cifs,
356                                 extended_security_read, NULL);
357         if (pde)
358                 pde->write_proc = extended_security_write;
359
360         pde =
361         create_proc_read_entry("LookupCacheEnabled", 0, proc_fs_cifs,
362                                 lookupFlag_read, NULL);
363         if (pde)
364                 pde->write_proc = lookupFlag_write;
365
366         pde =
367             create_proc_read_entry("NTLMV2Enabled", 0, proc_fs_cifs,
368                                 ntlmv2_enabled_read, NULL);
369         if (pde)
370                 pde->write_proc = ntlmv2_enabled_write;
371
372         pde =
373             create_proc_read_entry("PacketSigningEnabled", 0, proc_fs_cifs,
374                                 packet_signing_enabled_read, NULL);
375         if (pde)
376                 pde->write_proc = packet_signing_enabled_write;
377 }
378
379 void
380 cifs_proc_clean(void)
381 {
382         if (proc_fs_cifs == NULL)
383                 return;
384
385         remove_proc_entry("DebugData", proc_fs_cifs);
386         remove_proc_entry("cifsFYI", proc_fs_cifs);
387         remove_proc_entry("traceSMB", proc_fs_cifs);
388 #ifdef CONFIG_CIFS_STATS
389         remove_proc_entry("Stats", proc_fs_cifs);
390 #endif
391         remove_proc_entry("MultiuserMount", proc_fs_cifs);
392         remove_proc_entry("OplockEnabled", proc_fs_cifs);
393         remove_proc_entry("NTLMV2Enabled",proc_fs_cifs);
394         remove_proc_entry("ExtendedSecurity",proc_fs_cifs);
395         remove_proc_entry("PacketSigningEnabled",proc_fs_cifs);
396         remove_proc_entry("LinuxExtensionsEnabled",proc_fs_cifs);
397         remove_proc_entry("QuotaEnabled",proc_fs_cifs);
398         remove_proc_entry("LookupCacheEnabled",proc_fs_cifs);
399         remove_proc_entry("cifs", proc_root_fs);
400 }
401
402 static int
403 cifsFYI_read(char *page, char **start, off_t off, int count,
404              int *eof, void *data)
405 {
406         int len;
407
408         len = sprintf(page, "%d\n", cifsFYI);
409
410         len -= off;
411         *start = page + off;
412
413         if (len > count)
414                 len = count;
415         else
416                 *eof = 1;
417
418         if (len < 0)
419                 len = 0;
420
421         return len;
422 }
423 static int
424 cifsFYI_write(struct file *file, const char __user *buffer,
425               unsigned long count, void *data)
426 {
427         char c;
428         int rc;
429
430         rc = get_user(c, buffer);
431         if (rc)
432                 return rc;
433         if (c == '0' || c == 'n' || c == 'N')
434                 cifsFYI = 0;
435         else if (c == '1' || c == 'y' || c == 'Y')
436                 cifsFYI = 1;
437
438         return count;
439 }
440
441 static int
442 oplockEnabled_read(char *page, char **start, off_t off,
443                    int count, int *eof, void *data)
444 {
445         int len;
446
447         len = sprintf(page, "%d\n", oplockEnabled);
448
449         len -= off;
450         *start = page + off;
451
452         if (len > count)
453                 len = count;
454         else
455                 *eof = 1;
456
457         if (len < 0)
458                 len = 0;
459
460         return len;
461 }
462 static int
463 oplockEnabled_write(struct file *file, const char __user *buffer,
464                     unsigned long count, void *data)
465 {
466         char c;
467         int rc;
468
469         rc = get_user(c, buffer);
470         if (rc)
471                 return rc;
472         if (c == '0' || c == 'n' || c == 'N')
473                 oplockEnabled = 0;
474         else if (c == '1' || c == 'y' || c == 'Y')
475                 oplockEnabled = 1;
476
477         return count;
478 }
479
480 static int
481 quotaEnabled_read(char *page, char **start, off_t off,
482                    int count, int *eof, void *data)
483 {
484         int len;
485
486         len = sprintf(page, "%d\n", quotaEnabled);
487 /* could also check if quotas are enabled in kernel
488         as a whole first */
489         len -= off;
490         *start = page + off;
491
492         if (len > count)
493                 len = count;
494         else
495                 *eof = 1;
496
497         if (len < 0)
498                 len = 0;
499
500         return len;
501 }
502 static int
503 quotaEnabled_write(struct file *file, const char __user *buffer,
504                     unsigned long count, void *data)
505 {
506         char c;
507         int rc;
508
509         rc = get_user(c, buffer);
510         if (rc)
511                 return rc;
512         if (c == '0' || c == 'n' || c == 'N')
513                 quotaEnabled = 0;
514         else if (c == '1' || c == 'y' || c == 'Y')
515                 quotaEnabled = 1;
516
517         return count;
518 }
519
520 static int
521 linuxExtensionsEnabled_read(char *page, char **start, off_t off,
522                    int count, int *eof, void *data)
523 {
524         int len;
525
526         len = sprintf(page, "%d\n", linuxExtEnabled);
527 /* could also check if quotas are enabled in kernel
528         as a whole first */
529         len -= off;
530         *start = page + off;
531
532         if (len > count)
533                 len = count;
534         else
535                 *eof = 1;
536
537         if (len < 0)
538                 len = 0;
539
540         return len;
541 }
542 static int
543 linuxExtensionsEnabled_write(struct file *file, const char __user *buffer,
544                     unsigned long count, void *data)
545 {
546         char c;
547         int rc;
548
549         rc = get_user(c, buffer);
550         if (rc)
551                 return rc;
552         if (c == '0' || c == 'n' || c == 'N')
553                 linuxExtEnabled = 0;
554         else if (c == '1' || c == 'y' || c == 'Y')
555                 linuxExtEnabled = 1;
556
557         return count;
558 }
559
560
561 static int
562 lookupFlag_read(char *page, char **start, off_t off,
563                    int count, int *eof, void *data)
564 {
565         int len;
566
567         len = sprintf(page, "%d\n", lookupCacheEnabled);
568
569         len -= off;
570         *start = page + off;
571
572         if (len > count)
573                 len = count;
574         else
575                 *eof = 1;
576
577         if (len < 0)
578                 len = 0;
579
580         return len;
581 }
582 static int
583 lookupFlag_write(struct file *file, const char __user *buffer,
584                     unsigned long count, void *data)
585 {
586         char c;
587         int rc;
588
589         rc = get_user(c, buffer);
590         if (rc)
591                 return rc;
592         if (c == '0' || c == 'n' || c == 'N')
593                 lookupCacheEnabled = 0;
594         else if (c == '1' || c == 'y' || c == 'Y')
595                 lookupCacheEnabled = 1;
596
597         return count;
598 }
599 static int
600 traceSMB_read(char *page, char **start, off_t off, int count,
601               int *eof, void *data)
602 {
603         int len;
604
605         len = sprintf(page, "%d\n", traceSMB);
606
607         len -= off;
608         *start = page + off;
609
610         if (len > count)
611                 len = count;
612         else
613                 *eof = 1;
614
615         if (len < 0)
616                 len = 0;
617
618         return len;
619 }
620 static int
621 traceSMB_write(struct file *file, const char __user *buffer,
622                unsigned long count, void *data)
623 {
624         char c;
625         int rc;
626
627         rc = get_user(c, buffer);
628         if (rc)
629                 return rc;
630         if (c == '0' || c == 'n' || c == 'N')
631                 traceSMB = 0;
632         else if (c == '1' || c == 'y' || c == 'Y')
633                 traceSMB = 1;
634
635         return count;
636 }
637
638 static int
639 multiuser_mount_read(char *page, char **start, off_t off,
640                      int count, int *eof, void *data)
641 {
642         int len;
643
644         len = sprintf(page, "%d\n", multiuser_mount);
645
646         len -= off;
647         *start = page + off;
648
649         if (len > count)
650                 len = count;
651         else
652                 *eof = 1;
653
654         if (len < 0)
655                 len = 0;
656
657         return len;
658 }
659 static int
660 multiuser_mount_write(struct file *file, const char __user *buffer,
661                       unsigned long count, void *data)
662 {
663         char c;
664         int rc;
665
666         rc = get_user(c, buffer);
667         if (rc)
668                 return rc;
669         if (c == '0' || c == 'n' || c == 'N')
670                 multiuser_mount = 0;
671         else if (c == '1' || c == 'y' || c == 'Y')
672                 multiuser_mount = 1;
673
674         return count;
675 }
676
677 static int
678 extended_security_read(char *page, char **start, off_t off,
679                        int count, int *eof, void *data)
680 {
681         int len;
682
683         len = sprintf(page, "%d\n", extended_security);
684
685         len -= off;
686         *start = page + off;
687
688         if (len > count)
689                 len = count;
690         else
691                 *eof = 1;
692
693         if (len < 0)
694                 len = 0;
695
696         return len;
697 }
698 static int
699 extended_security_write(struct file *file, const char __user *buffer,
700                         unsigned long count, void *data)
701 {
702         char c;
703         int rc;
704
705         rc = get_user(c, buffer);
706         if (rc)
707                 return rc;
708         if (c == '0' || c == 'n' || c == 'N')
709                 extended_security = 0;
710         else if (c == '1' || c == 'y' || c == 'Y')
711                 extended_security = 1;
712
713         return count;
714 }
715
716 static int
717 ntlmv2_enabled_read(char *page, char **start, off_t off,
718                        int count, int *eof, void *data)
719 {
720         int len;
721
722         len = sprintf(page, "%d\n", ntlmv2_support);
723
724         len -= off;
725         *start = page + off;
726
727         if (len > count)
728                 len = count;
729         else
730                 *eof = 1;
731
732         if (len < 0)
733                 len = 0;
734
735         return len;
736 }
737 static int
738 ntlmv2_enabled_write(struct file *file, const char __user *buffer,
739                         unsigned long count, void *data)
740 {
741         char c;
742         int rc;
743
744         rc = get_user(c, buffer);
745         if (rc)
746                 return rc;
747         if (c == '0' || c == 'n' || c == 'N')
748                 ntlmv2_support = 0;
749         else if (c == '1' || c == 'y' || c == 'Y')
750                 ntlmv2_support = 1;
751
752         return count;
753 }
754
755 static int
756 packet_signing_enabled_read(char *page, char **start, off_t off,
757                        int count, int *eof, void *data)
758 {
759         int len;
760
761         len = sprintf(page, "%d\n", sign_CIFS_PDUs);
762
763         len -= off;
764         *start = page + off;
765
766         if (len > count)
767                 len = count;
768         else
769                 *eof = 1;
770
771         if (len < 0)
772                 len = 0;
773
774         return len;
775 }
776 static int
777 packet_signing_enabled_write(struct file *file, const char __user *buffer,
778                         unsigned long count, void *data)
779 {
780         char c;
781         int rc;
782
783         rc = get_user(c, buffer);
784         if (rc)
785                 return rc;
786         if (c == '0' || c == 'n' || c == 'N')
787                 sign_CIFS_PDUs = 0;
788         else if (c == '1' || c == 'y' || c == 'Y')
789                 sign_CIFS_PDUs = 1;
790         else if (c == '2')
791                 sign_CIFS_PDUs = 2;
792
793         return count;
794 }
795
796
797 #endif