Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b8ff8ffb
Commit
b8ff8ffb
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.0alpha
parent
b764939b
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
100 additions
and
133 deletions
+100
-133
Makefile
Makefile
+2
-2
README
README
+7
-7
config.in
config.in
+2
-2
drivers/net/3c509.c
drivers/net/3c509.c
+6
-4
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+5
-3
fs/buffer.c
fs/buffer.c
+2
-4
fs/ext2/CHANGES
fs/ext2/CHANGES
+11
-0
fs/ext2/super.c
fs/ext2/super.c
+14
-14
fs/proc/link.c
fs/proc/link.c
+4
-0
include/linux/ext2_fs.h
include/linux/ext2_fs.h
+2
-2
include/linux/interrupt.h
include/linux/interrupt.h
+3
-3
kernel/traps.c
kernel/traps.c
+4
-4
mm/kmalloc.c
mm/kmalloc.c
+6
-0
mm/swap.c
mm/swap.c
+6
-0
net/inet/ip.c
net/inet/ip.c
+1
-1
net/inet/skbuff.c
net/inet/skbuff.c
+9
-1
net/inet/sock.c
net/inet/sock.c
+5
-1
net/inet/tcp.c
net/inet/tcp.c
+10
-84
zBoot/Makefile
zBoot/Makefile
+1
-1
No files found.
Makefile
View file @
b8ff8ffb
...
...
@@ -149,7 +149,7 @@ init/main.o: $(CONFIGURE) init/main.c
$(CC)
$(CFLAGS)
$(PROFILING)
-c
-o
$*
.o
$<
tools/system
:
boot/head.o init/main.o tools/version.o linuxsubdirs
$(LD)
$(LDFLAGS)
-T
1000 boot/head.o init/main.o tools/version.o
\
$(LD)
$(LDFLAGS)
-T
text
1000 boot/head.o init/main.o tools/version.o
\
$(ARCHIVES)
\
$(FILESYSTEMS)
\
$(DRIVERS)
\
...
...
@@ -194,7 +194,7 @@ zlilo: $(CONFIGURE) zImage
if
[
-x
/sbin/lilo
]
;
then
/sbin/lilo
;
else
/etc/lilo/install
;
fi
tools/zSystem
:
boot/head.o init/main.o tools/version.o linuxsubdirs
$(LD)
$(LDFLAGS)
-T
100000 boot/head.o init/main.o tools/version.o
\
$(LD)
$(LDFLAGS)
-T
text
100000 boot/head.o init/main.o tools/version.o
\
$(ARCHIVES)
\
$(FILESYSTEMS)
\
$(DRIVERS)
\
...
...
README
View file @
b8ff8ffb
Linux
kernel
release
0.99
patchlevel
15
Linux
kernel
release
1.0
These
are
the
release
notes
for
linux
version
0.99.15
.
Read
them
carefully
,
as
they
tell
you
what
's new, explain how to install the
kernel, and what
to do if something goes wrong.
These
are
the
release
notes
for
linux
version
1.0
.
Read
them
carefully
,
as
they
tell
you
what
's new, explain how to install the kernel, and what
to do if something goes wrong.
INSTALLING the kernel:
- if you install by patching, you need a *clean* 0.99.1
4
source tree,
- if you install by patching, you need a *clean* 0.99.1
5
source tree,
which presumably exists in /usr/src/linux. If so, to get the kernel
patched, just do a
cd /usr/src
patch -p0 < linux-
0.99.patch15
patch -p0 < linux-
1.0.patch
and you should be ok. You may want to remove the backup files (xxx~
or xxx.orig), and make sure that there are no failed patches (xxx# or
...
...
@@ -21,7 +21,7 @@ INSTALLING the kernel:
- If you install the full sources, do a
cd /usr/src
tar xvf linux-
0.99.15
.tar
tar xvf linux-
1.0
.tar
to get it all put in place.
...
...
config.in
View file @
b8ff8ffb
...
...
@@ -106,7 +106,7 @@ bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
*
#bool 'Keyboard meta-key sends ESC-prefix' CONFIG_KBD_META y
#bool 'Keyboard Num Lock on by default' CONFIG_KBD_NUML y
bool 'Parallel printer support' CONFIG_PRINTER
y
bool 'Parallel printer support' CONFIG_PRINTER
n
bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE y
if [ "$CONFIG_PSMOUSE" = "y" ]
...
...
@@ -114,7 +114,7 @@ bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
fi
bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
bool 'Selection (cut and paste for virtual consoles)' CONFIG_SELECTION
y
bool 'Selection (cut and paste for virtual consoles)' CONFIG_SELECTION
n
bool 'QIC-02 tape support' CONFIG_TAPE_QIC02 n
bool 'QIC-117 tape support' CONFIG_FTAPE n
if [ "$CONFIG_FTAPE" = "y" ]
...
...
drivers/net/3c509.c
View file @
b8ff8ffb
...
...
@@ -13,7 +13,7 @@
C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
*/
static
char
*
version
=
"3c509.c:pl15
i 2/23
/94 becker@super.org
\n
"
;
static
char
*
version
=
"3c509.c:pl15
k 3/5
/94 becker@super.org
\n
"
;
#include <linux/config.h>
#include <linux/kernel.h>
...
...
@@ -190,7 +190,7 @@ int el3_probe(struct device *dev)
{
char
*
if_names
[]
=
{
"10baseT"
,
"AUI"
,
"undefined"
,
"BNC"
};
printk
(
"%s: 3c509 at %#3.3x
tag %d, %s port, address "
,
printk
(
"%s: 3c509 at %#3.3x tag %d, %s port, address "
,
dev
->
name
,
dev
->
base_addr
,
current_tag
,
if_names
[
dev
->
if_port
]);
}
...
...
@@ -477,10 +477,12 @@ el3_interrupt(int reg_ptr)
if
(
++
i
>
10
)
{
printk
(
"%s: Infinite loop in interrupt, status %4.4x.
\n
"
,
dev
->
name
,
status
);
/* Clear all interrupts we have handled. */
outw
(
0x68FF
,
ioaddr
+
EL3_CMD
);
break
;
}
/*
Clear the other interrupts we have handled
. */
outw
(
0x689
9
,
ioaddr
+
EL3_CMD
);
/* Ack IRQ */
/*
Acknowledge the IRQ
. */
outw
(
0x689
1
,
ioaddr
+
EL3_CMD
);
/* Ack IRQ */
}
if
(
el3_debug
>
4
)
{
...
...
drivers/scsi/scsi.c
View file @
b8ff8ffb
...
...
@@ -127,10 +127,12 @@ static unsigned char generic_sense[6] = {REQUEST_SENSE, 0,0,0, 255, 0};
static
struct
blist
blacklist
[]
=
{
{
"DENON"
,
"DRD-25X"
,
"V"
},
/* A cdrom that locks up when probed at lun != 0 */
{
"MAXTOR"
,
"XT-3280"
,
"PR02"
},
/* Locks-up when LUN>0 polled. */
{
"MAXTOR"
,
"XT-4380S"
,
"B3C"
},
/* Locks-up when LUN>0 polled. */
{
"IMS"
,
"CDD521/10"
,
"2.06"
},
/* Locks-up when LUN>0 polled. */
{
"MAXTOR"
,
"XT-3280"
,
"PR02"
},
/* Locks-up when LUN>0 polled. */
{
"MAXTOR"
,
"XT-4380S"
,
"B3C"
},
/* Locks-up when LUN>0 polled. */
{
"MAXTOR"
,
"MXT-1240S"
,
"I1.2"
},
/* Locks up when LUN > 0 polled */
{
"MAXTOR"
,
"XT-4170S"
,
"B5A"
},
/* Locks-up sometimes when LUN>0 polled. */
{
"MAXTOR"
,
"XT-4170S"
,
"B5A"
},
/* Locks-up sometimes when LUN>0 polled. */
{
"MAXTOR"
,
"XT-8760S"
,
"B7B"
},
/* guess what? */
{
"NEC"
,
"CD-ROM DRIVE:841"
,
"1.0"
},
/* Locks-up when LUN>0 polled. */
{
"RODIME"
,
"RO3000S"
,
"2.33"
},
/* Locks up if polled for lun != 0 */
{
"SEAGATE"
,
"ST157N"
,
"
\004
|j"
},
/* causes failed REQUEST SENSE on lun 1 for aha152x
...
...
fs/buffer.c
View file @
b8ff8ffb
...
...
@@ -748,16 +748,14 @@ static unsigned long try_to_load_aligned(unsigned long address,
bh
=
create_buffers
(
address
,
size
);
if
(
!
bh
)
return
0
;
/* do any of the buffers already exist? punt if so.. */
p
=
b
;
for
(
offset
=
0
;
offset
<
PAGE_SIZE
;
offset
+=
size
)
{
block
=
*
(
p
++
);
if
(
!
block
)
goto
not_aligned
;
tmp
=
get_hash_table
(
dev
,
block
,
size
);
if
(
tmp
)
{
brelse
(
tmp
);
if
(
find_buffer
(
dev
,
block
,
size
))
goto
not_aligned
;
}
}
tmp
=
bh
;
p
=
b
;
...
...
fs/ext2/CHANGES
View file @
b8ff8ffb
Changes from version 0.4b to version 0.5
========================================
- New superblock fields: s_lastcheck and s_checkinterval added
by Uwe Ohse <uwe@tirka.gun.de> to implement timedependent checks
of the file system
- Real random numbers for secure rm added by Pierre del Perugia
<delperug@gla.ecoledoc.ibp.fr>
- The mount warnings related to the state of a fs are not printed
if the fs is mounted read-only, idea by Nick Holloway
<alfie@dcs.warwick.ac.uk>
Changes from version 0.4a to version 0.4b
=========================================
- Copyrights changed to include the name of my laboratory.
...
...
fs/ext2/super.c
View file @
b8ff8ffb
...
...
@@ -267,21 +267,21 @@ static int parse_options (char * options, unsigned long * sb_block,
static
void
ext2_setup_super
(
struct
super_block
*
sb
,
struct
ext2_super_block
*
es
)
{
if
(
!
(
sb
->
u
.
ext2_sb
.
s_mount_state
&
EXT2_VALID_FS
))
printk
(
"EXT2-fs warning: mounting unchecked fs, "
"running e2fsck is recommended
\n
"
);
else
if
((
sb
->
u
.
ext2_sb
.
s_mount_state
&
EXT2_ERROR_FS
))
printk
(
"EXT2-fs warning: mounting fs with errors, "
"running e2fsck is recommended
\n
"
);
else
if
(
es
->
s_max_mnt_count
>=
0
&&
es
->
s_mnt_count
>=
(
unsigned
short
)
es
->
s_max_mnt_count
)
printk
(
"EXT2-fs warning: maximal mount count reached, "
"running e2fsck is recommended
\n
"
);
else
if
(
es
->
s_checkinterval
&&
(
es
->
s_lastcheck
+
es
->
s_checkinterval
<=
CURRENT_TIME
))
printk
(
"EXT2-fs warning: checktime reached, "
"running e2fsck is recommended
\n
"
);
if
(
!
(
sb
->
s_flags
&
MS_RDONLY
))
{
if
(
!
(
sb
->
u
.
ext2_sb
.
s_mount_state
&
EXT2_VALID_FS
))
printk
(
"EXT2-fs warning: mounting unchecked fs, "
"running e2fsck is recommended
\n
"
);
else
if
((
sb
->
u
.
ext2_sb
.
s_mount_state
&
EXT2_ERROR_FS
))
printk
(
"EXT2-fs warning: mounting fs with errors, "
"running e2fsck is recommended
\n
"
);
else
if
(
es
->
s_max_mnt_count
>=
0
&&
es
->
s_mnt_count
>=
(
unsigned
short
)
es
->
s_max_mnt_count
)
printk
(
"EXT2-fs warning: maximal mount count reached, "
"running e2fsck is recommended
\n
"
);
else
if
(
es
->
s_checkinterval
&&
(
es
->
s_lastcheck
+
es
->
s_checkinterval
<=
CURRENT_TIME
))
printk
(
"EXT2-fs warning: checktime reached, "
"running e2fsck is recommended
\n
"
);
es
->
s_state
&=
~
EXT2_VALID_FS
;
if
(
!
es
->
s_max_mnt_count
)
es
->
s_max_mnt_count
=
EXT2_DFL_MAX_MNT_COUNT
;
...
...
fs/proc/link.c
View file @
b8ff8ffb
...
...
@@ -111,6 +111,10 @@ static int proc_readlink(struct inode * inode, char * buffer, int buflen)
unsigned
int
dev
,
ino
;
char
buf
[
64
];
if
(
!
S_ISLNK
(
inode
->
i_mode
))
{
iput
(
inode
);
return
-
EINVAL
;
}
i
=
proc_follow_link
(
NULL
,
inode
,
0
,
0
,
&
inode
);
if
(
i
)
return
i
;
...
...
include/linux/ext2_fs.h
View file @
b8ff8ffb
...
...
@@ -52,8 +52,8 @@
/*
* The second extended file system version
*/
#define EXT2FS_DATE "94/0
1/08
"
#define EXT2FS_VERSION "0.
4b
"
#define EXT2FS_DATE "94/0
3/10
"
#define EXT2FS_VERSION "0.
5
"
/*
* Debug code
...
...
include/linux/interrupt.h
View file @
b8ff8ffb
...
...
@@ -24,17 +24,17 @@ enum {
extern
inline
void
mark_bh
(
int
nr
)
{
__asm__
__volatile__
(
"
btsl %1,%0"
:
"=m"
(
bh_active
)
:
"ir"
(
nr
));
__asm__
__volatile__
(
"
orl %1,%0"
:
"=m"
(
bh_active
)
:
"ir"
(
1
<<
nr
));
}
extern
inline
void
disable_bh
(
int
nr
)
{
__asm__
__volatile__
(
"
btcl %1,%0"
:
"=m"
(
bh_mask
)
:
"ir"
(
nr
));
__asm__
__volatile__
(
"
andl %1,%0"
:
"=m"
(
bh_mask
)
:
"ir"
(
~
(
1
<<
nr
)
));
}
extern
inline
void
enable_bh
(
int
nr
)
{
__asm__
__volatile__
(
"
btsl %1,%0"
:
"=m"
(
bh_mask
)
:
"ir"
(
nr
));
__asm__
__volatile__
(
"
orl %1,%0"
:
"=m"
(
bh_mask
)
:
"ir"
(
1
<<
nr
));
}
#endif
kernel/traps.c
View file @
b8ff8ffb
...
...
@@ -101,12 +101,12 @@ asmlinkage void alignment_check(void);
printk
(
"ds: %04x es: %04x fs: %04x gs: %04x ss: %04x
\n
"
,
regs
->
ds
,
regs
->
es
,
regs
->
fs
,
regs
->
gs
,
ss
);
store_TR
(
i
);
printk
(
"Pid: %d, process nr: %d (%s)
\n
Code: "
,
current
->
pid
,
0xffff
&
i
,
current
->
comm
);
for
(
i
=
0
;
i
<
20
;
i
++
)
printk
(
"%02x "
,
0xff
&
get_seg_byte
(
regs
->
cs
,(
i
+
(
char
*
)
regs
->
eip
)));
printk
(
"
\n
Stack: "
);
printk
(
"Pid: %d, process nr: %d (%s)
\n
Stack: "
,
current
->
pid
,
0xffff
&
i
,
current
->
comm
);
for
(
i
=
0
;
i
<
5
;
i
++
)
printk
(
"%08lx "
,
get_seg_long
(
ss
,(
i
+
(
unsigned
long
*
)
esp
)));
printk
(
"
\n
Code: "
);
for
(
i
=
0
;
i
<
20
;
i
++
)
printk
(
"%02x "
,
0xff
&
get_seg_byte
(
regs
->
cs
,(
i
+
(
char
*
)
regs
->
eip
)));
printk
(
"
\n
"
);
do_exit
(
SIGSEGV
);
}
...
...
mm/kmalloc.c
View file @
b8ff8ffb
...
...
@@ -151,8 +151,14 @@ void * kmalloc (size_t size, int priority)
int
order
,
tries
,
i
,
sz
;
struct
block_header
*
p
;
struct
page_descriptor
*
page
;
extern
unsigned
long
intr_count
;
/* Sanity check... */
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"kmalloc called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
if
(
size
>
MAX_KMALLOC_K
*
1024
)
{
printk
(
"kmalloc: I refuse to allocate %d bytes (for now max = %d).
\n
"
,
...
...
mm/swap.c
View file @
b8ff8ffb
...
...
@@ -585,6 +585,7 @@ last_free_pages[index = (index + 1) & (NR_LAST_FREE_PAGES - 1)] = result; \
*/
unsigned
long
__get_free_page
(
int
priority
)
{
extern
unsigned
long
intr_count
;
unsigned
long
result
,
flag
;
static
unsigned
long
index
=
0
;
...
...
@@ -593,6 +594,11 @@ unsigned long __get_free_page(int priority)
sections of code have interrupts disabled. -RAB
Is this code reentrant? */
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"gfp called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
priority
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
save_flags
(
flag
);
repeat:
REMOVE_FROM_MEM_QUEUE
(
free_page_list
,
nr_free_pages
);
...
...
net/inet/ip.c
View file @
b8ff8ffb
...
...
@@ -1041,7 +1041,7 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
len
,
len
+
hlen
));
/* Allocate buffer. */
if
((
skb2
=
alloc_skb
(
sizeof
(
struct
sk_buff
)
+
len
+
hlen
,
GFP_
KERNEL
))
==
NULL
)
if
((
skb2
=
alloc_skb
(
sizeof
(
struct
sk_buff
)
+
len
+
hlen
,
GFP_
ATOMIC
))
==
NULL
)
{
printk
(
"IP: frag: no memory for new fragment!
\n
"
);
return
;
...
...
net/inet/skbuff.c
View file @
b8ff8ffb
...
...
@@ -425,7 +425,15 @@ void kfree_skb(struct sk_buff *skb, int rw)
struct
sk_buff
*
alloc_skb
(
unsigned
int
size
,
int
priority
)
{
struct
sk_buff
*
skb
=
(
struct
sk_buff
*
)
kmalloc
(
size
,
priority
);
struct
sk_buff
*
skb
;
extern
unsigned
long
intr_count
;
if
(
intr_count
&&
priority
!=
GFP_ATOMIC
)
{
printk
(
"alloc_skb called nonatomically from interrupt %08lx
\n
"
,
((
unsigned
long
*
)
&
size
)[
-
1
]);
priority
=
GFP_ATOMIC
;
}
skb
=
(
struct
sk_buff
*
)
kmalloc
(
size
,
priority
);
if
(
skb
==
NULL
)
return
NULL
;
skb
->
free
=
2
;
/* Invalid so we pick up forgetful users */
...
...
net/inet/sock.c
View file @
b8ff8ffb
...
...
@@ -982,9 +982,13 @@ inet_release(struct socket *sock, struct socket *peer)
while
(
sk
->
state
!=
TCP_CLOSE
&&
current
->
timeout
>
0
)
{
interruptible_sleep_on
(
sk
->
sleep
);
if
(
current
->
signal
&
~
current
->
blocked
)
{
break
;
#if 0
/* not working now - closes can't be restarted */
sti();
current->timeout=0;
return(-ERESTARTSYS);
#endif
}
}
current
->
timeout
=
0
;
...
...
@@ -1855,7 +1859,7 @@ void inet_proto_init(struct ddi_proto *pro)
struct
inet_protocol
*
p
;
int
i
;
printk
(
"Swansea University Computer Society Net2Debugged [1.
27
]
\n
"
);
printk
(
"Swansea University Computer Society Net2Debugged [1.
30
]
\n
"
);
/* Set up our UNIX VFS major device. */
if
(
register_chrdev
(
AF_INET_MAJOR
,
"af_inet"
,
&
inet_fops
)
<
0
)
{
printk
(
"%s: cannot register major device %d!
\n
"
,
...
...
net/inet/tcp.c
View file @
b8ff8ffb
...
...
@@ -3602,99 +3602,25 @@ tcp_write_wakeup(struct sock *sk)
sk
->
prot
->
queue_xmit
(
sk
,
dev
,
buff
,
1
);
}
/*
* This routine probes a zero window. It makes a copy of the first
* packet in the write queue, but with just one byte of data.
*/
void
tcp_send_probe0
(
struct
sock
*
sk
)
{
unsigned
char
*
raw
;
struct
iphdr
*
iph
;
struct
sk_buff
*
skb2
,
*
skb
;
int
len
,
hlen
,
data
;
struct
tcphdr
*
t1
;
struct
device
*
dev
;
if
(
sk
->
zapped
)
return
;
/* Afer a valid reset we can send no more */
if
(
sk
->
zapped
)
return
;
/* Afer a valid reset we can send no more */
if
(
sk
->
state
!=
TCP_ESTABLISHED
&&
sk
->
state
!=
TCP_CLOSE_WAIT
&&
sk
->
state
!=
TCP_FIN_WAIT1
&&
sk
->
state
!=
TCP_FIN_WAIT2
)
return
;
tcp_write_wakeup
(
sk
);
skb
=
sk
->
wfront
;
if
(
skb
==
NULL
)
return
;
dev
=
skb
->
dev
;
/* I know this can't happen but as it does.. */
if
(
dev
==
NULL
)
{
printk
(
"tcp_send_probe0: NULL device bug!
\n
"
);
return
;
}
IS_SKB
(
skb
);
raw
=
skb
->
data
;
iph
=
(
struct
iphdr
*
)
(
raw
+
dev
->
hard_header_len
);
hlen
=
(
iph
->
ihl
*
sizeof
(
unsigned
long
))
+
dev
->
hard_header_len
;
data
=
skb
->
len
-
hlen
-
sizeof
(
struct
tcphdr
);
len
=
hlen
+
sizeof
(
struct
tcphdr
)
+
(
data
?
1
:
0
);
/* Allocate buffer. */
if
((
skb2
=
alloc_skb
(
sizeof
(
struct
sk_buff
)
+
len
,
GFP_ATOMIC
))
==
NULL
)
{
/* printk("alloc failed raw %x th %x hlen %d data %d len %d\n",
raw, skb->h.th, hlen, data, len); */
reset_timer
(
sk
,
TIME_PROBE0
,
10
);
/* try again real soon */
return
;
}
skb2
->
arp
=
skb
->
arp
;
skb2
->
len
=
len
;
skb2
->
h
.
raw
=
(
char
*
)(
skb2
->
data
);
sk
->
wmem_alloc
+=
skb2
->
mem_len
;
/* Copy the packet header into the new buffer. */
memcpy
(
skb2
->
h
.
raw
,
raw
,
len
);
skb2
->
h
.
raw
+=
hlen
;
/* it's now h.th -- pointer to the tcp header */
t1
=
skb2
->
h
.
th
;
/* source, dest, seq, from existing packet */
t1
->
ack_seq
=
ntohl
(
sk
->
acked_seq
);
t1
->
res1
=
0
;
/* doff, fin, from existing packet. Fin is safe because Linux always
* sends fin in a separate packet
* syn, rst, had better be zero in original */
t1
->
ack
=
1
;
t1
->
res2
=
0
;
t1
->
window
=
ntohs
(
tcp_select_window
(
sk
)
/*sk->prot->rspace(sk)*/
);
tcp_send_check
(
t1
,
sk
->
saddr
,
sk
->
daddr
,
len
-
hlen
,
sk
);
/* Send it and free it.
* This will prevent the timer from automatically being restarted.
*/
sk
->
prot
->
queue_xmit
(
sk
,
dev
,
skb2
,
1
);
sk
->
backoff
++
;
/*
* in the case of retransmissions, there's good reason to limit
* rto to 120 sec, as that's the maximum legal RTT on the Internet.
* For probes it could reasonably be longer. However making it
* much longer could cause unacceptable delays in some situation,
* so we might as well use the same value
*/
sk
->
rto
=
min
(
sk
->
rto
<<
1
,
120
*
HZ
);
reset_timer
(
sk
,
TIME_PROBE0
,
sk
->
rto
);
sk
->
retransmits
++
;
sk
->
prot
->
retransmits
++
;
sk
->
backoff
++
;
sk
->
rto
=
min
(
sk
->
rto
<<
1
,
120
*
HZ
);
reset_timer
(
sk
,
TIME_PROBE0
,
sk
->
rto
);
sk
->
retransmits
++
;
sk
->
prot
->
retransmits
++
;
}
/*
* Socket option code for TCP.
*/
*/
int
tcp_setsockopt
(
struct
sock
*
sk
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
)
{
int
val
,
err
;
...
...
zBoot/Makefile
View file @
b8ff8ffb
...
...
@@ -18,7 +18,7 @@ CFLAGS = -O2 -DSTDC_HEADERS $(TEST)
all
:
zSystem
zSystem
:
piggy.o $(zOBJECTS)
$(LD)
$(LDFLAGS)
-o
zSystem
-T
1000
$(zOBJECTS)
piggy.o
$(LD)
$(LDFLAGS)
-o
zSystem
-T
text
1000
$(zOBJECTS)
piggy.o
head.o
:
head.s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment