-
paulf
Does illumos libc have a random number generator that can produce 32bit numbers?
-
paulf
RAND_MAX is only 32k
-
andyf
I'd look at arc4random()
-
paulf
OK and that also makes me thing of the rand48 functions
-
paulf
This is just to generate testcase values
-
paulf
and this needs to be repeatable so I'll probably go with something based on rand48
-
andyf
Just spotted that arc4random references rand48(3C) instead of drand48(3C). We should fix that
-
andyf
^ already fixed in illumos 14652 (fenix). I just had an older OS version here.
-
fenix
BUG 14652: Man pages contain cross-reference errata (Closed)
-
fenix
-
jbk
so doing a little more searching, it looks like the v0 mangling format, despite being in nightly for several years at this point, is apparently still not the default anywhere (though I couldn't find any reasoning), and requires an explicit compiler flag to enable
-
danmcd
Is there an mdb way to compare two ranges of bytes? I don't think there is, and I may file an RFE for it in illumos.
-
danmcd
Recent experience suggests a use for such a dcmd.
-
jbk
I thought that due to the use of conn_t's, return traffic for a TCP connection that's not originating on a local subnet would use the same interface it was received on
-
jbk
e.g. imagine a system with 3 interfaces, all on different subnets, all having default routes on those subnets
-
jbk
if something connected to IP on interface A, the return traffic would go out the default gateway on interface A, and not the other two
-
sommerfeld
jbk: I'd think it would depend on the setting of the "hostmodel" protocol property in ipadm
-
sommerfeld
you likely want either "strong" or "src-priority" rather than the default "weak".
-
jbk
oh hrm... i wish they'd give these details upfront... so the problem isn't the return leg, it's the selection of a source address (since most everything just uses INADDR_ANY and let's the kernel pick)
-
jbk
three interfaces w/ default gateways, but want connections originating from the system to always just use one of the interfaces
-
jbk
I see some 'usesrc' and 'setsrc' options between ifconfig/ipadm and route though neither explain if they'll actually work here
-
jbk
the usesrc suggests it used after the system has decided on which link to use and there's multiple IP addresses, and the documentation for setsrc in route(8) seems to consists of 'this option exists'
-
danmcd
My modest mdb dcmd proposal:
illumos.org/issues/17506
-
fenix
→ FEATURE 17506: Create ::bcmp dcmd (New)
-
richlowe
danmcd: ooh, very easy to bikeshed, yes
-
danmcd
Yeah. Why I put it right there on the label.
-
danmcd
IFF I get cycles to build it, it's gonna be literally JUST THAT.
-
danmcd
I figure offset-as-output will be helpful for copy/paste invocations of `addr+<offset>...`
-
richlowe
I have been trying to think about pipelines and got nowhere
-
richlowe
I think what you have goes through ::eval properly
-
richlowe
I was also thinking about setting `.`
-
richlowe
that is, does ::bcmp set . to the first difference?
-
danmcd
See I've NEVER written a dcmd in my life... why I wanted to keep this simple.
-
danmcd
Setting '.' gets set in WHICH addr's first difference? Probably the left-side of the :: but ?!?
-
danmcd
See you're bikeshedding already.
-
richlowe
also, writing dcmds is _fun_
-
richlowe
I recommend it to anyone and everyone who wants things to do
-
jbk
they're not that bad, the mdb book generally does a decent job...
-
danmcd
(NGL, this should be a builtin...)
-
richlowe
there are no builtins, really
-
richlowe
or rather, it doesn't really make a difference
-
richlowe
you want it next to ::dump probably
-
danmcd
Yes.
-
gitomat
[illumos-gate] 17498 igc_ring_tx should check link state -- Robert Mustacchi <rm⊙fo>