Mikrotik API

Want to know if i enable Mikrotik API if i can add a firewall Rule with C#?
Could anyone give me Command of line to do so.

Thank You

Albertus Geyser

http://wiki.mikrotik.com/wiki/Manual:API

Thank You for the reply!!

I managed to get it working and need more help.

I used this API commands to add firewall filter:

MicroK.Send(“/ip/firewall/filter/add”)
MicroK.Send(“=action=drop”)
MicroK.Send(“=chain=forward”)
MicroK.Send(“=dst-port=25”)
MicroK.Send(“=protocol=tcp”)
MicroK.Send(“=protocol=tcp”)
MicroK.Send(String.Format(“=src-address={0}”, “192.168.20.10”))
MicroK.Send(“.tag=firewall”, True)

I need to add a Src. MAC Address also how can i get a list of all commands because would like to see Cpu utilization as well.

Thank You

Albertus Geyser