Comments (12)
yup, it's in kvprintf().
However, the problem is that ether_sprintf() calls sprintf(), and that calls the libc sprintf rather than the kernel print functions:
Breakpoint 4, 0x0000000801c04f64 in snprintf () from /lib/libc.so.7
(gdb) bt
#0 0x0000000801c04f64 in snprintf () from /lib/libc.so.7
#1 0x0000000000449ba3 in ether_sprintf (ap=0x81b40f198 "") at /home/adrian/git/github/erikarn/libuinet/lib/libuinet/../../sys/net/if_ethersubr.c:1169
#2 0x000000000040d568 in uinet_pfil_in_hook_v4 (arg=, m=, ifp=0x49e0b9, dir=457240984, inp=0x4a2a24) at uinet_api.c:1245
#3 0x000000000044d3e5 in pfil_run_hooks (ph=, mp=0x7ffffebf5d80, ifp=0x802ced900, dir=1, inp=0x0) at /home/adrian/git/github/erikarn/libuinet/lib/libuinet/../../sys/net/pfil.c:82
#4 0x000000000046af45 in ip_input (m=0x800710200) at /home/adrian/git/github/erikarn/libuinet/lib/libuinet/../../sys/netinet/ip_input.c:513
#5 0x000000000044c4ec in netisr_dispatch_src (proto=, source=, m=0x800710200) at /home/adrian/git/github/erikarn/libuinet/lib/libuinet/../../sys/net/netisr.c:1013
#6 0x000000000044a9fe in ether_input_internal (ifp=, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200, m=0x800710200,
from libuinet.
That is a FreeBSD kernel printf extension, but we are using the FreeBSD kernel printf.
from libuinet.
Ah, sprintf... let me look, probably not including the kernel version at the moment, but there's really not much reason not to.
from libuinet.
Yeah I'm giving it a shot atm.
from libuinet.
Interesting. If we include it in libuinet, even the userland code sees the symbol via the kernel definition, not the userland definition?
How'd you make printf() work right?
from libuinet.
That doesn't sound right, let me try to reproduce.
from libuinet.
Ok, I'll go commit something in my repo that you can pull. But yeah, the userland code is calling the kernel code. Different bug. :-P
from libuinet.
What's the behavior you are getting that leads you to think the userland code is seeing the kernel definition?
from libuinet.
I'll open a different bug for that. :)
from libuinet.
I've fixed this in my tree:
would you mind just manually pulling that and merging it in?
from libuinet.
hah, seems you already fixed it! Woo!
from libuinet.
Yeah I just committed the repro version I made here. It pulled the balance of the routines in from subr_prf.c, and it didn't have the linkage issue you reported.
from libuinet.
Related Issues (20)
- gif (ipip) and ipsec tunneling support
- TCP frame sending is occuring with passive listen sockets HOT 1
- Provide configuration controls for ARP and ICMP handling HOT 3
- netmap+libuinet on Linux HOT 6
- Segfault in UMA shutdown / destructor path HOT 3
- Cannot connet to libuinet echo/echo++ server HOT 2
- SIGSEGV during VNET shutdown
- linux compile issues HOT 13
- Linux complication HOT 2
- can't compile on freebsd/i386
- C++ echo server doesn't match API HOT 1
- can't start echo HOT 1
- how to run libuinet on dpdk HOT 1
- Getting current time in libuinet. nanotime/microtime always writes tv_sec=1
- Enabling TCP Vegas in libuinet
- there is one compile error when the debug option "TCPDEBUG" was enable
- undefined reference to `__start_set_vnet'
- Is there any document which list Supported/Unsupported features by libuinet?
- error compiling HOT 1
- Compile error on debian
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libuinet.