The temptation is to suggest a high gain omni directional antenna. That won't work. The higher gain omnis have a very narrow vertical radiation angle. If your sailboat mast is anything but exactly vertical, the pattern will be either into the sky or into the water. Methinks you'll do best with a USB or ethernet radio with a fairly low gain (1/4 wave or built in) antenna. The USB radio can officially handle 16ft of overpriced USB cable, but I've gone farther.
Plan B is to use a manually aimed or gimbal mounted directional antenna on the deck. 2.4Ghz won't go far enough to make the curvature of the earth a problem, so your range on the deck will be the same as your range at the top of the mast. Keeping the antenna level will be the main problem. Any of the dish or panel antennas will work.
Dan, I take it you are doing some coastal sailing as the wireless signals wont carry very far out to sea. You might try one of those high gain directional antennas that can be made rather simply.
For under $100 you can buy a wireless Ethernet bridge (Belkin makes the one I use). Waterproof it by whatever method you choose (plastic bag - plastic case) and mount it on top the mast with the power and Ethernet cables running down to your computer. If you can find one with a detachable antenna you could mount it a bit lower and place a high gain antenna at the very top of the mast.
However, I am not real sure the extra height would make much difference over water. Those high frequencies that wireless routers use are pretty much line of sight.
In good weather I use a magnetic mount and attach the Ethernet bridge to the top of my van. It looks a bit weird but it sure works great.
I made the below setup for use in my truck. I just put the adapter on the roof for general driving around. You could get one of the slim USB adapters and hang it up high from the rigging when needed. You might be able to add a 10' USB extension cable and still get it to work. If you were stationary, you could add a simple reflector that you could reach up and rotate around the USB adapter (or just hang the whole rig from a swivel and rotate the wire to aim it).