main.cpp 822 B

12345678910111213141516171819
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int MB, Kbytes, Bytes, vlan;
  6. cout <<"\n\nInforme a Vlan do cliente: ";
  7. cin >> vlan;
  8. cout <<"\nInforme o valor em MB: ";
  9. cin >>MB;
  10. cout << endl;
  11. Bytes = 1048576 * MB;
  12. Kbytes = 1024 * MB;
  13. //cout << "\n\nPolicy-map receberá " << Bytes << " e " << Kbytes << endl;
  14. cout << "#IMPUT \n\npolicy-map PM_VLAN" << vlan << "_INPUT \nclass CLASS_VLAN" << vlan << "_INPUT \npolice " << Bytes << " " << Kbytes << " conform-action set-dscp-transmit default exceed-action drop\n\n";
  15. cout << "#OUTPUT \n\npolicy-map PM_VLAN" << vlan << "_OUTPUT \nclass CLASS_VLAN" << vlan << "_OUTPUT \npolice " << Bytes << " " << Kbytes << " conform-action set-dscp-transmit default exceed-action drop\n\n";
  16. }