|
@@ -104,6 +104,33 @@ size_t xfer_window ( struct interface *intf ) {
|
104
|
104
|
return len;
|
105
|
105
|
}
|
106
|
106
|
|
|
107
|
+/**
|
|
108
|
+ * Report change of flow control window
|
|
109
|
+ *
|
|
110
|
+ * @v intf Data transfer interface
|
|
111
|
+ *
|
|
112
|
+ * Note that this method is used to indicate only unsolicited changes
|
|
113
|
+ * in the flow control window. In particular, this method must not be
|
|
114
|
+ * called as part of the response to xfer_deliver(), since that could
|
|
115
|
+ * easily lead to an infinite loop. Callers of xfer_deliver() should
|
|
116
|
+ * assume that the flow control window will have changed without
|
|
117
|
+ * generating an xfer_window_changed() message.
|
|
118
|
+ */
|
|
119
|
+void xfer_window_changed ( struct interface *intf ) {
|
|
120
|
+ struct interface *dest;
|
|
121
|
+ xfer_window_changed_TYPE ( void * ) *op =
|
|
122
|
+ intf_get_dest_op ( intf, xfer_window_changed, &dest );
|
|
123
|
+ void *object = intf_object ( dest );
|
|
124
|
+
|
|
125
|
+ if ( op ) {
|
|
126
|
+ op ( object );
|
|
127
|
+ } else {
|
|
128
|
+ /* Default is to do nothing */
|
|
129
|
+ }
|
|
130
|
+
|
|
131
|
+ intf_put ( dest );
|
|
132
|
+}
|
|
133
|
+
|
107
|
134
|
/**
|
108
|
135
|
* Allocate I/O buffer
|
109
|
136
|
*
|