|
@@ -752,3 +752,48 @@ struct ib_driver eoib_driver __ib_driver = {
|
752
|
752
|
.notify = eoib_notify,
|
753
|
753
|
.remove = eoib_remove,
|
754
|
754
|
};
|
|
755
|
+
|
|
756
|
+/****************************************************************************
|
|
757
|
+ *
|
|
758
|
+ * EoIB heartbeat packets
|
|
759
|
+ *
|
|
760
|
+ ****************************************************************************
|
|
761
|
+ */
|
|
762
|
+
|
|
763
|
+/**
|
|
764
|
+ * Silently ignore incoming EoIB heartbeat packets
|
|
765
|
+ *
|
|
766
|
+ * @v iobuf I/O buffer
|
|
767
|
+ * @v netdev Network device
|
|
768
|
+ * @v ll_source Link-layer source address
|
|
769
|
+ * @v flags Packet flags
|
|
770
|
+ * @ret rc Return status code
|
|
771
|
+ */
|
|
772
|
+static int eoib_heartbeat_rx ( struct io_buffer *iobuf,
|
|
773
|
+ struct net_device *netdev __unused,
|
|
774
|
+ const void *ll_dest __unused,
|
|
775
|
+ const void *ll_source __unused,
|
|
776
|
+ unsigned int flags __unused ) {
|
|
777
|
+ free_iob ( iobuf );
|
|
778
|
+ return 0;
|
|
779
|
+}
|
|
780
|
+
|
|
781
|
+/**
|
|
782
|
+ * Transcribe EoIB heartbeat address
|
|
783
|
+ *
|
|
784
|
+ * @v net_addr EoIB heartbeat address
|
|
785
|
+ * @ret string "<EoIB>"
|
|
786
|
+ *
|
|
787
|
+ * This operation is meaningless for the EoIB heartbeat protocol.
|
|
788
|
+ */
|
|
789
|
+static const char * eoib_heartbeat_ntoa ( const void *net_addr __unused ) {
|
|
790
|
+ return "<EoIB>";
|
|
791
|
+}
|
|
792
|
+
|
|
793
|
+/** EoIB heartbeat network protocol */
|
|
794
|
+struct net_protocol eoib_heartbeat_protocol __net_protocol = {
|
|
795
|
+ .name = "EoIB",
|
|
796
|
+ .net_proto = htons ( EOIB_MAGIC ),
|
|
797
|
+ .rx = eoib_heartbeat_rx,
|
|
798
|
+ .ntoa = eoib_heartbeat_ntoa,
|
|
799
|
+};
|