How can I use protocol specific routes in the routing table?

Hi. I am looking at the man page for the route command. It mentions two flags:



-proto1 RTF_PROTO1 - set protocol specific routing flag #1

-proto2 RTF_PROTO2 - set protocol specific routing flag #2


I am not sure how to use this. I was unable to find details related to these flags. What I'd like to be able to do is setup a route that is specific to UDP. When I tried using something like:


sudo route add <someaddress> <someaddress> -proto1 udp


I get a message saying "udp" is a bad address. When I use -proto1 without the "udp", it generates the route with the "1" flag, but its unclear to me how that works. How do you specify the protocol? Does it use some environment variable to say which protocol it applies to? Or am I totally misunderstanding the nature of these flags?


Thanks!

How can I use protocol specific routes in the routing table?
 
 
Q