11:48:19 Does illumos libc have a random number generator that can produce 32bit numbers? 11:48:30 RAND_MAX is only 32k 11:49:20 I'd look at arc4random() 11:52:06 OK and that also makes me thing of the rand48 functions 11:52:40 This is just to generate testcase values 11:55:46 and this needs to be repeatable so I'll probably go with something based on rand48 11:59:37 Just spotted that arc4random references rand48(3C) instead of drand48(3C). We should fix that 13:02:46 ^ already fixed in illumos 14652 (fenix). I just had an older OS version here. 13:02:47 BUG 14652: Man pages contain cross-reference errata (Closed) 13:02:48 ↳ https://www.illumos.org/issues/14652 | https://code.illumos.org/c/illumos-gate/+/2122 14:10:56 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 15:37:13 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. 15:37:23 Recent experience suggests a use for such a dcmd. 15:40:28 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 15:40:46 e.g. imagine a system with 3 interfaces, all on different subnets, all having default routes on those subnets 15:42:18 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 16:37:21 jbk: I'd think it would depend on the setting of the "hostmodel" protocol property in ipadm 16:38:01 you likely want either "strong" or "src-priority" rather than the default "weak". 18:30:58 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) 18:31:47 three interfaces w/ default gateways, but want connections originating from the system to always just use one of the interfaces 18:32:44 I see some 'usesrc' and 'setsrc' options between ifconfig/ipadm and route though neither explain if they'll actually work here 18:35:16 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' 18:43:35 My modest mdb dcmd proposal: https://www.illumos.org/issues/17506 18:43:36 → FEATURE 17506: Create ::bcmp dcmd (New) 19:05:31 danmcd: ooh, very easy to bikeshed, yes 19:07:43 Yeah. Why I put it right there on the label. 19:07:59 IFF I get cycles to build it, it's gonna be literally JUST THAT. 19:08:51 I figure offset-as-output will be helpful for copy/paste invocations of `addr+...` 19:09:50 I have been trying to think about pipelines and got nowhere 19:10:03 I think what you have goes through ::eval properly 19:10:44 I was also thinking about setting `.` 19:11:04 that is, does ::bcmp set . to the first difference? 19:23:44 See I've NEVER written a dcmd in my life... why I wanted to keep this simple. 19:24:06 Setting '.' gets set in WHICH addr's first difference? Probably the left-side of the :: but ?!? 19:24:14 See you're bikeshedding already. 19:26:34 also, writing dcmds is _fun_ 19:26:43 I recommend it to anyone and everyone who wants things to do 19:34:10 they're not that bad, the mdb book generally does a decent job... 20:49:42 (NGL, this should be a builtin...) 20:51:38 there are no builtins, really 20:51:52 or rather, it doesn't really make a difference 20:52:11 you want it next to ::dump probably 21:44:17 Yes. 22:29:04 [illumos-gate] 17498 igc_ring_tx should check link state -- Robert Mustacchi