ocketvar.h (so*).
What's the easy way to create a basic tcp server
(create/bind/listen/accept/send/recv) : use netgraph's ksocket or so*
?
Thanks in advance !
PS: the whole job must be done in the kernel.
yes it can (and has been) done..
John Polstra did it many years ago.. using netgr
Nicolas Cormier wrote:
Thanks a lot for your answer, a last question "why did you not used
so* functions ?"
Using ng_ksocket is almost the same as using the so* functions, since
the ksocket methods call the so* functions. But by using netgraph, you
get a nice management interface, too.
F
Julian Elischer wrote:
I would actually like to address the performance issues.
is there any chance the oldest version (4.x based) might be released,
or at least it would be nice to get the code snippet that attaches to eh
ng_ksocket and
reads and writes the stream..
I could make a TCP ECHO
Julian Elischer wrote:
but if you did find some old ksocket based code sitting around,
i'd love to try it in -current and work on the bottlenecks..
I'm sure I don't have it any more, unfortunately. It was six years old,
and I just moved into a smaller house and threw out a half dozen old
co
from one of those places.
Left as an exercise for the reader: Figure out how the two differ
and which one is "better". :-)
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washin
Brian F. Feldman wrote:
> On Mon, 19 Jul 1999, John Polstra wrote:
>
>> Left as an exercise for the reader: Figure out how the two differ
>> and which one is "better". :-)
>
> I'd rather hurt myself severely.
Of course. That's a prerequisite fo
In article <19990720082825.b...@fisicc-ufm.edu>,
Oscar Bonilla wrote:
> Couldn't we do this with /etc/auth.conf?
The plan when PAM was brought in was to eliminate auth.conf. I don't
think we should be looking for new uses for it.
John
hout also rebuilding userland.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how cynical I get, I just can't keep up."-- Nora Ephron
To Unsu
ned to serve four separate but related functions.
We're only using the authentication function currently. For an
overview of PAM, see PAM(8) in the manual pages. There is also a spec
in "src/contrib/libpam/doc/specs/rfc86.0.txt".
John
---
John Polstra
is all ld cares about. That's been the traditional behavior
on every Unix system I've ever used that supported -L at all.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washingt
of weird shared objects," you'd really better get
used to it. It was the wave of the future 10 years ago. It's not
going away. Dynamic linking provides flexibility and modularity that
you just can't get from static linking.
John
--
John Polstra
In article <37882150.87a93...@newsguy.com>,
Daniel C. Sobral wrote:
>
> Do whatever you want: as a fs layer.
That would be good advice, if FS layers worked.
John
--
John Polstra j...@polstra.com
John D. Polstr
rust a minimal subset of the system).
Well, dynamic linking is here to stay, and that enlarges the scope
of "minimal subset" somewhat. But nothing would be qualitatively
different if we went to an all-dynamic scheme (which I hope we will do
some day). In any case, your
etuid or setgid. I'm
not 100% sure from the original post whether that's the case or not.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how cynical
naming the sections that
contain linker sets. gensetdefs knows this convention, and so do the
macros in . The compiler, assembler, and linker
aren't aware of anything special about the names.
John
--
John Polstra j...@polstra.com
John D.
, except I feel that when there are cases where we
can do useful things which rely on dynamic linking, we shouldn't let
static linking hold us back. Plenty of people disagree with me,
though.
John
---
John Polstra j...@pols
itional archive
libraries are made up of separate object files which are subsetted by
the linker.
To really understand the issues I think it's necessary to read through
the dynamic linker sources and understand what it's doing. There used
to be books that described how it all worked (Pren
umask of 2
then it would have worked too. It honors the umask setting unless
overridden in the supfile.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how cy
ems.
No, longs are 64 bits on the Alpha. Ints are 32 bits, though.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how cynical I get, I just can't keep
tyle(9):
Only use the __P macro from the include file if
the source file in general is (to be) compilable with a K&R
Old testament compiler. Use of the __P macro in new code is
discouraged, although modifications to existing files should be
consistent with that file's
Mike Pritchard wrote:
>>
>> Note, if you would have just _run_ the program with a umask of 2
>> then it would have worked too. It honors the umask setting unless
>> overridden in the supfile.
>
> Yes, but if I ever run cvsup by hand I wind up with cvsup
> going through my whole tree and resettin
qh_last points at stqh_first (which means it
must be a pointer to pointer). That way, STAILQ_INSERT_TAIL doesn't
have to treat an empty list as a special case.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.
)
says, "The file should not be locked on entry." But when stat calls
vn_stat, the vnode is locked. Which is correct -- or doesn't it
matter?
Thanks,
John
---
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.
Alfred Perlstein wrote:
> On Sun, 15 Aug 1999, John Polstra wrote:
>>
>> 1. I have a pointer to a vnode and I want to get the corresponding
>> dev_t and inode number. Is there a non-sleazy way to do that other
>> than calling vn_stat?
>
> use vn_todev from "
Vdb.c:150
> #7 0x8049ff9 in GetDefaultDriver () at Vdb.c:254
> #8 0x804a141 in VdbInit (user=0x804bfb1 "nobody", passwd=0x0) at
> Vdb.c:329
> #9 0x8049316 in main ()
> #10 0x8048be5 in _start ()
I don't know what's going on here, but this stack trace can't be
Doug Rabson wrote:
> On Thu, 20 May 1999, John Polstra wrote:
>
>> In article <373c3f3f.a99db...@cablenet.net>,
>> Damian Hamill wrote:
>> > I have a program that is dumping core.
>> >
>> > ---
". There are some special .o files from /usr/lib
that need to be linked in, and "cc -shared" will do that for you
automatically.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle,
orrect list of PC-Card drivers.
Revision ChangesPath
1.68.2.3 +3 -4 src/sys/pccard/pccard.c
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"Se
match a.out and ELF files. Try
running "file" on /usr/bin/login as well as your libpam and pam
modules.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"Self-inter
"-export-dynamic" yet, though.
>
> So, the question now is: Why do I need "-export-dynamic", when
> evidently nobody else does?
I don't know. Maybe you have something unusual in your
/etc/make.conf file?
John
---
John Polstra
the resized partition
* restore the data from your backup
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"Self-interest is the aphrodisiac of belief." -- James V. De
;t know about gdt. But edata and etext are provided
automatically by the linker ("ld").
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"Self-interest is the ap
rd socks works, then
I want to eliminate m3socks. There are some problems with m3socks
that I just found out about recently.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"
ovm" to the cvsup command line when using
socks. Otherwise you might get "Bad address" errors occasionally.
John
---
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
#x27;s a known bug and there is already an open PR on it.
I wouldn't be surprised if the bug existed in ELF too.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washingto
it). This is not desirable.
I would say it is not _acceptable_. The code shouldn't go into our
source tree until the known buffer overflow problems have been fixed.
It's just stupid to add buffer overflow problems to a program that is
always
ent that says "XXX - Clean up properly after an
error." :-) The fix may be as simple as calling unref_object_dag()
from the failure cases there, but it will need careful checking.
Some additional changes may be needed in load_needed_objects() near
the comment
I put a handful of pictures from this year's USENIX conference at
<http://www.freebsd.org/~jdp/usenix1999/>.
John
---
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"N
ken, so don't bother.
If you want login classes all you need to do is "vipw" and insert
the correct class in the class field. (See passwd(5) for details.)
If you want to create a new class, just edit it into your login.conf
file and then run cap_mkdb as instructed in the comment at t
utdated comments from login.conf?
Yes, I think so.
John
---
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how cynical I get, I just can't keep up."
In article <199907050103.saa51...@bubba.whistle.com>,
Archie Cobbs wrote:
>
> A new, faster event notification system would be great. But don't forget
> to include *all* events, not just file descriptor readability/writability.
Yes! Yes! Yes! (I agree.)
Joh
se libc_r and put the name
lookups into a separate thread. But to take advantage of it, the
application has to have something useful it wants to do (and can do)
in the meantime.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc
In article <3780aeb2.20616...@agama.com>,
Andrew Iltchenko wrote:
> Hi everyone!
>
> Is there a way of making dlopen return an error from the shared object's
> _init function?
No. The _init function by definition is "void _init(void)", and so
it cannot return
In article <000101bec73c$e20e3660$291c4...@kbyanc.alcnet.com>,
Kelly Yancey wrote:
>
> Also, in case it hasn't been notice already (I'm running -stable from May
> 18th), the mmap(2) manpage has a typo: it has "#include "
So what's the
Brian F. Feldman wrote:
> On Tue, 6 Jul 1999, John Polstra wrote:
>
>> In article ,
>>
>> The application itself has to get involved if it wants to do async
>> name lookups, or async anything else, for that matter. Suppose you
>> do have an async thread t
lter rule that sends back a reset:
add reset tcp from any to any auth setup in via etha16
John
--
John Polstra j...@polstra.com
John D. Polstra & Co., Inc.Seattle, Washington USA
"No matter how c
Doug wrote:
> John Polstra wrote:
>>
>> Are you sure? If you simply don't run an identd, the queries will
>> get an instant connection refused error. That's even faster than
>> sending back a bogus response.
>
> Many daemons that request ident,
ent if dd could handle seeking on character
disk devices. I'm reasonably certain there exists some ioctl (perhaps
related to reading disk labels) which could be used to figure out
whether a character device was a disk or not. A simple fix like that
would make dd a lot more u
ith something like:
>
> ln -s "Warm-Fuzzy" .fakeid
Ick. Please, no more abuse of symbolic links! Once (malloc) was
enough.
Data is held in files, not in filenames.
John
--
John Polstra j...@polstra.com
John D. Polstra & Co
On 17-Jul-2006 Alex Zbyslaw wrote:
> I was monitoring a machine with "systat -vmstat" and noticed something
> about the interrupts and I don't know if it's a problem or not. If it
> is a problem, is there anything I can do about it?
>
> The interrupts for the network interface (em0) on irq 64 exac
Just a note to let you know that cvsup7.freebsd.org is back in
service.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic int
t implemented by other means. The folks who run the mirrors in Japan
have a very nice setup which uses SNMP to query the number of active
CVSup clients on each mirror. They don't do automatic load balancing
with it currently, but they make some nice graphs available on the web
for people
list, since we are exiting. */
}
If you can come up with a reasonably self-contained test case that
shows a bug in this, I'll be happy to take a look at it.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
gt; code-in-progress.
No, I wish I had time for that, but I don't.
Another option for you would be to build src/libexec/rtld-elf with -g
and try to debug it yourself using gdb.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co.,
devices;
> >
> > Yes. It's not a lot of work.
>
> that would be GREAT for cd recording on IDE CD-RW (one will be able to
> use cdrdao and cdrecord instead of burncd)
Yes! It would definitely be nice if cdrecord worked with ATAPI
CD-RW drives on Fre
In article <[EMAIL PROTECTED]>,
Alfred Perlstein <[EMAIL PROTECTED]> wrote:
> I can't seem to get a crashdump, is there a way to take a
> ddb crash address: "Stopped at lf_setlock+0x52"
> and boot later and see what line of code that's on?
Assuming you have a corresponding kernel with debuggin
pkg-descr,v
> SetAttrs ports/emulators/sim6811/pkg-plist,v
> TreeList failed: Read failure from "/usr/sup/ports-all/checkouts.cvs": Input/output
>error
This is an I/O error happening on your own system when cvsup is trying
to read the file mentioned in the message.
John
-
y doing things that hackish way. But it can be prone to
> error. The proper way is to ``cvs add'' them in a directory checked out
> on the branch.
I agree, that's the proper way to do it. The net effect is the same:
it adds the RELENG_4 tag to the files.
John
--
ADONLY
20 .note 0050 000015c4 2**0
CONTENTS, READONLY
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"
On 05-Apr-2005 Matthew D. Fuller wrote:
> I've noticed some strange behavior suddenly out of CVSup. I refuse
> all Attic files in ports, and that doesn't seem to be working right
> all of a sudden.
>
> My best guess is that it's something due to the recent patch to cvsupd
> to handle INDEX issues
p is the process that made the system call, it is also the
current process. I claim that (p == curproc) in this example, and
that it would be better to code with p than with curproc.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., In
un it with
./sigill
On an 80386 it should print out
This CPU does not support the cmpxchg instruction
Thanks in advance!
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"
Robert Muir wrote:
> yes, it prints:
> This CPU does not support the cmpxchg instruction
Thanks!
John
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message
I _thought_ I was an expert in gcc's extended asm feature, but I
can't figure out why this won't compile when optmization is
disabled:
===
#define xchgl(v, m) ({ \
int __result;
In article <[EMAIL PROTECTED]>,
Peter Wemm <[EMAIL PROTECTED]> wrote:
> If I change it to use a static inline function, it seems to work and
> will generate identical code (with -O):
Thanks! I'll give that a try in both places where I'm having this
problem.
> It appears to generate valid code
ons), i'll be happy to
> submit a patch.
Great. If you'll make the patch, I'll review it and commit it.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
rectory
> is owned by uid 0 and if the dir has not world write permission.
That sounds OK to me. But it should be in a separate patch from the
other changes you proposed.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
e" and remove the line containing "cvs-crypto".
- Delete the symbolic link "prefixes/FreeBSD-crypto.cvs".
That's all you need to do.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
and send to me in
a form that makes it easy for me to reproduce the problem?
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intel
should only set them in scripts which run
specific executables that need them to be set. Besides the a.out
problem, they affect programs run under Linux emulation too.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
se it's part of Linux and that's just what it does.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence."
In article <[EMAIL PROTECTED]>,
Alex Zepeda <[EMAIL PROTECTED]> wrote:
> On Mon, 24 Jul 2000, John Polstra wrote:
>
> > FreeBSD ELF: It's required by the ELF specification.
> >
> > FreeBSD a.out: Backward compatibility.
> >
> >
ide a problem report that you file
using the send-pr command.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -
1
date: 1993/12/21 18:36:23; author: wollman; state: Exp; lines: +0 -0
Probably the import straddled the seconds boundary. I hope current
versions of CVS force the dates to be the same on an import. I
haven't checked to see whether that's the case or not.
John
--
John Polst
he life of me figure out how to get gcc
> > to output a list of what is and isnt defined by default... help!
> >
>
> From 4.1-STABLE:
>
> jedgar@wopr:~$ cpp -v
That's the wrong way to do it because cpp behaves differently than cc.
Anothe
ieve it
is.) Follow the links Invoking GCC -> Preprocessor Options and you'll
find out how to get all sorts of useful information from the compiler.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
e is only one
> process writing to the common data area.
If you want the "BSD way" you should probably create a 0-length
temporary file somewhere and use the flock(2) system call on it. The
file itself isn't important; it's just so
LF the system call mechanism was changed
from "lcall 7,0" to the faster "int $0x80". BSD/OS doesn't support
the latter, apparently.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.
t the dates to be the same
Yep, good idea. It's only a 1-second difference. I've done that now.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointme
In article <[EMAIL PROTECTED]>, Jonas Bulow
<[EMAIL PROTECTED]> wrote:
> John Polstra wrote:
>
> > I think the ideal solution would first try to lock the
> > test-and-set lock, maybe spinning on it just a few times. If that
> > failed it would fall back
all runnable processes will be running no matter what their priorities
are.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence.
plementation, as a starting
> point.
Or use the very nice "eventlib" package from the ISC. It is
released as a part of BIND, and you can find it in FreeBSD's
"src/contrib/bind/lib/isc" directory (along with some other stuff).
John
--
John Polstra
In article <[EMAIL PROTECTED]>,
Jonas Bulow <[EMAIL PROTECTED]> wrote:
> John Polstra wrote:
> > If you want the "BSD way" you should probably create a 0-length
> > temporary file somewhere and use the flock(2) system call on it. The
> > file itself i
printable output from each ktrace.out file. Send me the
last 500 lines of each one, and I'll try to figure out what's going
wrong.
If a thread stack is overflowing, it is probably caused by a corrupted
file. However, I would prefer that you let me analyze the problem
befo
In article <[EMAIL PROTECTED]>,
Wilko Bulte <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 12, 2000 at 12:51:15PM -0700, John Polstra wrote:
> >
> > Illegal instruction faults may indicate that a thread stack
> > overflowed, or they might be symptomatic of HW or kerne
em is one of
two things:
- You are using the "-s" option on the cvsup command line, but
you have modified a file locally, or
- One of your "checkouts.*" files (most likely the "ports-base"
one) is corrupted.
John
--
John Polstra
ing a copy of "in.h" and add "-I." to the
command line, then I get the diagnostic.
Is this the standard compiler installation, or are you using the ports
version? If it's the ports version, maybe it has an incorrect notion
of where the system headers are. I r
#x27;t checked all of userland.. so we may just be able to
> remove it.
>From it looks like a couple of [gs]etsockopt calls
use it. Search for "ip_opts" just past that structure declaration.
John
--
John Polstra [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
Archie Cobbs <[EMAIL PROTECTED]> wrote:
> John Polstra writes:
> > > On the other hand, nothing in the kernel actually uses "struct ip_opts",
> > > though I haven't checked all of userland.. so we may just be able t
ogram. (I am
assuming it is a C++ program too.)
extern void terminate(void);
void (*kludge_city)(void) = terminate;
Another possibility would be to link explicitly with libgcc when
creating your dynamic library:
cc -shared -o libphptest.so ... -lgcc
That might cause other problems, but
those is the culprit in your failing case.
> As per the PR, I'm against #ifdef'ing structures like ip_opts for C++,
> since it is likely that a later C++ standard will be corrected.
I can't argue with that. I don't like my "solution" very much either.
:-)
Jo
cc
shared again. (David, please correct me if I'm misrepresenting what
you told me.)
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign o
ng a non-shared libgcc.
>
> How so?
Well, I should have made that a separate topic as it doesn't have that
much to do with whether libgcc is shared or not. But what I meant
was that the DWARF2 exception support uses more stuff from libgcc, so
you're more likely to run i
ago. But I can't
remember the details any more.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögya
well.
That explains it then.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa
To Unsu
eed the performance.
>
> Ahh, but -static implies the entire enchilada is linked static, which
> may not be the case. :(
Then you can sprinkle in the appropriate "-Wl,-Bstatic" and
"-Wl,-Bdynamic" options in the right places.
John
--
John Polstra
In article <[EMAIL PROTECTED]>,
Max Khon <[EMAIL PROTECTED]> wrote:
> On Thu, 14 Sep 2000, John Polstra wrote:
>
> > Actually I now think we should simply build the crt* files from
> > gcc's "crtstuff.c" in the standard way, rather than having our
In article <[EMAIL PROTECTED]>,
Max Khon <[EMAIL PROTECTED]> wrote:
>
> `__register_frame_info' should be called from `do_ctors' in
> src/lib/csu/common/crtbegin.c to load frame information from .eh_frame
> sections before any constructors are executed because try/catch can be
> used in construc
In article <[EMAIL PROTECTED]>,
Max Khon <[EMAIL PROTECTED]> wrote:
> hi, there!
>
> On Fri, 15 Sep 2000, John Polstra wrote:
>
> > Here is another possibility: we could call _thread_init() from
> > crt1.o. The patch (untested) is below. It calls _thread_i
lyze the traffic.
Try the "comms/snooper" port.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc.Seattle, Washington USA
"Disappointment is a good sign of basic intelligence."
1 - 100 of 266 matches
Mail list logo