I am currently trying to figure out a way to make this happen.
I support a company with many macintosh laptops and cannot trust users to remember to turn off their airport when at their desk plugged into ethernet.
Here is my reason for the need:
1. If your airport is left on and it automatically connects to an authorized base station it will use an IP on your network, even if airport is listed below Ethernet on the priority list. So your computer will use 2 IP's from your DHCP pool.
2. Kind of a security hole, I filled this with apple but nothing much happened.
For example:
You are connected to your LAN via Ethernet AND your Airport is also on and connected to an "outside" wireless network (for example, "linksys"

)
Your computer is actually connected to both networks at the same time. BUT since "Ethernet" is the priority in the network list all outgoing and incoming packets comes through the Ethernet port.... BUT!!! Since your Airport is also connected with a valid IP address (supplied by "linksys") your computer will accept any incoming packets and requests!!!
You can test this (you will need 2 computers):
Open up System Preferences and turn on file sharing.
Keep your System Preferences open.
Plug in your Ethernet cable, turn on Airport and select your network (the same network as your ethernet connection).
Open your Network in your System Prefrences and select Airport, click advanced and find your IP# that your Airport connection has (which is different than the IP# of your Ethernet connection)
Remember, your Ethernet is prioritized higher than Airport connection.
Go to your other computer and try to connect (file sharing) using the IP# which you got from the airport system preferences of the main computer... it connects!
Im sorry if this post is kind of confusing, I think it's difficult to explain this in words..
We are trying to write a simple control panel which if it detects an ethernet link, it will automatically shut off Airport.
This has become a huge problem in enterprise since each computer ends up using 2 IP's and not to mention the security issues.
If anyone has any suggestions please pass them over.
Thanks!
Ichiro