To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-net
or, via email, send a message with subject or body 'help' to
freebsd-n...@freebsd.org
You can reach the person managing the list at
freebsd-...@freebsd.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-net digest..."
Today's Topics:
1. Handle netgraph control messages (serena zanetta)
2. Re: Handle netgraph control messages (Julian Elischer)
3. Re: kern/145462: [netgraph] [patch] panic kernel when ng_ipfw
send ip package on not existing netgraph node (lin...@FreeBSD.org)
----------------------------------------------------------------------
Message: 1
Date: Wed, 7 Apr 2010 17:51:58 +0200
From: serena zanetta <sz3...@gmail.com>
Subject: Handle netgraph control messages
To: freeb...@freebsd.org
Message-ID:
<o2xb2ecfd381004070851gd...@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252
I’ve modified the ng_hub node code in order to send a “connect” control
message to the following ng_ksocket node.
I’ve filled a sockaddr_in structure, named connect_saddrin, as:
connect_saddrin.sin_len = 16;
connect_saddrin.sin_family = AF_INET;
connect_saddrin.sin_port = htonl(55056);
connect_saddrin.sin_addr.s_addr = htonl(remoteIP.s_addr);
And then I’ve initialized the control message and send it out:
NG_MKMESSAGE(connect_msg,NGM_KSOCKET_COOKIE,NGM_KSOCKET_CONNECT,sizeof(struct
sockaddr_in),M_NOWAIT);
*(struct sockaddr_in *)connect_msg->data = connect_saddrin;
NG_SEND_MSG_HOOK(error,node,connect_msg,hook2,0);
But it doesn’t work: no message is received by the ng_ksocket node!
Can anyone help me please?
Thank you,
Serena
------------------------------
Message: 2
Date: Wed, 07 Apr 2010 11:43:26 -0700
From: Julian Elischer <jul...@elischer.org>
Subject: Re: Handle netgraph control messages
To: serena zanetta <sz3...@gmail.com>
Cc: freeb...@freebsd.org
Message-ID: <4BBCD24E...@elischer.org>
Content-Type: text/plain; charset=windows-1252; format=flowed
On 4/7/10 8:51 AM, serena zanetta wrote:
> I’ve modified the ng_hub node code in order to send a “connect” control
> message to the following ng_ksocket node.
>
At very first glance it looks ok but I'll have to go look a the code
to see if you've forgotten something :-)
>
>
> I’ve filled a sockaddr_in structure, named connect_saddrin, as:
>
> connect_saddrin.sin_len = 16;
>
> connect_saddrin.sin_family = AF_INET;
>
> connect_saddrin.sin_port = htonl(55056);
>
> connect_saddrin.sin_addr.s_addr = htonl(remoteIP.s_addr);
>
> And then I’ve initialized the control message and send it out:
>
>
> NG_MKMESSAGE(connect_msg,NGM_KSOCKET_COOKIE,NGM_KSOCKET_CONNECT,sizeof(struct
> sockaddr_in),M_NOWAIT);
>
> *(struct sockaddr_in *)connect_msg->data = connect_saddrin;
>
> NG_SEND_MSG_HOOK(error,node,connect_msg,hook2,0);
>
>
>
> But it doesn’t work: no message is received by the ng_ksocket node!
>
>
>
> Can anyone help me please?
>
>
>
> Thank you,
>
>
>
> Serena
> _______________________________________________
> freeb...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net...@freebsd.org"
------------------------------
Message: 3
Date: Wed, 7 Apr 2010 20:45:41 GMT
From: lin...@FreeBSD.org
Subject: Re: kern/145462: [netgraph] [patch] panic kernel when ng_ipfw
send ip package on not existing netgraph node
To: lin...@FreeBSD.org, freebs...@FreeBSD.org,
freeb...@FreeBSD.org
Message-ID: <201004072045....@freefall.freebsd.org>
Old Synopsis: [patch] panic kernel when ng_ipfw send ip package on not existing netgraph node
New Synopsis: [netgraph] [patch] panic kernel when ng_ipfw send ip package on not existing netgraph node
Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Wed Apr 7 20:44:55 UTC 2010
Responsible-Changed-Why:
Over to maintainer(s).
http://www.freebsd.org/cgi/query-pr.cgi?pr=145462
------------------------------
End of freebsd-net Digest, Vol 366, Issue 4
*******************************************