Posted By

lalzy on 05/21/14


Tagged


Versions (?)

MTU-Changing program - Menus.lisp


 / Published in: Lisp
 

All the menu's being displayed

  1. ;;;; Anything that's showed to the user
  2.  
  3. (defparameter line-sep "===========================")
  4.  
  5. ;;; Menus
  6.  
  7. (defun show_interface_selection (inter-list)
  8. "Show interface selection"
  9. (ext:run-shell-command "netsh interface ipv4 show subinterfaces")
  10. (let ((selection 1))
  11. (dolist (inter inter-list)
  12. (format t "~a - ~a | ~{~a ~}~%" selection (car inter) (cdr inter))
  13. (setf selection (1+ selection))))
  14. (format t ">> "))
  15.  
  16.  
  17. (defun show_main_menu (&optional preset)
  18. "Display appropriate menu"
  19. (format t "
  20. ~a
  21. Main Menu
  22. ~a
  23. 0 - exit
  24. 1 - Show current MTU
  25. 2 - Edit MTU
  26. 3 - Create Preset MTU~%" line-sep line-sep)
  27. (when preset
  28. (format t "4 - Load Preset MTU
  29. 5 - Edit Preset MTU
  30. 6 - Delete preset MTU~%"))
  31. (format t "9 - Settings~%>> "))
  32.  
  33.  
  34. (defun show_settings_menu ()
  35. (format t "
  36. ~a
  37. Settings Menu
  38. ~a
  39. 0 - back
  40. 1 - Change Interface~%>> " line-sep line-sep))
  41.  
  42.  
  43. (defun edit_mtu ()
  44. (format t "Selected edit MTU"))
  45.  
  46.  
  47. (defun create_preset_mtu ()
  48. (format t "Selected create preset mtu"))
  49.  
  50.  
  51. (defun load_preset_mtu ()
  52. (format t "Selected load preset MTU"))
  53.  
  54.  
  55. (defun edit_preset_mtu ()
  56. (format t "Selected edit preset MTU"))
  57.  
  58.  
  59. (defun delete_preset_mtu ()
  60. (format t "Selected delete preset MTU"))

Report this snippet  

You need to login to post a comment.