1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
|
2004-02-10 Roland McGrath <roland@frob.com>
* linux-src/arch/i386/lib/checksum.S: Fix comment syntax.
2003-05-07 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* linux-src/include/asm-i386/checksum.h (ip_fast_csum): Use
string literals concatenation instead of multi-line string
literal.
(csum_fold): Likewise.
(csum_tcpudp_nofold): Likewise.
(csum_ipv6_magic): Likewise.
* linux-src/include/net/sock.h (SOCK_DEBUG): Don't use ## to
concatenate string literals.
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* Makefile: Revert last change.
* glue-include/asm/spinlock.h (SPIN_LOCK_UNLOCKED): Do not use a
compound literal, which is not constant.
* Makefile: For now, filter -std=gnu99 out of CPPFLAGS.
2002-06-15 Roland McGrath <roland@frob.com>
* socket-ops.c (S_socket_getopt): Use a local int for result param of
getsockopt hook function.
2002-06-13 Roland McGrath <roland@frob.com>
* tunnel.c (trivfs_S_io_read): off_t -> loff_t
(trivfs_S_io_map): Add reply port args.
(trivfs_S_io_read): Fix argument types. Check mmap for failure.
* pfinet.h (trivfs_protid_t): Type removed (now in trivfs.h).
* linux-src/include/net/ip_fib.h: Fix obsolescent #endif syntax.
2002-06-08 Roland McGrath <roland@frob.com>
* pfinet-ops.c (S_pfinet_siocgifconf): Use vm_size_t for AMOUNT.
* io-ops.c (S_io_identity): Use ino_t for FILENO.
2002-05-31 Roland McGrath <roland@frob.com>
* Makefile (LINUXSRCS): Search for .S files as well as .c files
for arch-lib-srcs modules.
(OBJS): .S -> .o as well as .c -> .o
* sched.c (net_bh_worker): Add return stmt to quiet gcc warning.
2002-05-29 Roland McGrath <roland@frob.com>
* ethernet.c (setup_ethernet_device): u_int -> size_t
* linux-src/include/linux/net.h (struct socket) [_HURD_]:
New member `st_ino'.
* io-ops.c (S_io_stat, S_io_identity): Use that.
* socket.c (sock_alloc): Initialize it with a monotonic counter.
* stubs.c: Use __attribute__ instead of #pragma for aliases.
* linux-src/arch/alpha/lib/csum_partial_copy.c: New file,
taken verbatim from Linux 2.2.14.
* Makefile (arch-lib-srcs): Add csum_partial_copy.c.
(LINUXSRCS): Match $(arch-lib-srcs) subset in arch/$(asm_syntax)/lib.
(OBJS): Use delayed evaluation.
* glue-include/asm/uaccess.h (__get_user): New macro.
(__m): New macro.
2002-05-28 Roland McGrath <roland@frob.com>
* io-ops.c (S_io_write, S_io_read): u_int -> size_t
(S_io_restrict_auth): Likewise.
(S_io_reauthenticate): Likewise.
* socket-ops.c (S_socket_getopt, S_socket_setopt): Likewise.
(S_socket_send, S_socket_recv): Likewise.
2002-05-13 Marcus Brinkmann <marcus@gnu.org>
* main.c: Include <version.h>.
(argp_program_version): New variable.
2002-05-03 Roland McGrath <roland@frob.com>
* timer-emul.c (timer_function): Add a return stmt.
2002-01-30 Marcus Brinkmann <marcus@gnu.org>
* tunnel.c (trivfs_S_io_select): Remove IDTAG argument.
2001-10-14 Marcus Brinkmann <marcus@gnu.org>
* glue-include/linux/sched.h (process_schedule_timeout): New
function used as timer callback for schedule_timeout.
(schedule_timeout): Implement it.
Suggested by "kurian kattukaren" <kjk_bugs@rediffmail.com>.
2001-07-25 Mark Kettenis <kettenis@gnu.org>
* glue-include/linux/socket.h (SOMAXCONN): Only define if it
wasn't already.
(msg_control, msg_controllen, struct cmsghdr, cmsg_len, cmsg_type,
cmsg_level, CMSG_FIRSTHDR, CMSG_NXTHDR, CMSG_DATA, CMSG_LEN): Only
define if CMSG_DATA wasn't already defined.
2001-07-18 Marcus Brinkmann <marcus@gnu.org>
* linux-src/net/ipv4/devinit.c (configure_device): Initialize IFA
correctly. If we are setting the peer on an IFF_POINTOPOINT link,
force the netmask to 255.255.255.255.
By Neal H Walfield <neal@cs.uml.edu>.
2001-07-13 Neal H Walfield <neal@cs.uml.edu>
* options.c (parse_opt): In the cases where we hold global_lock
and fail, we must release the lock before calling FAIL.
2001-06-08 Marcus Brinkmann <marcus@gnu.org>
* timer-emul.c (add_timer): Don't add jiffies to EXPIRES, it is
the responsibility of the caller to do this.
2001-02-25 Roland McGrath <roland@frob.com>
* Makefile (asm/checksum.h): New target.
(CPPFLAGS): Don't set _HURD_SYSTYPE.
* glue-include/asm/checksum.h: File removed.
* linux-src/include/linux/net.h (struct file): Move forward
decl outside of `struct socket' type definition, for gcc-2.96 syntax.
2001-01-17 Marcus Brinkmann <marcus@gnu.org>
* iioctl-ops.c (siocsifXaddr): Remove incorrect comment
about isroot.
(S_iioctl_siocsifflags): Likewise.
(S_iioctl_siocsifmtu): And one more time.
2001-01-07 Marcus Brinkmann <marcus@gnu.org>
* pfinet-ops.c: New file to implement hurd/pfinet.defs.
* iioctl-ops.c: New file to implement iioctl.defs.
* linux-src/net/core/dev.c: If _HURD_, don't define netdev_chain as
static.
* glue-include/linux/if.h: New file, to avoid conflict between
<net/if.h> (imported by iioctl.defs) and linux version of it.
* main.c (pfinet_demuxer): Prototype pfinet_server and
iioctl_server, use them.
* pfinet.h: New global variables pfinetctl, pfinet_owner
and pfinet_group.
* main.c (main): New variable ST. Request pfinetctl from
trivfs_startup. Use it to determine the owner and group
of the underlying node.
* io-ops.c (S_io_reauthenticate): New index variable j. Set
newuser->isroot also for owners of the underlying file and
group owners.
(S_io_restrict_auth): Likewise.
* socket-ops.c: Include <sys/stat.h> and <hurd/fshelp.h>.
(S_socket_create): New variable isroot. If master->isroot is
not set, use fshelp_isowner to check ownership and if to set it.
Pass isroot to make_sock_user instead master->isroot.
* linux-src/net/ipv4/devinet.c (configure_device): Accept new parameter
BROADCAST, set ifa_broadcast if this is not INADDR_NONE.
(inquire_device): Accept new parameter broadcast, set it.
* main.c: Add new paramter to prototype of configure_device.
(main): Add new parameter to call to configure_device.
* options.c: Add new parameters to prototypes of configure_device
and inquire_device.
(trivfs_append_args): Define new variable BROAD, use its address
as the new parameter for inquire_device.
* linux-src/net/core/dev.c (dev_ifconf): Don't declare static
if _HURD_.
* linux-src/net/ipv4/devinet.c (inet_gifconf): If _HURD_, set
sin_len member.
* Makefile (MIGSRCS): Add pfinetServer.c and iioctlServer.c.
(SRCS): Add pfinet-ops.c, iioctl-ops.c.
2001-01-03 Marcus Brinkmann <marcus@gnu.org>
* options.c (parse_opt): Set err to 0 if it was ESRCH.
(or zero anyway).
2000-12-03 Marcus Brinkmann <marcus@gnu.org>
* main.c (pfinet_demuxer): New variable PI.
Store port info in PI, and dereference it if found.
2000-11-02 Marcus Brinkmann <marcus@gnu.org>
* tunnel.c (trivfs_S_io_get_owner): Add return type to silence
compiler warning.
2000-10-06 Marcus Brinkmann <marcus@gnu.org>
* Makefile (SRCS): Add tunnel.c
* tunnel.c: New file.
* linux-src/net/ipv4/devinet.c (configure_device): New argument PEER.
Implement support for setting the destination address for
point-to-point interfaces.
(inquire_device): New argument PEER.
Implement support to get the destination address.
* main.c: Include fcntl.h.
Update prototype of configure_device.
Set trivfs_support_read and trivfs_support_write to 1, as we support
those in some cases now. For the same reason, set trivfs_allow_open
to O_READ | O_WRITE.
(pfinet_demuxer): If the port is not in the socketport_class,
don't try io_server (so requests for trivfs are not catched too early).
(find_device): Use setup_tunnel_device for tun* interfaces.
(main): Add peer argument to configure_device call for the lo interface.
* options.c: Update prototypes for configure_device, inquire_device.
(options): Add --peer option.
(stuct parse_interface): Add peer member.
(parse_hook_add_interface): Initialize peer.
(parse_opt): Add a case for --peer.
Add peer argument to configure_device call.
(add_dev_opts): Add peer variable, add it to inquire_device call arguments.
Check for peer argument and add it to command line if it is there.
* pfinet.h: Add prototype for setup_tunnel_device.
2000-10-04 Marcus Brinkmann <marcus@gnu.org>
* Makefile (SRCS): Add dummy.c
* dummy.c: New file.
* ethernet.c: Moved ETHER_PORT, READPT, READPTNAME to ...
(struct ether_device): ... here. New struct. ETHER_DEV is now a
pointer to a struct ether_device.
(ethernet_demuxer): New variables edev, dev. Iterate over linked
list ETHER_DEV to find correct readptname. Use dev instead
ETHER_DEV for socket buffer manipulation.
(ethernet_open): New variable edev. Use dev->priv to find correct
edev. Use members of edev instead global variables.
(ethernet_xmit): New variable edev. Use dev->priv to find correct
edev.Use member of edev instead global variable ETHER_PORT.
(setup_ethernet_device): New output argument DEVICE. New
variables edev and dev. Allocate memory for edev, add it to the
head of ETHER_DEV. Use dev instead ETHER_DEV. Use members of edev
instead global variables.
* main.c: ALREADY_OPEN removed.
(find_device): Fix comment. Redone to work with multiple devices
by iterating over DEV_BASE.
(enumerate_device): Likewise.
* pfinet.h: Add new argument to prototype of
setup_ethernet_device. Add prototype for setup_dummy_device.
Remove prototype for ETHER_DEV. Add prototype for DEV_BASE.
2000-09-30 Marcus Brinkmann <marcus@gnu.org>
* main.c: Prototype configure_device to supress compiler warning.
2000-07-26 Mark Kettenis <kettenis@gnu.org>
* glue-include/linux/poll.h (POLLERR): Define as SELECT_READ |
SELECT_WRITE.
(POLLHUP): Define as SELECT_READ.
* linux-src/net/core/dev.c (net_bh) [_HURD_]: Leave out the code
that gives other bottom halves a chance to run; the network bottom
half is the only one present in pfinet.
2000-04-03 Roland McGrath <roland@baalperazim.frob.com>
* glue-include/asm/byteorder.h: Include <hurd.h> early on,
to get the things it #include's that need __BYTE_ORDER to work.
2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
* main.c (arrange_shutdown_notification): Don't use MAKE_SEND in
Hurd RPC.
2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
* io-ops.c (S_io_reauthenticate): Use ports_get_send_right.
2000-02-13 Roland McGrath <roland@baalperazim.frob.com>
* main.c (main): Call configure_device on loopback_dev.
* linux-src/net/ipv4/devinet.c (configure_device): Call
dev_change_flags with IFF_UP flag.
2000-02-06 Roland McGrath <roland@baalperazim.frob.com>
* socket.c (make_sock_user): Take new argument CONSUME.
* pfinet.h: Update decl.
* io-ops.c (S_io_reauthenticate, S_io_restrict_auth, S_io_duplicate):
Callers changed, these all pass false.
* socket-ops.c (S_socket_create, S_socket_accept): Callers changed,
these ones pass true.
* glue-include/linux/socket.h (memcpy_fromiovec): Update *IOV to
consume bytes copied from the available buffer.
(memcpy_tokerneliovec): Likewise.
(memcpy_toiovec): Just call memcpy_tokerneliovec.
2000-02-05 Roland McGrath <roland@baalperazim.frob.com>
* linux-src (many files): Merge Linux 2.2.13 and 2.2.14 code.
* glue-include/linux/mm.h (PAGE_SIZE, num_physpages): New macros.
(__get_free_pages): New inline function.
2000-02-04 Roland McGrath <roland@baalperazim.frob.com>
* options.c (parse_opt): New code to set the default gateway using
fib_new_table and the tb_insert/tb_delete callbacks.
* options.c (parse_opt): Take global_lock while applying changes.
* main.c (main): Unlock global_lock before calling argp_parse.
* options.c (struct parse_interface): Use uint32_t for the IP
address members.
* linux-src/net/ipv4/devinet.c [_HURD_] (inquire_device): New function.
* options.c: Declare it.
(trivfs_append_args): Use inquire_device for --address and --netmask.
(ADD_ADDR_OPT): #undef it after uses.
2000-02-03 Roland McGrath <roland@baalperazim.frob.com>
Complete overhaul of pfinet based on the IPv4 networking code from the
Linux 2.2.12 kernel sources. This page describes a single unified set
of interdependent changes, but there are so many changes that I have
broken up the log entry into paragraphs based on rough topical
divisions of the work involved.
Subset of verbatim Linux 2.2.12 sources imported on a vendor branch.
* linux-src: New directory, see README for details.
* README: New file, describes linux-src layout and procedures for
tracking Linux source updates.
Light modifications to linux-src files to avoid really bending over
backwards with the glue macros. All modifications to files in
linux-src are conditionalized by #ifdef _HURD_.
* linux-src/include/linux/net.h [_HURD_] (struct socket): New members
refcnt and identity; elide members fasync_list, file.
* linux-src/include/linux/rtnetlink.h [! CONFIG_RTNETLINK]
(rtnl_shlock, rtnl_shunlock) [! _HURD_]: Conditionalize contents on
this, making these no-ops #ifdef _HURD_.
* linux-src/net/core/dev.c [_HURD_] (dev_ioctl): Don't define the
function, instead #define it to 0.
* linux-src/net/ipv4/af_inet.c [_HURD_] (inet_ioctl): Likewise.
* linux-src/net/ipv4/arp.c [_HURD_] (arp_ioctl): Likewise.
* linux-src/net/ipv4/udp.c [_HURD_] (udp_ioctl): Likewise.
* linux-src/net/ipv4/tcp.c [_HURD_] (tcp_ioctl): Likewise.
[_HURD_] (tcp_tiocinq): New function, TIOCINQ code from tcp_ioctl.
* linux-src/net/ipv4/devinet.c [_HURD_] (devinet_ioctl): Don't define
the function, instead #define it to 0.
[_HURD_] (configure_device): New function, cobbled from SIOCSIFADDR
and SIOCSIFNETMASK code from devinet_ioctl.
* glue-include/asm, glue-include/linux: New directories.
These contain glue kludge headers that replace all of the
Linux <asm/*.h> headers except checksum.h, and several of
the Linux <linux/*.h> headers (the remainder come from
linux-src/include/linux and are mostly unmodified).
* glue-include/asm/atomic.h: New file, glue replacement header.
* glue-include/asm/bitops.h: New file, glue replacement header.
* glue-include/asm/byteorder.h: New file, glue replacement header.
* glue-include/asm/checksum.h: New file, glue replacement header.
* glue-include/asm/errno.h: New file, glue replacement header.
* glue-include/asm/hardirq.h: New file, glue replacement header.
* glue-include/asm/init.h: New file, glue replacement header.
* glue-include/asm/segment.h: New file, glue replacement header.
* glue-include/asm/spinlock.h: New file, glue replacement header.
* glue-include/asm/system.h: New file, glue replacement header.
* glue-include/asm/types.h: New file, glue replacement header.
* glue-include/asm/uaccess.h: New file, glue replacement header.
* glue-include/linux/autoconf.h: New file, glue replacement header.
* glue-include/linux/binfmts.h: New file, glue replacement header.
* glue-include/linux/config.h: New file, glue replacement header.
* glue-include/linux/errno.h: New file, glue replacement header.
* glue-include/linux/fcntl.h: New file, glue replacement header.
* glue-include/linux/fs.h: New file, glue replacement header.
* glue-include/linux/in.h: New file, glue replacement header.
* glue-include/linux/in6.h: New file, glue replacement header.
* glue-include/linux/interrupt.h: New file, glue replacement header.
* glue-include/linux/ioctl.h: New file, glue replacement header.
* glue-include/linux/ipv6.h: New file, glue replacement header.
* glue-include/linux/kernel.h: New file, glue replacement header.
* glue-include/linux/limits.h: New file, glue replacement header.
* glue-include/linux/major.h: New file, glue replacement header.
* glue-include/linux/malloc.h: New file, glue replacement header.
* glue-include/linux/mm.h: New file, glue replacement header.
* glue-include/linux/param.h: New file, glue replacement header.
* glue-include/linux/personality.h: New file, glue replacement header.
* glue-include/linux/poll.h: New file, glue replacement header.
* glue-include/linux/proc_fs.h: New file, glue replacement header.
* glue-include/linux/sched.h: New file, glue replacement header.
* glue-include/linux/slab.h: New file, glue replacement header.
* glue-include/linux/socket.h: New file, glue replacement header.
* glue-include/linux/sockios.h: New file, glue replacement header.
* glue-include/linux/stat.h: New file, glue replacement header.
* glue-include/linux/string.h: New file, glue replacement header.
* glue-include/linux/termios.h: New file, glue replacement header.
* glue-include/linux/time.h: New file, glue replacement header.
* glue-include/linux/timer.h: New file, glue replacement header.
* glue-include/linux/timex.h: New file, glue replacement header.
* glue-include/linux/types.h: New file, glue replacement header.
* glue-include/linux/un.h: New file, glue replacement header.
* glue-include/linux/version.h: New file, glue replacement header.
* glue-include/linux/wait.h: New file, glue replacement header.
* kmem_cache.c: New file. Glue code replaces Linux kmem_cache_t et al.
* stubs.c: New file. No-op functions and stub variables for a few
things the Linux networking code needs to link.
* Makefile (core-srcs, arch-lib-srcs, ethernet-srcs, ipv4-srcs): New
variables, listing sources used from linux-src subdirectories.
(LINUXSRCS): Define using those.
(SRCS): Remove devices.c; add kmem_cache.c, stubs.c.
(UNUSEDSRC): Variable removed.
(vpath %.c): Remove vpath for $(srcdir)/linux-inet directory.
Add vpaths for $(srcdir)/linux-src subdirectories.
(CPPFLAGS): Add -D_HURD_SYSTYPE defining it to $(asm_syntax) as a
double-quoted string. Add -I's for glue-include and linux-src/include.
* pfinet.h: Include <sys/socket.h>, and not <linux/netdevice.h>.
(master_device): Remove decl.
(global_lock, packet_queue_lock): Remove common defns.
(global_lock, net_bh_lock): Declare them as externs.
(struct sockaddr): Remove len member, make address member just a
struct sockaddr rather than a 0-length array.
(setup_loopback_device, become_task_protid, become_task): Remove decls.
(ethernet_initialize): Declare it.
(input_work_thread): Remove decl.
(net_bh_thread): Declare it.
(tcp_readable): Remove decl.
(tcp_tiocinq): Declare it.
* config.h: Rewritten based on Linux 2.2.12 set of CONFIG_* options.
(CONFIG_NET, CONFIG_INET, CONFIG_SKB_LARGE): These are the only
Linux config options we set.
(CONFIG_IP_NOSIOCRT): New macro (not a proper config option, but
used conveniently in the code).
* ethernet.c (ethernet_set_multi): Take only one parameter.
Remove assert, since we always get passed IGMP_ALL_HOSTS.
(ethernet_thread): Make static.
(ethernet_demuxer): Use __mutex_lock in place of mutex_lock, so as to
get cthreads instead of linux/spinlock.h glue macros. Lock
net_bh_lock instead of global_lock. Set SKB->protocol with
eth_type_trans before calling netif_rx.
(ethernet_initialize): New function, one-time initialization broken
out of ethernet_open.
(ethernet_open): Ports setup moved to ethernet_initialize.
Don't use `errno' to avoid glue conflicts.
Use get_privileged_ports here to get the master device port, and
deallocate it after calling device_open.
(ethernet_xmit): Use assert_perror. Only one arg to dev_kfree_skb now.
(setup_ethernet_device): Change initializations for structure changes.
Call dev_init_buffers and register_netdevice on the device.
* timer-emul.c (all functions): Use __mutex_lock instead of mutex_lock.
Adjust for renaming of `prevp' member to `prev' in struct timer_list.
(mod_timer): New function.
* socket.c (proto_ops): Variable removed.
(net_families): New variable replaces it.
(sock_register): Rewritten for new calling convention, set
net_families rather than proto_ops.
(make_sock_user, clean_socketport, sock_alloc, sock_release):
Functions moved here from misc.c.
* sched.c (packet_queue_lock): Variable removed.
(net_bh_lock, net_bh_wakeup): New variables.
(current): Variable removed (now a macro in the glue headers).
(interruptible_sleep_on, wake_up_interruptible): Functions removed.
They are replaced by inlines in the glue headers.
(become_task, become_task_protid): Functions removed; they are
replaced by macros in glue-include/linux/sched.h.
(net_bh_worker): New function.
* loopback.c: Completely rewritten, mostly copied from linux-2.2.12's
drivers/net/loopback.c source file.
* io-ops.c (all functions): Use __mutex_lock in place of mutex_lock.
(S_io_write): Call ops->sendmsg instead of ops->write,
which no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in
msg_flags.
(S_io_read): Call ops->recvmsg instead of ops->read,
which no longer exists If O_NONBLOCK is set, pass MSG_DONTWAIT.
(S_io_readable): Use USER->sock->data in place of USER->sock->sk.
For SOCK_STREAM and SOCK_SEQPACKET types, call tcp_tiocinq.
(S_io_set_all_openmodes, S_io_get_openmodes, S_io_set_some_openmodes,
S_io_clear_some_openmodes): Member USER->sock->userflags is now
renamed USER->sock->flags.
(S_io_select): Completely rewritten using ops->poll.
(select_wait): Function removed.
(S_io_stat): Set st_mode to reflect S_IFSOCK.
* socket-ops.c (all functions): Use __mutex_lock instead of mutex_lock.
(S_socket_create): Don't set SOCK->ops or call SOCK->ops->create.
Instead, call net_families[PF_INET]->create.
(S_socket_listen): Remove extra checks; just call ops->listen.
(S_socket_accept): Remove extra checks before ops->accept call.
Avoid use of goto.
(S_socket_connect): Remove extra checks; just call ops->connect.
(S_socket_bind): Adjust for struct sock_addr changes.
(S_socket_create_address): Likewise.
(S_socket_whatis_address): Likewise.
(S_socket_connect2): Don't diddle data structures after
ops->socketpair call.
(S_socket_getopt): Use sock_getsockopt if LEVEL is SOL_SOCKET.
Accept any data size, not just sizeof (int).
(S_socket_setopt): Use sock_setsockopt if LEVEL is SOL_SOCKET.
(S_socket_send): Always use ops->sendmsg instead of ops->send or
ops->sendto, which no longer exist. If O_NONBLOCK is set, set
MSG_DONTWAIT in msg_flags.
(S_socket_recv): Always use ops->recvmsg instead of ops->recv, which
no longer exists. If O_NONBLOCK is set, set MSG_DONTWAIT in flags.
Check for error from S_socket_create_address.
* main.c (find_device): Don't try to set ether_dev.pa_mask (it's gone).
(main): Don't call init_devices. Call ethernet_initialize.
Start net_bh_worker instead of input_work_thread. Don't call
setup_loopback_device. Instead, take global_lock, do prepare_current,
and then call sk_init, skb_init, inet_proto_init, and net_dev_init.
Keep global_lock held while calling argp_parse.
Call arrange_shutdown_notification only after all that.
Fix error call for "contacting parent" to pass ERR instead of errno.
* options.c (ADDR): #undef before defining macro.
(parse_opt): #if 0 out EDESTADDRREQ check (I don't understand it).
To apply settings, call configure_devices.
(ADD_ADDR_OPT): #if 0 --address and --netmask options. Needs fixed.
* misc.c (make_sock_user, clean_socketport, sock_alloc, sock_release):
Functions moved to socket.c.
(sock_release_peer): Function removed.
(make_sockaddr_port): Use struct sockaddr_storage to size buffer.
Fix size calculation for new struct sock_addr layout.
Initialize sa_family and sa_len of new struct sock_addr.
Remove the old Linux (2.0.??) network stack and the glue code for it.
* linux-inet, asm, linux: Directories and all files removed.
Some of the new files in glue-include came from the old glue headers
in the asm and linux directories, but most were substantially modified.
* devices.c: File removed. The equivalent glue is now elsewhere.
2000-01-27 Roland McGrath <roland@baalperazim.frob.com>
* mapped-time.h: Include <maptime.h>.
(fill_timeval): Function removed.
(fetch_jiffies): Use maptime_read.
* timer-emul.c (init_time): Use maptime_map and maptime_read.
* linux/sched.h (fetch_xtime): Use maptime_read.
* linux/time.h (do_gettimeofday): Likewise.
1999-10-22 Roland McGrath <roland@baalperazim.frob.com>
* socket-ops.c (S_socket_getopt): Implement the call.
All options supported by the code in linux-inet are in
fact of type int, so we can support just that one size.
(This is still a bogus untyped interface!)
1999-09-13 Roland McGrath <roland@baalperazim.frob.com>
* io-ops.c: Reverted changes related to io_map_segment.
1999-09-09 Thomas Bushnell, BSG <tb@mit.edu>
* ethernet.c (ethernet_open): Don't start the input work thread
here.
(more_packets, mark_bh, input_work_thread): Move
these to ...
* devices.c: ... here.
Also include "pfinet.h" instead of list of <> includes.
* main.c (main): Launch input work thread here.
* pfinet.h (input_work_thread): Declare function.
* devices.c (add_device): Remove unused function.
* pfinet.h (incoming_net_packet): Remove unused declaration.
1999-09-07 Thomas Bushnell, BSG <tb@mit.edu>
* io-ops.c (S_io_map_segment): New function.
1999-07-11 Roland McGrath <roland@baalperazim.frob.com>
* pfinet.h: Add #include <sys/mman.h> for munmap decl.
1999-07-10 Roland McGrath <roland@baalperazim.frob.com>
* io-ops.c: Add #include <sys/mman.h> for munmap decl.
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* io-ops.c (S_io_read): Use mmap instead of vm_allocate.
* socket-ops.c (S_socket_whatis_address): Likewise.
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* io-ops.c (S_io_read): Use munmap instead of vm_deallocate.
(S_io_reauthenticate): Likewise.
1999-06-13 Roland McGrath <roland@baalperazim.frob.com>
* main.c (trivfs_goaway): Exit if there are no socket ports.
Sun Mar 14 18:33:54 1999 Thomas Bushnell, BSG <tb@mit.edu>
* ethernet.c (ether_filter): Use a shorter filter program.
(ether_filter_len): Compute more safely.
1999-02-28 Roland McGrath <roland@baalperazim.frob.com>
* main.c (S_startup_dosync): Use ports_class_iterate.
(sigterm_handler): Likewise.
Tue Feb 16 05:50:27 1999 Thomas Bushnell, BSG <tb@mit.edu>
* io-ops.c (S_io_revoke): New function. Don't attempt to
implement. (Other systems don't even permit non-file revokes.)
1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
* ethernet.c (ethernet_open): Check error return from device_open and
device_set_filter.
(setup_ethernet_device): Check error return from device_get_status.
* ethernet.c (ethername): Remove static variable.
(setup_ethernet_device): Don't set it.
(ethernet_open): Don't use it; use DEV->name instead.
1998-09-04 Roland McGrath <roland@baalperazim.frob.com>
* loopback.c (loopback_type_trans): Return u_int16_t.
Fri Apr 24 15:43:07 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
* io-ops.c (S_io_select): When returning EINTR after cancellation,
deallocate REPLY because the stub won't do it for us. Reported by
UCHIYAMA Yasushi (uch@nop.or.jp).
1997-08-25 Miles Bader <miles@gnu.ai.mit.edu>
* io-ops.c (S_io_write): Negate linux error codes before returning.
1997-08-19 Miles Bader <miles@gnu.ai.mit.edu>
* linux-inet/tcp.c (tcp_conn_request): SK->err holds errno values,
not linux negative errno return vals.
Wed Aug 20 14:05:52 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* main.c (main): New args for
ports_manage_port_operations_multithread.
Fri Aug 8 11:47:08 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* linux-inet/tcp.c (tcp_check): Move to end of file so it isn't
inlined and can be profiled easily.
* linux-inet/udp.c (udp_check): Likewise.
Mon Jul 21 14:58:13 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* Makefile (HURDLIBS): Add iohelp.
* main.c (trivfs_goaway): If FSYS_GOAWAY_FORCE is set, then go
away, otherwise, continue to return EBUSY.
Fri Apr 25 10:46:49 1997 Miles Bader <miles@gnu.ai.mit.edu>
* options.c (trivfs_append_args): Renamed from trivfs_get_options.
Don't initialize ARGZ/ARGZ_LEN.
Tue Feb 4 16:53:19 1997 Miles Bader <miles@gnu.ai.mit.edu>
* socket-ops.c (S_socket_send): Don't deref ADDR if it's 0.
(S_socket_bind): Return EADDRNOTAVAIL if ADDR is 0.
Fri Oct 25 20:02:17 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* loopback.c (loopback_type_trans): New function.
(setup_loopback_device): Bother to mark interface up
too. Set LOOPBACK_DEV.type_trans.
Thu Oct 24 22:38:55 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* main.c (main): Call setup_loopback_device before parsing args
(and thus before the ethernet device shows up).
* loopback.c: New file.
* Makefile (SRCS): Add loopback.c.
* pfinet.h (loopback_dev): New variable.
* pfinet.h (ip_rt_del): New prototype.
Thu Sep 12 16:47:24 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* Makefile (HURDLIBS): New variable.
(pfinet): Omit special dependency.
* Makefile (vpath %.c): Put this after Makeconf inclusion so it
catches setting of $(srcdir) there.
Fri Sep 6 16:46:43 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* socket-ops.c (S_socket_recv): Bother to pass
USER->sock->userflags through to the recvfrom routine.
Sat Jul 20 15:48:29 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* Makefile (lndist-asm-files): Look for files in $(srcdir).
(lndist-linux-files): Likewise.
(lndist-linux-inet-files): Likewise.
Fri Jul 19 09:39:08 1996 Miles Bader <miles@gnu.ai.mit.edu>
* pfinet.h (make_sock_user): Declaration updated.
Thu Jul 18 23:19:07 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* misc.c (make_sock_user): New parm `noinstall'; if it's set use
non-installing version of ports_create_port. All callers
changed.
* io-ops.c (S_io_reauthenticate): Install NEWUSER port right into
portset after it's fully initialized.
Sat Jul 13 20:18:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* io-ops.c (S_io_reauthenticate): Repeat auth_server_authenticate
for as long as we get EINTR. Deal with other errors without
crashing.
Sun Jul 7 21:29:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* io-ops.c (S_io_reauthenticate): Don't use unsafe MOVE_SEND in
call to auth_server_authenticate.
Fri Jul 5 19:42:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* ethernet.c (setup_ethernet_device): Linux's device `mtu' member
does not include the hardware header size; subtract that off the
value the kernel specifies as maximum packet size in setting
ETHER_DEV.mtu.
Thu Jun 27 10:14:10 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* Makefile (lndist): Add lndist-asm-files.
(lndist-asm-files): New rule.
(ASMHEADERS): New variable.
($(top_srcdir)/hurd-snap/$(dir)/asm): New rule.
Tue Jun 25 14:00:07 1996 Miles Bader <miles@gnu.ai.mit.edu>
* linux-inet/route.c (ip_rt_del): New function.
* linux-inet/route.h (ip_rt_del): New declaration.
* options.c (trivfs_get_options): Initialize *ARGZ & *ARGZ_LEN.
(parse_opt): Fix test for address-less netmask.
Fix byte order when using IN_* macros.
Base default netmask on dev->pa_addr, not in->address.
Don't clear dev->pa_addr.
Delete old routing entries before adding new ones.
(trivfs_get_options): Add & use ADD_ADDR_OPT macro.
(parse_hook_add_interface): Initialize H->curint->device.
Mon Jun 24 16:48:51 1996 Miles Bader <miles@gnu.ai.mit.edu>
* main.c (sigterm_handler): Renamed from sighup_handle. Make void.
Deal with SIGTERM instead of SIGHUP.
(main): Use SIGTERM & sigterm_handler instead of SIGHUP &c.
* options.c (parse_hook_add_interface): Realloc the correct number
of bytes.
Mon Jun 24 16:33:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* main.c (sighup_handle): New function.
(arrange_shutdown_notification): Register SIGHUP handler.
Mon Jun 24 12:44:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
* options.c (parse_opt): Don't fail if there were no options.
(RETURN): New macro.
(PERR, FAIL): Use RETURN instead of return to free memory if nec.
Fri Jun 21 16:42:29 1996 Miles Bader <miles@gnu.ai.mit.edu>
* main.c (main): Pass ARGC & ARGV to argp_parse in the correct order.
Thu Jun 20 22:39:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
* options.c: Renamed from opts.c.
(parse_opt): Fix lots of typos.
(trivfs_get_options): New function.
(get_opts, trivfs_S_fsys_get_options, trivfs_S_file_get_fs_options):
Functions removed.
<netinet/in.h>, <arpa/inet.h>: New includes.
* Makefile (pfinet): Depend on ../libfshelp/libfshelp.a &
../libshouldbeinlibc/libshouldbeinlibc.a.
(SRCS): Add options.c.
Thu Jun 20 19:47:40 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* main.c: Include <hurd/startup.h> and <string.h>.
(shutdown_notify_class): Declare variable.
(S_startup_dosync): Give enough args to ports_lookup_port.
(S_startup_dosync/do1): Return a value.
(arrange_shutdown_notification): Correct spelling of
ports_create_port. Initialize shutdown_notify_class.
(find_device): Construct arg to strcmp correctly. Correct
spelling of ENXIO.
Wed Jun 19 18:46:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
* opts.c (trivfs_S_fsys_set_options): Function removed.
(trivfs_runtime_argp): New variable.
Sun Jun 16 22:45:54 1996 Miles Bader <miles@gnu.ai.mit.edu>
* opts.c (parse_opt): Rename ERR macro to FAIL. Use argp_failure.
Sat Jun 15 19:47:06 1996 Miles Bader <miles@gnu.ai.mit.edu>
* main.c (main): Rearrange for arg parsing some more.
(enumerate_devices): New function.
(pfinet_argp): New declaration.
(already_open): Make global.
<error.h>, <argp.h>: New includes.
Fri Jun 14 15:41:57 1996 Miles Bader <miles@gnu.ai.mit.edu>
* main.c (find_device): New function.
(main): Rearrange to use new argument parsing.
Thu Jun 13 16:55:42 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* Makefile (MIGSRCS): Add startup_notifyServer.c.
* main.c (S_startup_dosync, arrange_shutdown_notification): New
functions.
(pfinet_demuxer): Call startup_notify_server.
(main): Call arrange_shutdown_notification).
Tue May 14 14:12:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* main.c (main): Initialize fsys_identity.
* misc.c (sock_alloc): Initialize SOCK->identity.
(sock_release): Destroy SOCK->identity if it's been set.
* io-ops.c (S_io_identity): New function.
* pfinet.h (fsys_identity): New variable.
* linux/net.h (struct socket) [_HURD_]: New member `identity'.
* ethernet.c (ethernet_open): Delete superfluous arg to
assert_perror.
Fri May 10 16:56:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
* misc.c (make_sock_user): Pass correct args to ports_create_port.
* ethernet.c (ethernet_open): Pass in ERRNO to assert_perror.
Thu May 9 20:27:28 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* io-ops.c (S_io_reauthenticate): Use new auth_server_authenticate
interface.
* io-ops.c (S_io_select): Drop ID_TAG arg.
* ethernet.c (ethernet_thread): Return any_t.
(input_work_thread): Likewise.
* ethernet.c (ethernet_open): Use new ports_create_port call.
* socket-ops.c (S_socket_create_address): Likewise.
* misc.c (make_sock_user): Likewise.
(make_sockaddr_port): Likewise.
Wed Apr 24 18:35:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* main.c (main): Take third cmdline arg and add gateway route.
Mon Apr 15 12:53:24 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* Makefile (CPPFLAGS): Look for config.h in $(srcdir).
(io-MIGSFLAGS, socket-MIGSFLAGS): Look for mutations.h in
$(srcdir).
(vpath %.c): Find linux-inet dir under #(srcdir)>
(SRCS): Add time.c.
(LCLHDRS, LINUXHDRS, FROBBEDLINUXHEADERS): New variables.
(lndist, lndist-linux-inet-files, lndist-linux-files,
$(top-srcdir)/hurd-snap/$(dir)/linux-inet,
$(top-srcdir)/hurd-snap/$(dir)/linux): New targets.
Mon Feb 26 13:36:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* misc.c (end_using_sockaddr_port): Only call ports_port_deref if
arg is valid.
(end_using_socket_port): Likewise.
* linux/interrupt.h (mark_bh): Remove stubby inline, replace
with real declaration.
* pfinet.h (packet_queue_lock): New variable.
* sched.c (packet_queue_lock): Provide initialization.
* ethernet.c (ethernet_open): Put READPT in etherport_bucket
instead of pfinet_bucket. Fork ethernet_thread and
input_work_thread before returning.
(more_packets, etherport_bucket): New variables.
(input_work_thread, ethernet_thread, mark_bh): New functions.
* main.c (pfinet_demuxer): Don't use call ethernet_demuxer.
Thu Feb 22 17:54:25 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* ethernet.c (ethernet_open): Request maximum queue limit
on our read port.
Thu Feb 8 18:32:33 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* socket-ops.c (S_socket_connect): Don't return EINVAL for
SS_CONNECTED state.
Mon Jan 22 13:47:47 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* timer-emul.c (init_time): There are *still* a million microseconds to
the second.
Thu Jan 18 12:37:57 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* mapped-time.h (fetch_jiffies): Uh, duh, there are a million
microseconds in a second, not just a thousand.
Tue Dec 26 19:29:16 1995 Miles Bader <miles@gnu.ai.mit.edu>
* io-ops.c (S_io_select): Add REPLY parameter, and request
notification if it dies.
* mutations.h (IO_SELECT_REPLY_PORT): New def.
Thu Dec 14 18:50:07 1995 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
* ethernet.c (ethernet_open): Don't set filter priority high.
Mon Dec 11 13:23:49 1995 Miles Bader <miles@gnu.ai.mit.edu>
* socket-ops.c (S_socket_recv): Whoops, incorrectly negated this
particular return value. Rename the variable `recvd' to make
things more clear.
(S_socket_send): Ditto (`sent'), plus correctly check the return
value when deciding whether to deallocate ADDR's send right.
Thu Dec 7 18:24:37 1995 Miles Bader <miles@gnu.ai.mit.edu>
* socket-ops.c (S_socket_recv, S_socket_bind, S_socket_send):
Negate error return values from linux code.
(S_socket_setopt): Implement.
Wed Aug 23 14:20:48 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
* Makefile (pfinet): Put all dependencies here.
(HURDLIBS): Removed.
|