Commit Graph

115348 Commits

Author SHA1 Message Date
glebius
8ff6ea60ca ng_nat - a netgraph(4) node, which does NAT 2005-05-05 23:41:21 +00:00
glebius
d26bb46060 libalias is now buildable as kernel module 2005-05-05 22:43:04 +00:00
wpaul
d2ae5c8a71 Cast 64 bit quantity to uintmax_t to print it with %jx. This is
technically a no-op since uintmax_t is uint64_t on all currently
supported architectures, but we should use an explicit cast instead
of depending on this obscure coincidence.
2005-05-05 22:33:06 +00:00
glebius
225ea2fb02 More bits for kernel version:
- copy inet_aton() from libc
- disable getservbyname() lookup and accept only numeric port
2005-05-05 22:00:32 +00:00
glebius
32b37f4983 Always include alias.h before alias_local.h 2005-05-05 21:55:17 +00:00
glebius
98fced80c8 When used in kernel define NO_FW_PUNCH, NO_LOGGING, NO_USE_SOCKETS. 2005-05-05 21:53:17 +00:00
glebius
fa23219cf2 Fix argument order for bcopy() in last commit.
Noticed by:	njl
Pointy hat to:	glebius
2005-05-05 21:40:49 +00:00
glebius
dfbc79ffbf Use bcopy() instead of memmove(). 2005-05-05 21:10:51 +00:00
glebius
e31c062e0b Hide fflush(3) under ifdef DEBUG. 2005-05-05 21:07:34 +00:00
glebius
d1dba4a851 Things required to build libalias as kernel module:
- kernel module declarations and handler.
- macros to map malloc(3) calls to malloc(9) ones.
- malloc(9) declarations.
- call finishoff() from module handler MOD_UNLOAD case
  instead of atexit(3).
- use panic(9) instead of abort(3)
- take time from time_second instead of gettimeofday(2)
- define INADDR_NONE
2005-05-05 21:05:38 +00:00
glebius
81aed9a0a8 Add NO_USE_SOCKETS knob, which cuts off functionality socket binding. 2005-05-05 20:25:12 +00:00
glebius
497e6391d0 Add NO_LOGGING knob, which cuts off functionality of debug logging to a file. 2005-05-05 20:22:09 +00:00
glebius
89e40708a1 Play with includes so that libalias can be compiled both as userland
library and kernel module.
2005-05-05 19:27:32 +00:00
dwhite
83360b1ca4 Add quirk for TEAC USB floppy drives. 2005-05-05 18:48:41 +00:00
peter
90109f2712 Move the pcb variable initialization earlier. This is cosmetic here, but
in as-yet uncommitted code for 32 bit binary compatability on 64 bit
kernels, some of the 32 bit registers come from the pcb.  Moving the
initialization here means fill_regs32() etc are laid out the same.
2005-05-05 18:26:45 +00:00
peter
42d340e870 Remove unused (besides being initialized) variable. 2005-05-05 18:19:53 +00:00
murray
cdeeff2e1d Use smart quote entities instead of double ``ticks'' to create more
aesthetically pleasing HTML output.

Tested with:		mozilla, opera, lynx, links
Problematic with:	w3m
Reviewed by:		remko, keramida
2005-05-05 17:10:37 +00:00
wpaul
819bac8d1e Use %jx instead of %qx to silence compiler warning on amd64. 2005-05-05 15:56:41 +00:00
avatar
5264ecc9eb Catching up with the latest crypto API changes in net80211.
Reviewed by:	sam
2005-05-05 13:16:30 +00:00
wilko
06c6095d7e ICH5 is also supported by ichsmb 2005-05-05 12:03:36 +00:00
ume
9f4066d658 add simple test script. 2005-05-05 11:26:47 +00:00
takawata
68a4e0f83e Fix breakage on alpha.
Pointed out by: hrs via IRC
2005-05-05 07:02:51 +00:00
davidxu
af64c19b3b Only check signal event, single threading event shouldn't be reported. 2005-05-05 06:42:02 +00:00
wpaul
077b71e0fa Avoid sleeping with mutex held in kern_ndis.c.
Remove unused fields from ndis_miniport_block.

Fix a bug in KeFlushQueuedDpcs() (we weren't calculating the kq pointer
correctly).

In if_ndis.c, clear the IFF_RUNNING flag before calling ndis_halt_nic().

Add some guards in kern_ndis.c to avoid letting anyone invoke ndis_get_info()
or ndis_set_info() if the NIC isn't fully initialized. Apparently, mdnsd
will sometimes try to invoke the ndis_ioctl() routine at exactly the
wrong moment (to futz with its multicast filters) when the interface
comes up, and can trigger a crash unless we guard against it.
2005-05-05 06:14:59 +00:00
wpaul
bb2b136388 Remove extranaous free() of ASCII filename from NdisOpenFile().
Oh, one additional change I forgot to mention in the last commit:
NdisOpenFile() was broken in the case for firmware files that were
pre-loaded as modules. When searching for the module in NdisOpenFile(),
we would match against a symbol name, which would contain the string
we were looking for, then save a pointer to the linker file handle.
Later, in NdisMapFile(), we would refer to the filename hung off
this handle when trying to find the starting address symbol. Only
problem is, this filename is different from the embedded symbol
name we're searching for, so the mapping would fail. I found this
problem while testing the AirGo driver, which requires a small
firmware file.
2005-05-05 04:16:13 +00:00
wpaul
e9bace5ba1 This commit makes a bunch of changes, some big, some not so big.
- Remove the old task threads from kern_ndis.c and reimplement them in
  subr_ntoskrnl.c, in order to more properly emulate the Windows DPC
  API. Each CPU gets its own DPC queue/thread, and each queue can
  have low, medium and high importance DPCs. New APIs implemented:
  KeSetTargetProcessorDpc(), KeSetImportanceDpc() and KeFlushQueuedDpcs().
  (This is the biggest change.)

- Fix a bug in NdisMInitializeTimer(): the k_dpc pointer in the
  nmt_timer embedded in the ndis_miniport_timer struct must be set
  to point to the DPC, also embedded in the struct. Failing to do
  this breaks dequeueing of DPCs submitted via timers, and in turn
  breaks cancelling timers.

- Fix a bug in KeCancelTimer(): if the timer is interted in the timer
  queue (i.e. the timeout callback is still pending), we have to both
  untimeout() the timer _and_ call KeRemoveQueueDpc() to nuke the DPC
  that might be pending. Failing to do this breaks cancellation of
  periodic timers, which always appear to be inserted in the timer queue.

- Make use of the nmt_nexttimer field in ndis_miniport_timer: keep a
  queue of pending timers and cancel them all in ndis_halt_nic(), prior
  to calling MiniportHalt(). Also call KeFlushQueuedDpcs() to make sure
  any DPCs queued by the timers have expired.

- Modify NdisMAllocateSharedMemory() and NdisMFreeSharedMemory() to keep
  track of both the virtual and physical addresses of the shared memory
  buffers that get handed out. The AirGo MIMO driver appears to have a bug
  in it: for one of the segments is allocates, it returns the wrong
  virtual address. This would confuse NdisMFreeSharedMemory() and cause
  a crash. Why it doesn't crash Windows too I have no idea (from reading
  the documentation for NdisMFreeSharedMemory(), it appears to be a violation
  of the API).

- Implement strstr(), strchr() and MmIsAddressValid().

- Implement IoAllocateWorkItem(), IoFreeWorkItem(), IoQueueWorkItem() and
  ExQueueWorkItem(). (This is the second biggest change.)

- Make NdisScheduleWorkItem() call ExQueueWorkItem(). (Note that the
  ExQueueWorkItem() API is deprecated by Microsoft, but NDIS still uses
  it, since NdisScheduleWorkItem() is incompatible with the IoXXXWorkItem()
  API.)

- Change if_ndis.c to use the NdisScheduleWorkItem() interface for scheduling
  tasks.

With all these changes and fixes, the AirGo MIMO driver for the Belkin
F5D8010 Pre-N card now works. Special thanks to Paul Robinson
(paul dawt robinson at pwermedia dawt net) for the loan of a card
for testing.
2005-05-05 03:56:09 +00:00
dwhite
e5184a989d Backout part of rev 1.71, which breaks the interfaces on IBM/Intel blade
servers.

PR:		kern/68445
MFC after:	7 days
2005-05-05 03:37:27 +00:00
davidxu
2c20740b4e Turn on PCB_FULLCTX in set_regs to fully restore context
set by debugger.
2005-05-04 22:26:40 +00:00
jeff
95489bf6b4 - We need to inhert the OBJ_NEEDGIANT flag from the original object in
vm_object_split().

Spotted by:	alc
2005-05-04 20:54:16 +00:00
mp
dc094aca69 Define HAVE_STRUCT_UTMP_UT_HOST in order for the REMOTEHOST environment
variable to show up correctly.

Note: This is really a bug with the stock tcsh configure.in script not
including <sys/types.h> before <utmp.h>. But, since config.h is maintained
separate from the contrib sources, this is the correct fix.

Noticed by: ache
2005-05-04 20:21:57 +00:00
mlaier
896129e0f9 if_mtu not ifp_mtu. 2005-05-04 19:51:06 +00:00
ume
f0bd095e96 - add $FreeBSD$.
- enable -r option for regress target.
2005-05-04 19:40:30 +00:00
emax
a52b6c9ce3 Change m_uiotombuf so it will accept offset at which data should be copied
to the mbuf. Offset cannot exceed MHLEN bytes. This is currently used to
fix Ethernet header alignment problem on alpha and sparc64. Also change all
users of m_uiotombuf to pass proper offset.

Reviewed by:	jmg, sam
Tested by:	Sten Spans "sten AT blinkenlights DOT nl"
MFC after:	1 week
2005-05-04 18:55:03 +00:00
ps
40a0d434da Fix a bug in NFS/TCP where retransmissions would not reliably happen
if the server rebooted or tore down the connection for any reason.

Found by:	Jonathan Noack.
Submitted by:	Mohan Srinivasan.
2005-05-04 16:37:31 +00:00
mlaier
eba8487d85 Bring back fix from rev. 1.28 which was lost during the import. 2005-05-04 16:03:01 +00:00
mlaier
587ccf7938 Combine rev. 1.29 and 1.30 to something that will make sense for future
imports.
2005-05-04 15:55:29 +00:00
mlaier
2383ca5b3c Make LINT happy. 2005-05-04 15:29:28 +00:00
takawata
a61ec3d816 Make smbfs capable to use 16bit char set in filenames.
PR:78110
2005-05-04 15:05:46 +00:00
murray
ad22e93c3e Add more technical terms to reduce false positives when spellchecking
FreeBSD documentation.
2005-05-04 14:19:36 +00:00
andre
757e9ec267 If we don't get a suggested MTU during path MTU discovery
look up the packet size of the packet that generated the
response, step down the MTU by one step through ip_next_mtu()
and try again.

Suggested by:	dwmalone
2005-05-04 13:48:44 +00:00
glebius
a0f1ce3be1 Cleanup IPFW2 ifdefs. 2005-05-04 13:24:37 +00:00
glebius
6d827336e9 Makefile is not needed here. 2005-05-04 13:24:12 +00:00
andre
e4576466d8 Add another step of 1280 (gif(4) tunnels) to ip_next_mtu(). 2005-05-04 13:23:54 +00:00
glebius
32e61f472f IPFW version 2 is the only option now in HEAD. Do not confuse
users of future releases with instructions about building IPFW2
on RELENG_4.
2005-05-04 13:14:57 +00:00
glebius
cf5c01798e IPFW version 2 is the only option in HEAD and RELENG_5.
Thus, cleanup unnecessary now ifdefs.
2005-05-04 13:12:52 +00:00
andre
e6d10efc2a Pass icmp_error() the MTU argument directly instead of
an interface pointer.  This simplifies a couple of uses
and removes some XXX workarounds.
2005-05-04 13:09:19 +00:00
glebius
c9c0d4d0d6 Build userland libalias using src/sys/netinet/libalias.
Reviewed by:	ru
Repocopy by:	peter
2005-05-04 12:49:44 +00:00
fjoe
5542bd31ad Add -m option (find module using modfind() and stat it). 2005-05-04 12:46:43 +00:00
ume
c93d1b9f93 - add $FreeBSD$.
- do service lookup.
- add options to use gethostbyname(3) or getipnodebyname(3) instead
  of getaddrinfo(3).
- add option to do reverse lookup.
2005-05-04 12:02:10 +00:00
ume
8f2ac72729 This commit was generated by cvs2svn to compensate for changes in r145857,
which included commits to RCS files with non-trunk default branches.
2005-05-04 11:55:42 +00:00