Hi everybody,

> I like henning's idea to use something like a setsockopt(2) option to
>  assign a pf tag to a running session.  I was thinking about this
>  before to use it with some weird magic in relayd... but this is way
>  off at the moment.

I liked the idea, too. So here is what I've done so far. It work till
now for tcp but it should be no problem to do it for udp also. (Or to
do it generally for ip)

To set the sockopt you have to write it this way:
 setsockopt( create_socket, SOL_SOCKET, SO_PFTAG, tag, strlen(tag) + 1);
 getsockopt( create_socket, SOL_SOCKET, SO_PFTAG, bla, &a);

Bye
Konrad

[demime 1.01d removed an attachment of type application/octet-stream which had 
a name of sockopt.diff]

Reply via email to