sending arbitrary UDP packets from kernel module
So i have done some research and reading and found that i need to call either udp_send or udp_output. Can anyone help me out with providing the proper arguments to these functions so i may call them and send arbitrary UDP packets from a kernel module? Thanks everyone :) static int udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td); ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Update of Yandex' SMBable em driver
Vladimir Ivanov wrote: > Hi, > > We've published latest versions at > > http://people.yandex-team.ru/~wawa/em-6.7.3-yandex-1.40.tar.gz > http://people.yandex-team.ru/~wawa/em-6.9.6-RELENG7-yandex-1.36.2.8.tar.gz > > These revisions use mtx_trylock instead of mtx_lock in em_start(). Thank you! Why the two versions? Is the first one for -CURRENT? (It looks like it would be interesting to try it on CURRENT with some ongoing SMP TCP work) signature.asc Description: OpenPGP digital signature
Re: Update of Yandex' SMBable em driver
Ivan Voras пишет: Vladimir Ivanov wrote: Hi, We've published latest versions at http://people.yandex-team.ru/~wawa/em-6.7.3-yandex-1.40.tar.gz http://people.yandex-team.ru/~wawa/em-6.9.6-RELENG7-yandex-1.36.2.8.tar.gz These revisions use mtx_trylock instead of mtx_lock in em_start(). Thank you! Why the two versions? Is the first one for -CURRENT? (It looks like it would be interesting to try it on CURRENT with some ongoing SMP TCP work) Nope. The first one for RELENG_6. -- Dixi. Sem. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Checksum offloading
Dear all, I'm currently analyzing how TCP/UDP checksum offloading works to find the best way to add SCTP checksum offloading. sys/mbuf.h has constants: #define CSUM_IP 0x0001 /* will csum IP */ #define CSUM_TCP0x0002 /* will csum TCP */ #define CSUM_UDP0x0004 /* will csum UDP */ which are used to signal which offloading is supported by the drive. But, if I understand the code correctly, this only applies to UDP/IPv4 and TCP/IPv4. What about IPv6? Would this require flags like CSUM_TCP6 and CSUM_UDP6 to signal that also offloading of UDP/IPv6 and TCP/IPv6 is supported? I'm asking this because we want to add CRC offloading for SCTP/IPv4 and SCTP/IPv6. We could only add one flag CSUM_SCTP and use it for IPv4 and IPv6 ar two flags CSUM_SCTP4 and CSUM_SCTP6... Best regards Michael ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: HEADSUP: arp-v2 has been committed
The code in question on the Wine side is #if defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; and there is nothing FreeBSD-specific in dlls/iphlpapi/ipstats.c as far as I can see. If the arp-v2 update now made us incompatible both with earlier versions of FreeBSD and Linux, that sounds like something that should be fixed (instead of hacking applications like Wine). On the other hand, the commit message at http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/route.h explicitly says The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. so I guess it's not so easy. How many other ports are affected? What shall we do on the Wine front? Simply #ifdef-ing out the code in question may not be the best of ideas, either. :-( Gerald On Fri, 19 Dec 2008, Vladimir Grebenschikov wrote: > On Mon, 15 Dec 2008 06:34:13 GMT, Qing Li wrote: > >>> The arp-v2 changes have been committed into HEAD. >>> Please report problems to me and Kip Macy. > > Wine is not build any more: > > ... > cc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT > -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement > -Wwrite-strings -Wpointer-arith -I/usr/local/include -O2 -pipe > -fno-strict-aliasing -o ipstats.o ipstats.c > ipstats.c: In function 'getNumArpEntries': > ipstats.c:1253: error: 'RTF_LLINFO' undeclared (first use in this function) > ipstats.c:1253: error: (Each undeclared identifier is reported only once > ipstats.c:1253: error: for each function it appears in.) > ipstats.c: In function 'getArpTable': > ipstats.c:1311: error: 'RTF_LLINFO' undeclared (first use in this function) > ipstats.c:1311: warning: initialization makes integer from pointer without a > cast > gmake[2]: *** [ipstats.o] ?? 1 > gmake[2]: Leaving directory > `/usr/ports/emulators/wine/work/wine-1.1.10/dlls/iphlpapi' > gmake[1]: *** [iphlpapi] ?? 2 > gmake[1]: Leaving directory `/usr/ports/emulators/wine/work/wine-1.1.10/dlls' > gmake: *** [dlls] ?? 2 > > -- Gerald (Jerry) Pfeifer ger...@pfeifer.com http://www.pfeifer.com/gerald/ ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: HEADSUP: arp-v2 has been committed
The flag is not needed. It is only possible to retrieve arp entries by way of sysctl. The converse of this is you no longer need to grab all the entries in the routing table and look at each one to determine which are cloned routes (dynamic host routes) which contain ARP entries. -Kip On Sat, Dec 20, 2008 at 9:01 PM, Gerald Pfeifer wrote: > The code in question on the Wine side is > > #if defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) > int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; > > and there is nothing FreeBSD-specific in dlls/iphlpapi/ipstats.c as far > as I can see. > > If the arp-v2 update now made us incompatible both with earlier versions > of FreeBSD and Linux, that sounds like something that should be fixed > (instead of hacking applications like Wine). > > On the other hand, the commit message at > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/route.h > explicitly says > The change in design obsoletes the semantics of RTF_CLONING, > RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications > such as "arp" and "ndp" have been modified to reflect those changes. > so I guess it's not so easy. > > How many other ports are affected? > > What shall we do on the Wine front? Simply #ifdef-ing out the code in > question may not be the best of ideas, either. :-( > > Gerald > > On Fri, 19 Dec 2008, Vladimir Grebenschikov wrote: >> On Mon, 15 Dec 2008 06:34:13 GMT, Qing Li wrote: >> The arp-v2 changes have been committed into HEAD. Please report problems to me and Kip Macy. >> >> Wine is not build any more: >> >> ... >> cc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT >> -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement >> -Wwrite-strings -Wpointer-arith -I/usr/local/include -O2 -pipe >> -fno-strict-aliasing -o ipstats.o ipstats.c >> ipstats.c: In function 'getNumArpEntries': >> ipstats.c:1253: error: 'RTF_LLINFO' undeclared (first use in this function) >> ipstats.c:1253: error: (Each undeclared identifier is reported only once >> ipstats.c:1253: error: for each function it appears in.) >> ipstats.c: In function 'getArpTable': >> ipstats.c:1311: error: 'RTF_LLINFO' undeclared (first use in this function) >> ipstats.c:1311: warning: initialization makes integer from pointer without a >> cast >> gmake[2]: *** [ipstats.o] ?? 1 >> gmake[2]: Leaving directory >> `/usr/ports/emulators/wine/work/wine-1.1.10/dlls/iphlpapi' >> gmake[1]: *** [iphlpapi] ?? 2 >> gmake[1]: Leaving directory `/usr/ports/emulators/wine/work/wine-1.1.10/dlls' >> gmake: *** [dlls] ?? 2 >> >> > > -- > Gerald (Jerry) Pfeifer ger...@pfeifer.com http://www.pfeifer.com/gerald/ > ___ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org" > -- Als die Nazis die Kommunisten holten, habe ich geschwiegen; ich war ja kein Kommunist. Als sie die Sozialdemokraten einsperrten, habe ich geschwiegen; ich war ja kein Sozialdemokrat. Als sie die Gewerkschafter holten, habe ich nicht protestiert; ich war ja kein Gewerkschafter. Als sie die Juden holten, habe ich geschwiegen; ich war ja kein Jude. Als sie mich holten, gab es keinen mehr, der protestieren konnte. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"