~ubuntu-branches/ubuntu/raring/ntop/raring-proposed

« back to all changes in this revision

Viewing changes to webInterface.c

  • Committer: Package Import Robot
  • Author(s): Ludovico Cavedon
  • Date: 2012-06-27 00:24:42 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120627002442-9ljq6fhjqzx9qsu6
Tags: 3:4.99.3+ndpi5517+dfsg1-1
* Imported Upstream version 4.99.3 and nDPI r5517.
* get-orig-source.sh: incude nDPI in the orig tarball.
* No longer suggest ntop-graphs and update NEWS about that.
* Update copyright for the new jqPlot library.
* Refresh patches.
* Enable hardening flags.
* Add install-jqplot.patch to install jqPlot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
787
787
      break;
788
788
    }
789
789
 
790
 
  printSwitchNwInterfaceHeader();
 
790
 
791
791
 
792
792
  if(myGlobals.runningPref.mergeInterfaces) {
 
793
    printSwitchNwInterfaceHeader();
793
794
    safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "Sorry, but you cannot switch among different interfaces "
794
795
                  "unless the -M command line switch is specified at run time.");
795
796
    sendString(buf);
796
797
  } else if((mwInterface != -1) &&
797
798
            ((mwInterface >= myGlobals.numDevices) || myGlobals.device[mwInterface].virtualDevice)) {
 
799
    printSwitchNwInterfaceHeader();
798
800
    safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "Sorry, invalid interface selected.");
799
801
    sendString(buf);
800
802
  } else if((myGlobals.numDevices == 1) || (!found)) {
 
803
    printSwitchNwInterfaceHeader();
801
804
    safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "Sorry, you are currently capturing traffic from only a "
802
805
                  "single/dummy interface [%s].<br><br>"
803
806
                  "</b> This interface switch feature is meaningful only when your ntop "
810
813
    
811
814
    myGlobals.actualReportDeviceId = (mwInterface)%myGlobals.numDevices;
812
815
    storePrefsValue("actualReportDeviceId", value);
 
816
    printSwitchNwInterfaceHeader();
813
817
 
814
818
    safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "The current interface is now [%s].",
815
819
                  myGlobals.device[myGlobals.actualReportDeviceId].name);
819
823
  } else {
820
824
    u_short do_enable;
821
825
 
 
826
    printSwitchNwInterfaceHeader();
822
827
    sendString("Available Network Interfaces:</B><P>\n<FORM ACTION=" CONST_SWITCH_NIC_HTML ">\n");
823
828
 
824
829
    if(((!myGlobals.device[myGlobals.actualReportDeviceId].virtualDevice)
6906
6911
 
6907
6912
  /* **** */
6908
6913
 
 
6914
  printInfoSectionTitle(textPrintFlag, "Fragments Handling");
 
6915
  safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "%u", myGlobals.num_queued_fragments);
 
6916
  printFeatureConfigInfo(textPrintFlag, "Queued Fragments", buf);
 
6917
 
6909
6918
  printInfoSectionTitle(textPrintFlag, "----- Address Resolution -----");
6910
6919
 
6911
6920
  printInfoSectionTitle(textPrintFlag, "DNS Sniffing (other hosts requests)");