- Jul 29, 2016
-
-
Adam Wujek authored
snmp_get_next works only when requesting oid is valid. Otherwise it fails to find next entry. Due to the above the snmpwalk works only when the walk is started from the existing oid. Since snmp walk scans only oids in the current branch, there was a need to create a special oid .1.3. $ snmpwalk -On -c public -v 1 192.168.1.20 1.3 .1.3.6.1.2.1.1.5.0 = STRING: "wrc" .1.3.6.1.2.1.25.1.1.0 = Timeticks: (792773) 2:12:07.73 .1.3.6.1.2.1.25.1.2.0 = Hex-STRING: 07 B2 00 01 05 00 00 00 .1.3.6.1.4.1.96.100.7.5.1.15.1 = Counter32: 445 .1.3.6.1.4.1.96.100.7.5.1.16.1 = INTEGER: 10 .1.3.6.1.4.1.96.100.7.5.1.17.1 = INTEGER: 174810 .1.3.6.1.4.1.96.100.7.5.1.18.1 = INTEGER: 191115 .1.3.6.1.4.1.96.100.7.5.1.19.1 = INTEGER: 157655 Timeout: No Response from 192.168.1.20 NOTE: Timeout message appears becasue there is no responce from node when wrong packet is sent. Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
Move SNMP just after syslog. Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
--add defines of ASN types --add 5 object from wrsPtpTable Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
The "community" string is public. We have tree items only: the host name, the date and uptime. The code is designed to make it simple any addition. But we only have snmpget support, not snmpwak (i.e. "get next" query). This is run on an host build (CONFIG_HOST_PROCESS) where the time and date are not related to the real world: # snmpget -v 1 -c public 192.168.16.1 .1.3.6.1.2.1.1.5.0 SNMPv2-MIB::sysName.0 = STRING: wrc # snmpget -v 1 -c public 192.168.16.1 .1.3.6.1.2.1.25.1.2.0 HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 1970-0-1,19:52:34.0 # snmpget -v 1 -c public 192.168.16.1 .1.3.6.1.2.1.25.1.2.0 HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 1970-0-1,19:53:2.0 # snmpget -v 1 -c public 192.168.16.1 .1.3.6.1.2.1.25.1.1.0 [...] hrSystemUptime.0 = Timeticks: (94193300) 10 days, 21:38:53.00 Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
/var/lib/mibs/ietf/SNMPv2-TC DateAndTime ::= TEXTUAL-CONVENTION DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" STATUS current DESCRIPTION "A date-time specification. field octets contents range ----- ------ -------- ----- 1 1-2 year* 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..60 (use 60 for leap-second) 7 8 deci-seconds 0..9 8 9 direction from UTC '+' / '-' 9 10 hours from UTC* 0..13 10 11 minutes from UTC 0..59 * Notes: - the value of year is in network-byte order - daylight saving time in New Zealand is +13 For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as: 1992-5-26,13:30:15.0,-4:0 Note that if only local time is known, then timezone information (fields 8-10) is not present." SYNTAX OCTET STRING (SIZE (8 | 11)) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jun 10, 2016
-
-
Adam Wujek authored
Additionally use type checking Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- May 20, 2016
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
(one is just a comment update: most of that stanza was not true any more) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
A WR socket registers using a specific mac address and the receiving code uses the mac address to match the frame. This is going to be a problem with the new PTP code, as pdelay frames use a different mcast mac address. Moreover, if we go to UDP, stuff gets worse. Packet filter rules are already in place for the new mac addresses, and we now need to relax the checking in the software stack. As a side effect, we avoid a number of broadcast frames, because wrpc-sw now replies to unicast ARP requests. What happened before: 16:27:07 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200 16:27:08 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200 16:27:09 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200 16:27:12 00:0b:ab:7c:8e:4a > ff:ff:ff:ff:ff:ff who-has ...107 tell ...200 16:27:12 00:26:7b:00:04:18 > 00:0b:ab:7c:8e:4a ...107 is-at 00:26:7b:00:04:18 what happens now: 16:42:27 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200 16:42:27 00:26:7b:00:04:18 > 00:0b:ab:7c:8e:4a ...107 is-at 00:26:7b:00:04:18 Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is incompatible with the previous implementation - sequence number is 32 bits - frames are 1,2,3 not 0,1,2 (so to be *more* incompatible) - no fake latency values are printed if frames are lost - the message is one line instead of two, and cleaner too - the sender reminds it's sending every 10s. The receiver's messages now include the sequence number, so we can match different receivers on a network. Also, The sender's message report both TAI and sequence, so we can related frames to the time of day. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- May 18, 2016
-
-
Alessandro Rubini authored
This adds a tool to check the latency in the network. It is selected at build time (config) time. If you select CONFIG_LATENCY_PROBE you are then asked for a CONFIG_LATENCY_ETHTYPE. The sender node sends three frames, as broadcast in that ethertype within the current vlan (or no vlan). The first frame is at priority 7, the second at priority 6, and the third includes the egress timestamps for the former ones. Each group has a sequence number and group identifier. If the tool is built in wrc.bin, every node acts as a receiver. To enable a sender issuing the set of frames every 5 seconds, use "ltest 5". To disable use "ltest 0". The receiver prints the measured latency, and warns if it receives frames that are not in the proper order, using the sequence and frame type fields. This is a successful run crossing two wr switches: latency prio7: 5142.775 latency prio6: 4998.775 latency prio7: 4822.773 latency prio6: 5142.773 latency prio7: 5142.771 latency prio6: 5286.771 Later on, we'll make the thing less verbose, and we'll have threshold to signal a problem if the network went slow. Currently we just print all collected data. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is used by the latency measurement, to send high-priority frames Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Apr 04, 2016
-
-
Alessandro Rubini authored
Although we love to build-test stuff and discard at link time, as soon as we move tasks to be sections, we need to avoid building the file of the task if not configured in. This means lib/arp.c and lib/ipv4.c. But, for consistency, avoid building icmp.c and bootp.c as well. The alternative, which is ifconfig'ing the task itself results in warnings like "'ipv4_init' defined but not used". Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This allows several functions to be static in the files where they are defined. See temperature.c for an example. But mainly, the idea is allowing ease addition of features (likely Kconfig'd ones) for specific WR users, without any modification to the main function and other generic code. This will happen soon for snmp, for example. We may push this a little further, by moving all shell stuff into shell.c, the ptp task within ppsi itself, and so on. But now my time is over. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Socket matching depended on the order or sockets. With the new ELF section (next commit) we get the ICMP socket before some UDP ones, so the code matched IPV4 and the UDP service did not get the data. Now we give priority to UDP sockets. So this commit fixes the problem beforehand. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The threshold and the repeat interval is set by Kconfig. The temperatures are read using the temperature framework. Tested in host environment: wrc# faketemp 90 80 10 wrc# faketemp 90 40 20 wrc# faketemp 20 30 40 Jan 1 10:32:09 192.168.16.7 Temperature high: \ roof:90.0000 core:80.0000 case:10.0000 Jan 1 10:33:09 192.168.16.7 Temperature high: \ roof:90.0000 core:40.0000 case:20.0000 Jan 1 10:33:18 192.168.16.7 Temperature ok: \ roof:20.0000 core:30.0000 case:40.0000 Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This, again, is preliminary to host builds, and has no effect. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
These changes have no effect at this point, but are the initial steps introducing host builds. Some changes are minor cleanups, some depend on CONFIG_HOST_PROCESS which is not defined at this point. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
WARNING: wr_switch_defconfig doesn't build, this is fixed in next commit Unfortunately this commit makes the internal communication between minic and lan asymmetric: on receive the tag is discarded (and the longer header falls into the payload) while on transmit it must be provided by lan.c. The reason is that on receive we can trim 4 bytes from the payload, but on send we can't add 4 bytes without a memmove. The functions receive pointers to two different header structures, so hopefully user errors will be signalled by the compiler. Still, users interact with net.c, which hides vlan completely from them. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We used to have "struct ethhdr" local in net.c, passing "void *hdr" to minic. We exports the structure to an header so to use it in communicating with the minic. Unfortunaltey, ethhdr is defined elsewhere too, so we'd better rename to wr_ethhdr. This is a step towards the introduction of vlans, but has no technical effect by itself. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
the UDP checlsum was miscalculated for odd-sized payload. The last byte was not used in calculation. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Feb 16, 2016
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All "tasks" must have the same prototype, so we'd better get void in all of them at the time being (so we only change the nerwork function). Meanwhile, use value "0" for "link down", so it can work as a simple enable flag for the IP polling code. (note: we query the link status in wrc_ptp_update() too, and we should rather refer to the global variable) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This solves http://www.ohwr.org/issues/1218 We used to have a "needIP" variable, but we need three states: if the address was set by bootp, we run bootp again when the link goes up, but if it was a static assignment we do not (and keep the static one). So I renamend needIP to a 3-valued ip_status. The rename ensured the compiler found all users. Also, the messages are now 3-headed, so the user know whether the address is static or it comes from bootp. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Feb 15, 2016
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We are going to have link up messages in syslog, we we'd better pass it over and not do network thiings in main. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I don't know why, but without this the next commit fails with a bad assert error in the compiler. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We need the string for IP and MAC in more places than stdout. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-