Check-in [219730c82b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bump version number
Timelines: family | ancestors | descendants | both | trunk | 0.9.1-20190829
Files: files | file ages | folders
SHA1: 219730c82b60f60f726d7fe0f238553e8615ceaa
User & Date: bernd 2019-08-29 12:07:07
Context
2019-08-30
18:49
Experiment with flow label check-in: 78b0625b9a user: bernd tags: trunk
2019-08-29
12:07
Bump version number check-in: 219730c82b user: bernd tags: trunk, 0.9.1-20190829
2019-08-26
21:59
Revert NOPE check-in: 39625fe0e3 user: bernd tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to configure.ac.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

AC_INIT([net2o], [0.9.1-20190822], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT

AC_MSG_CHECKING([for gforth])








|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

AC_INIT([net2o], [0.9.1-20190829], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist])
AC_PREREQ([2.59])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT

AC_MSG_CHECKING([for gforth])

Changes to do.

1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

echo "This script builds net2o from scratch"

GFORTH=gforth-0.7.9_20190822

if [ "$(uname -o)" = "Cygwin" ]
then
    CONFOPT="--prefix=/usr $*"
else
    CONFOPT="$*"
fi




|







1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

echo "This script builds net2o from scratch"

GFORTH=gforth-0.7.9_20190829

if [ "$(uname -o)" = "Cygwin" ]
then
    CONFOPT="--prefix=/usr $*"
else
    CONFOPT="$*"
fi

Changes to net2o.fs.

916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
....
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
....
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
....
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
	0= IF  data-resend 0 2 cells $del  THEN
    maxdata +LOOP ;

: data-resend-flush ( -- )
    data-resend $@len 0 U+DO
	data-resend $@ I /string drop @ 0= IF
	    data-resend I 2 cells $del
	    0  data-resend $@len I unloop U+DO NOPE
	ELSE
	    [ 2 cells ]L
	THEN
    +LOOP ;

: remove-resend { nback -- }
    data-resend $@ bounds U+DO
................................................................................
      o chunk-adder chunk-context !
      0 chunk-adder chunk-count !
      chunk-adder chunks-struct chunks $+! ;]
    resize-sema c-section
    ticker 64@ ack@ .ticks-init ;

: o-chunks ( -- )
    [: chunks $@ bounds ?DO
	    I chunk-context @ o = IF
		chunks I chunks-struct del$one
		unloop chunks next$ ?DO NOPE 0
	    ELSE  chunks-struct  THEN  +LOOP ;]
    resize-sema c-section ;

event: :>send-chunks ( o -- ) .do-send-chunks ;

in net2o : send-chunks  sender-task 0= IF  do-send-chunks  EXIT  THEN
    <event o elit, :>send-chunks sender-task event> ;
................................................................................

: add-queue ( xt us -- )
    ticker 64@ +  o queue-adder >o queue-job !  queue-timestamp 64!
    is queue-xt  o queue-struct queue $+! o> ;

: eval-queue ( -- )
    queue $@len 0= ?EXIT  ticker 64@
    queue $@ bounds ?DO  I >o
	64dup queue-timestamp 64@ 64u> IF
	    addr queue-xt @ queue-job @ .execute o>
	    queue I queue-struct del$one
	    unloop queue next$ ?DO  NOPE 0
	ELSE  o>  queue-struct  THEN
    +LOOP  64drop ;

\ poll loop

: prep-evsocks ( -- )
    epiper @    fileno POLLIN pollfds fds!+ drop 1 to pollfd# ;
................................................................................
    [: ticks 64dup [ tmp-cookie .cc-timeout ]L 64!
	o [ tmp-cookie .cc-context ]L !
	tmp-cookie cookie-size#  cookies $+! ;]
    resize-sema c-section ;

: do-?cookie ( cookie -- context true / false )
    ticker 64@ connect-timeout# 64- { 64: timeout }
    cookies $@ bounds ?DO
	64dup I .cc-timeout 64@ 64= IF \ if we have a hit, use that
	    64drop I .cc-context @
	    I .cc-secret [ tmp-cookie .cc-secret ]L KEYBYTES move
	    cookies I cookie-size# del$one drop
	    unloop  dup IF  true  THEN  EXIT
	THEN
	I .cc-timeout 64@ timeout 64u< IF
	    cookies I cookie-size# del$one
	    cookies next$
	    unloop  ?DO  NOPE \ this replaces the loop variables
	    0 \ we re-iterate over the exactly same index
	ELSE
	    cookie-size#
	THEN
    +LOOP  64drop 0 ;

: ?cookie ( cookie -- context true / false )







|







 







|


|







 







|



|







 







|









|







916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
....
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
....
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
....
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
	0= IF  data-resend 0 2 cells $del  THEN
    maxdata +LOOP ;

: data-resend-flush ( -- )
    data-resend $@len 0 U+DO
	data-resend $@ I /string drop @ 0= IF
	    data-resend I 2 cells $del
	    0  data-resend $@len I replace-loop
	ELSE
	    [ 2 cells ]L
	THEN
    +LOOP ;

: remove-resend { nback -- }
    data-resend $@ bounds U+DO
................................................................................
      o chunk-adder chunk-context !
      0 chunk-adder chunk-count !
      chunk-adder chunks-struct chunks $+! ;]
    resize-sema c-section
    ticker 64@ ack@ .ticks-init ;

: o-chunks ( -- )
    [: chunks $@ bounds U+DO
	    I chunk-context @ o = IF
		chunks I chunks-struct del$one
		chunks next$ replace-loop 0
	    ELSE  chunks-struct  THEN  +LOOP ;]
    resize-sema c-section ;

event: :>send-chunks ( o -- ) .do-send-chunks ;

in net2o : send-chunks  sender-task 0= IF  do-send-chunks  EXIT  THEN
    <event o elit, :>send-chunks sender-task event> ;
................................................................................

: add-queue ( xt us -- )
    ticker 64@ +  o queue-adder >o queue-job !  queue-timestamp 64!
    is queue-xt  o queue-struct queue $+! o> ;

: eval-queue ( -- )
    queue $@len 0= ?EXIT  ticker 64@
    queue $@ bounds U+DO  I >o
	64dup queue-timestamp 64@ 64u> IF
	    addr queue-xt @ queue-job @ .execute o>
	    queue I queue-struct del$one
	    queue next$ replace-loop 0
	ELSE  o>  queue-struct  THEN
    +LOOP  64drop ;

\ poll loop

: prep-evsocks ( -- )
    epiper @    fileno POLLIN pollfds fds!+ drop 1 to pollfd# ;
................................................................................
    [: ticks 64dup [ tmp-cookie .cc-timeout ]L 64!
	o [ tmp-cookie .cc-context ]L !
	tmp-cookie cookie-size#  cookies $+! ;]
    resize-sema c-section ;

: do-?cookie ( cookie -- context true / false )
    ticker 64@ connect-timeout# 64- { 64: timeout }
    cookies $@ bounds U+DO
	64dup I .cc-timeout 64@ 64= IF \ if we have a hit, use that
	    64drop I .cc-context @
	    I .cc-secret [ tmp-cookie .cc-secret ]L KEYBYTES move
	    cookies I cookie-size# del$one drop
	    unloop  dup IF  true  THEN  EXIT
	THEN
	I .cc-timeout 64@ timeout 64u< IF
	    cookies I cookie-size# del$one
	    cookies next$
	    replace-loop
	    0 \ we re-iterate over the exactly same index
	ELSE
	    cookie-size#
	THEN
    +LOOP  64drop 0 ;

: ?cookie ( cookie -- context true / false )

Changes to tools.fs.

176
177
178
179
180
181
182


183
184
185
186
187
188
189
...
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
    is kill-task ;

[IFUNDEF] NOPE
    : NOPE ( c:sys -- )
	\G removes a control structure sys from the stack
	drop 2drop ; immediate restrict
[THEN]



require bits.fs

\ variable length integers, similar to protobuf, but MSB first

: p@+ ( addr -- u64 addr' )  >r 64#0 r@ 10 bounds
    DO  7 64lshift I c@ $7F and n>64 64or
................................................................................

: del$one ( addr1 addr2 size -- pos )
    \G @var{pos} is the deletion offset
    >r over @ cell+ - tuck r> $del ;
: next$ ( pos string -- addre addrs )
    $@ rot /string bounds ;
: del$cell ( addr stringaddr -- ) { string }
    string $@ bounds ?DO
	dup I @ = IF
	    string I cell del$one
	    unloop string next$ ?DO NOPE 0
	ELSE  cell  THEN
    +LOOP drop ;

\ unique list of cells

Sema resize-sema








>
>







 







|


|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
...
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
    is kill-task ;

[IFUNDEF] NOPE
    : NOPE ( c:sys -- )
	\G removes a control structure sys from the stack
	drop 2drop ; immediate restrict
[THEN]
: replace-loop ( end start -- )
    ]] unloop U+DO NOPE [[ ; immediate restrict

require bits.fs

\ variable length integers, similar to protobuf, but MSB first

: p@+ ( addr -- u64 addr' )  >r 64#0 r@ 10 bounds
    DO  7 64lshift I c@ $7F and n>64 64or
................................................................................

: del$one ( addr1 addr2 size -- pos )
    \G @var{pos} is the deletion offset
    >r over @ cell+ - tuck r> $del ;
: next$ ( pos string -- addre addrs )
    $@ rot /string bounds ;
: del$cell ( addr stringaddr -- ) { string }
    string $@ bounds U+DO
	dup I @ = IF
	    string I cell del$one
	    string next$ replace-loop 0
	ELSE  cell  THEN
    +LOOP drop ;

\ unique list of cells

Sema resize-sema

Changes to wiki/commands.md.

1
2
3
4
5
6
7
8
9
10
# Commands #

Version 0.9.1-20190822.

net2o separates data and commands.  Data is passed through to higher
layers, commands are interpreted when they arrive.  For connection
requests, a special bit is set, and the address then isn't used as
address, but as IV for the opportunistic encoding.

The command interpreter is a stack machine with two data types: 64


|







1
2
3
4
5
6
7
8
9
10
# Commands #

Version 0.9.1-20190829.

net2o separates data and commands.  Data is passed through to higher
layers, commands are interpreted when they arrive.  For connection
requests, a special bit is set, and the address then isn't used as
address, but as IV for the opportunistic encoding.

The command interpreter is a stack machine with two data types: 64